Mongodb shell mongo: Only one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017

后端 未结 3 772
走了就别回头了
走了就别回头了 2021-02-05 14:56

It was fine 2 days ago, Now mongod does not work. Even echo ps -A | grep mongo printed nothing, yet it warns about error: \"Only one usage of each sock

相关标签:
3条回答
  • 2021-02-05 15:23

    In the command prompt type the following command

    netstat -a -n -o | find "27017"
    

    This will list all processes which are using port "27017" along with the PID.

    Locate the PID using "27017". For example if the PID is 10580, to kill it

    taskkill /f /pid 10580
    

    Now start mongo. Hope this helps.

    0 讨论(0)
  • 2021-02-05 15:23
    1. Open command prompt in Administrator mode
    2. run net stop MongoDB
    0 讨论(0)
  • 2021-02-05 15:24

    try to start mongo on a different port: http://docs.mongodb.org/manual/reference/mongod/#cmdoption-mongod--port

    to be sure what port you can use, execute the command Sriukanth Venugopalan mentioned, it will list the current ports being used.

    Regards, Moacy

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