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

前端 未结 27 2531
孤街浪徒
孤街浪徒 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:31

    In my case the problem was caused due to an apparent lost of permission over mongodb.lock file. I could solve the problem changing the permission with the following command :

    sudo chown mongodb:mongodb /var/lib/mongodb/mongodb.lock
    

    There follows my investigation:

提交回复
热议问题