Mongodb无法启动 [英] Mongodb can't start

查看:113
本文介绍了Mongodb无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我更新了Mongo .. mongodb-stable(来自10gen repo)

today I updated my Mongo.. mongodb-stable (from 10gen repo)

但是我的服务中断了. 以下命令不起作用

but my service has down. the following command not working

$ sudo service mongodb start
$ start: Unknown job: mongodb

即使此命令不起作用

$ sudo /etc/init.d/mongodb start
$ Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mongodb start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mongodb
start: Unknown job: mongodb

没有mongo进程在运行

there is no mongo process running

$ ps -ef|grep mongo
$ user  9689  8121  0 13:01 pts/1    00:00:00 grep --color=auto mongo

日志在这里

tail /var/log/mongodb/mongodb.log 
Fri Dec 10 11:24:35 [conn4] end connection 127.0.0.1:54217
Fri Dec 10 11:25:35 [initandlisten] connection accepted from 127.0.0.1:54229 #5
Fri Dec 10 11:26:25 [initandlisten] connection accepted from 127.0.0.1:54243 #6
Fri Dec 10 11:26:30 [conn6] end connection 127.0.0.1:54243
Fri Dec 10 11:30:13 got kill or ctrl c or hup signal 15 (Terminated), will terminate after current cmd ends
Fri Dec 10 11:30:13 [interruptThread] now exiting
Fri Dec 10 11:30:13 dbexit: 

Fri Dec 10 11:30:13 [interruptThread] shutdown: going to close listening sockets...
Fri Dec 10 11:30:13 [interruptThread] closing listening socket: 5
Fri Dec 10 11:30:13 [interruptThread] closing listening socket: 6
Fri Dec 10 11:30:13 [interruptThread] closing listening socket: 7
Fri Dec 10 11:30:13 [interruptThread] closing listening socket: 8
Fri Dec 10 11:30:13 [interruptThread] shutdown: going to flush oplog...
Fri Dec 10 11:30:13 [interruptThread] shutdown: going to close sockets...
Fri Dec 10 11:30:13 [interruptThread] shutdown: waiting for fs preallocator...
Fri Dec 10 11:30:13 [interruptThread] shutdown: closing all files...
Fri Dec 10 11:30:13     closeAllFiles() finished

Fri Dec 10 11:30:13 [interruptThread] shutdown: removing fs lock...
Fri Dec 10 11:30:13 dbexit: really exiting now

现在,我正在通过此命令运行Mongo一段时间,手动创建进程

for now, I'm running Mongo through this command just for a while, creating process manually

$ sudo mongod -f /etc/mongodb.conf

有什么主意吗? 还是有人通过更新管理器更新了Mongo-stable?

any idea? or has anyone updated Mongo-stable via Update manager?

此mongodb版本为v1.6.5,似乎mongo团队发布了稳定的bug.他们立即将其修复为v1.7.4.您可以看到主要优先级问题.

This mongodb version was v1.6.5 and it seems mongo team released it as stable with a bug. And they fixed it immediately at v1.7.4. You can see the major priority issue.

推荐答案

已报告并修复了错误.

https://jira.mongodb.org/browse/SERVER-2200


$ sudo apt-get purge mongodb-stable 
$ sudo apt-get install mongodb-stable 
(remove the lock file if present in /var/lib/mongodb)  
$ sudo init 6 

然后编辑/etc/init/mongodb.conf 删除行"limit nofile 20000"

Then edit /etc/init/mongodb.conf removing the line "limit nofile 20000"


$ sudo vi /etc/init/mongodb.conf 
$ sudo service mongodb start
mongodb start/running, process 2351

有效.

这篇关于Mongodb无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆