Mongo: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145

前端 未结 6 1527
轻奢々
轻奢々 2021-01-31 05:41

When I try to run mongo in shell in ubuntu or open rockmongo I see this error:

couldn\'t connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
         


        
6条回答
  •  深忆病人
    2021-01-31 06:01

    even i had the same problem so i deleted the mongod lock file

    sudo rm /var/lib/mongodb/mongod.lock
    

    and the restart the server it worked , restarting by command below

    sudo service mongodb restart
    

提交回复
热议问题