Mongo waiting on 27017 even after reinstall

前端 未结 9 1815
闹比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
    

提交回复
热议问题