Mongo waiting on 27017 even after reinstall

前端 未结 9 1757
闹比i
闹比i 2021-01-03 23:23

I have uninstalled and reinstalled mongo (3.0.1), being sure i accepted the network access on windows 8, and yet i still have the same issue of \"waiting on 27017\".

相关标签:
9条回答
  • 2021-01-03 23:25

    I have a similar problem.

    In my case when I ran MongoDb on docker with the following command and expected entering mongo shell to do some query but I got meesage 'waiting for connections on port 27017' and couldn't do anything.

    docker run -p 27017:27017 --name mongo-container mongo 
    

    It seems that I was supposed to launch MongoDb on the background with -d option first and then use docker exec to enter the shell

    docker run -p 27017:27017 --name mongo-container mongo -d
    docker exec -it mongo-container mongo admin
    
    0 讨论(0)
  • 2021-01-03 23:26

    For Mac users, if you have same issue then go open a new terminal window apart from the one already open and waiting for connection, go to /usr/local/bin and type ./mongo

    0 讨论(0)
  • 2021-01-03 23:34

    If You are windows go to your root folder C:\Program Files\mongodb\Server\4.0\bin...open cmd as a Administration open cmd then type mongo start your mongodb server.

    0 讨论(0)
  • 2021-01-03 23:38

    You Keep your first screen(which you are facing issue) open as it is. Now open one more screen and go inside mongodb folder. now execute ./bin/mongod. and you can its connected as below .

    2016-11-04T13:44:02.414+0800 I NETWORK  [initandlisten] waiting for connections on port 27017
    2016-11-04T13:50:26.990+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:51541 #1 (1 connection now open)
    
    0 讨论(0)
  • 2021-01-03 23:40

    The waiting for connections message in the console output indicates that the mongod.exe process is running successfully.

    http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/?_ga=1.82566930.525730850.1428016333

    Next you need to connect to MongoDB through mongo.exe shell using another command promt.

    As soon as you are done with that, the waiting message in first console would change to connection accepted.

    Hope that helps :)

    0 讨论(0)
  • 2021-01-03 23:41
    1. open the control panel search for MongoDB file
    2. Right click on it and select repair option

    3. and click ok for all the options that show

    0 讨论(0)
提交回复
热议问题