mongodb启动失败[转]
来源:互联网 发布:is语音网络兼职可信吗 编辑:程序博客网 时间:2024/04/30 12:56
现象:
查看日志的内容如下
Tue Jan 4 09:51:37 MongoDB starting : pid=2794 port=27017 dbpath=/var/lib/mongodb 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations
Tue Jan 4 09:51:37 db version v1.6.5, pdfile version 4.5
Tue Jan 4 09:51:37 git version: 0eb017e9b2828155a67c5612183337b89e12e291
Tue Jan 4 09:51:37 sys info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_37
**************
old lock file: /var/lib/mongodb/mongod.lock. probably means unclean shutdown
recommend removing file and running –repair
see: http://dochub.mongodb.org/core/repair for more information
*************
Tue Jan 4 09:51:37 exception in initAndListen std::exception: old lock file, terminating
Tue Jan 4 09:51:37 dbexit:
Tue Jan 4 09:51:37 shutdown: going to close listening sockets…
Tue Jan 4 09:51:37 shutdown: going to flush oplog…
Tue Jan 4 09:51:37 shutdown: going to close sockets…
Tue Jan 4 09:51:37 shutdown: waiting for fs preallocator…
Tue Jan 4 09:51:37 shutdown: closing all files…
Tue Jan 4 09:51:37 closeAllFiles() finished
Tue Jan 4 09:51:37 dbexit: really exiting now
解决办法:
sudo rm /****/***/mongodb/mongodb.log
sudo rm /***/***/mongodb/mongod.lock
sudo /app/tools/mongodb/bin/mongod –repair –dbpath /app/mongodb/data –repairpath /tmp/mongodb
二
现象:
Sat Jan 29 12:35:35 MongoDB starting : pid=8298 port=27017 dbpath=/var/lib/mongodb 32-bit** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations
Sat Jan 29 12:35:35 db version v1.6.5, pdfile version 4.5
Sat Jan 29 12:35:35 git version: 0eb017e9b2828155a67c5612183337b89e12e291
Sat Jan 29 12:35:35 sys info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_37
Sat Jan 29 12:35:35 exception in initAndListen std::exception: Unable to create / open lock file for lockfilepath: /var/lib/mongodb/mongod.lock errno:13 Permission denied, terminating
Sat Jan 29 12:35:35 dbexit:
Sat Jan 29 12:35:35 shutdown: going to close listening sockets…
Sat Jan 29 12:35:35 shutdown: going to flush oplog…
Sat Jan 29 12:35:35 shutdown: going to close sockets…
Sat Jan 29 12:35:35 shutdown: waiting for fs preallocator…
Sat Jan 29 12:35:35 shutdown: closing all files…
Sat Jan 29 12:35:35 closeAllFiles() finished
Sat Jan 29 12:35:35 shutdown: removing fs lock…
Sat Jan 29 12:35:35 couldn’t remove fs lock errno:9 Bad file descriptor
Sat Jan 29 12:35:35 dbexit: really exiting now
解决方法:
- Manually remove the lockfile:
sudo rm /var/lib/mongodb/mongod.lock
- Run the repair script:
sudo -u mongodb /usr/bin/mongod -f /etc/mongodb.conf --repair
.- You must run this command as the mongodb user. If you run it as root, then root will own files in /var/lib/mongodb/ that are necessary to run the mongodb daemon and therefore when the daemon trys to run later as the mongodb user, it won’t have permissions to start. In that case you’ll get this error:
Unable to create / open lock file for lockfilepath: /var/lib/mongodb/mongod.lock errno:13 Permission denied, terminating
. - On Ubuntu, you must specify the configuration file /etc/mongodb.conf using the -f flag. Otherwise it will look for the data files in the wrong place and you will see the following error:
dbpath (/data/db/) does not exist, terminating
.
- You must run this command as the mongodb user. If you run it as root, then root will own files in /var/lib/mongodb/ that are necessary to run the mongodb daemon and therefore when the daemon trys to run later as the mongodb user, it won’t have permissions to start. In that case you’ll get this error:
- Now you can start your MongoDB server with
sudo start mongodb
and verify it is running withsudo status mongodb
and by trying to connect to it withmongo test
.
- mongodb启动失败[转]
- mongodb启动失败
- mongodb启动失败
- mongodb启动失败汇总
- mongodb启动失败解决方案
- Mongodb启动失败问题解决
- 【centOS】mongoDB启动失败问题解决
- mongodb开机自启动失败
- net start MongoDB启动MongoDB服务失败
- mongodb启动失败:javascript execution failed: L112
- 故障案例 mongodb configserver启动失败
- mongodb启动数据库失败(如何正确关闭mongo数据库)
- mongoDB加入服务后启动失败的解决方法
- 关于mongodb由于内存过小启动失败原因分析
- mongoDB服务启动失败(exception: connect failed)
- [转]npkcrypt 服务启动失败
- MongoDB启动
- MongoDB启动
- Qt发布可能遇到的问题
- Linux/RedHat 编译安装GNU gcc 4.9.0 (g++)
- 实例讲解js中的预编译
- Lz77编码 解码程序
- 多家媒体报道世奢会被诉 网友记者遭刑事调查
- mongodb启动失败[转]
- eclipse设置tab键为4个空格
- IE降级
- 使用stax操作xml(3)
- Firefox下td用display控制页面导致页面变形
- day49(4.29)冒泡与日期方法的使用
- git rebase 和 merge区别
- 使用stax操作xml(4)
- android aidl 使用实例