mongodb无法启动
描述:
-
OS X下,一次关机未停止mongodb。再次开机无法启动mongodb。一直报错:
MongoDB shell version: 2.4.9
connecting to: test
Sat Mar 8 01:32:49.465 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed. -
谷歌搜索了下,发现可能是数据库锁死,于是把mongod.lock文件删除,依然无法启动mongodb。
日志文件如下:
***** SERVER RESTARTED *****
Sat Mar 8 01:32:14.320 [initandlisten] MongoDB starting : pid=1757 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=blurdeMacBook-Air.local
Sat Mar 8 01:32:14.320 [initandlisten]
Sat Mar 8 01:32:14.320 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Sat Mar 8 01:32:14.320 [initandlisten] db version v2.4.9
Sat Mar 8 01:32:14.320 [initandlisten] git version: nogitversion
Sat Mar 8 01:32:14.320 [initandlisten] build info: Darwin minimavericks.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
Sat Mar 8 01:32:14.320 [initandlisten] allocator: tcmalloc
Sat Mar 8 01:32:14.320 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb", logappend: "true", logpath: "/usr/local/var/log/mongodb/mongo.log" }
Sat Mar 8 01:32:14.321 [initandlisten] journal dir=/usr/local/var/mongodb/journal
Sat Mar 8 01:32:14.321 [initandlisten] recover : no journal files present, no recovery needed
Sat Mar 8 01:32:14.351 [initandlisten] waiting for connections on port 27017
Sat Mar 8 01:32:14.351 [websvr] admin web console waiting for connections on port 28017
Sat Mar 8 01:32:48.121 [signalProcessingThread] got signal 2 (Interrupt: 2), will terminate after current cmd ends
Sat Mar 8 01:32:48.121 [signalProcessingThread] now exiting
Sat Mar 8 01:32:48.121 dbexit:
Sat Mar 8 01:32:48.121 [signalProcessingThread] shutdown: going to close listening sockets...
Sat Mar 8 01:32:48.121 [signalProcessingThread] closing listening socket: 9
Sat Mar 8 01:32:48.121 [signalProcessingThread] closing listening socket: 10
Sat Mar 8 01:32:48.121 [signalProcessingThread] closing listening socket: 11
Sat Mar 8 01:32:48.122 [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
Sat Mar 8 01:32:48.122 [signalProcessingThread] shutdown: going to flush diaglog...
Sat Mar 8 01:32:48.122 [signalProcessingThread] shutdown: going to close sockets...
Sat Mar 8 01:32:48.122 [signalProcessingThread] shutdown: waiting for fs preallocator...
Sat Mar 8 01:32:48.122 [signalProcessingThread] shutdown: lock for final commit...
Sat Mar 8 01:32:48.122 [signalProcessingThread] shutdown: final commit...
Sat Mar 8 01:32:48.137 [signalProcessingThread] shutdown: closing all files...
Sat Mar 8 01:32:48.137 [signalProcessingThread] closeAllFiles() finished
Sat Mar 8 01:32:48.137 [signalProcessingThread] journalCleanup...
Sat Mar 8 01:32:48.137 [signalProcessingThread] removeJournalFiles
Sat Mar 8 01:32:48.137 [signalProcessingThread] shutdown: removing fs lock...
Sat Mar 8 01:32:48.137 dbexit: really exiting now
折腾好久了都没搞定,求大神帮帮忙,谢谢:)
柚子胡椒汽水
11 years, 4 months ago