我有问题,Mongo DB在ubuntu 14.04 64位启动,当我第一次安装时工作正常但突然从现在开始我在ubuntu终端输入mongo时显示错误:
MongoDB shell version: 3.0.7 connecting to: test 2015-11-26T11:59:03.888+0530 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2015-11-26T11:59:03.889+0530 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed我试过很多解决方案,即
1.删除锁定文件,然后重启mongo,
2.在mongod.conf中将绑定ip更改为0.0.0.0
但我的问题仍未解决。
I have issue with Mongo DB start up in ubuntu 14.04 64 bit,its working fine when i installed first time but suddenly from now when i type mongo in ubuntu terminal its showing error:
MongoDB shell version: 3.0.7 connecting to: test 2015-11-26T11:59:03.888+0530 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2015-11-26T11:59:03.889+0530 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failedI tried many solution i.e
1.deleting lock files, and restart mongo,
2.Change bind ip to 0.0.0.0 in mongod.conf
but my issue still not resolved.
最满意答案
尝试执行以下命令来grep mongod的进程id,以确定mongo服务是否正在运行
pgrep mongod如果存在进程ID,请按照下面提到的步骤操作
(a)使用以下命令终止现有的mongod进程
sudo kill -9 [process_id](b)使用开始mongod过程
sudo mongod --noauth --dbpath /var/lib/mongodbTry to execute the following command to grep process id of mongod to determine if mongo service is running or not
pgrep mongodIf process id exists then please follow the steps as mentioned below
(a) Kill existing mongod process using following command
sudo kill -9 [process_id](b) Start mongod process using
sudo mongod --noauth --dbpath /var/lib/mongodb更多推荐
发布评论