Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused

前端 未结 27 2528
孤街浪徒
孤街浪徒 2020-12-12 15:06

while trying this mongo command in ubuntu I am getting this error.

    ritzysystem@ritzysystem-Satellite-L55-A:~$ mongo
    MongoDB shell version: 2.6.1
             


        
27条回答
  •  离开以前
    2020-12-12 15:37

    In my case bind_ip was not 127.0.0.1 in /etc/mongodb.conf file so change bind_ip to 127.0.0.1(it may be comma separated values so make sure 127.0.0.1 is one of them) Then restart your system to take effect. Restart only to the those who are facing

    $sudo service mongod restart
    Failed to restart mongod.service: Unit mongod.service not found.
    

提交回复
热议问题