已经在ubuntu中运行Mongo db启动问题(Already running Mongo db start up issue in ubuntu)

编程入门 行业动态 更新时间:2024-10-25 04:19:50
已经在ubuntu中运行Mongo db启动问题(Already running Mongo db start up issue in ubuntu)

我有问题,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 failed

I 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/mongodb

Try to execute the following command to grep process id of mongod to determine if mongo service is running or not

pgrep mongod

If 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

更多推荐

本文发布于:2023-07-22 18:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222343.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:db   Mongo   ubuntu   issue   start

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!