我在Mac OSX上安装了MongoDB。当我mongod
时,它不会启动任何连接;相反,它显示下面的输出。有人可以帮我解决这个问题吗
$ mongod
mongod --help for help and startup options
2015-01-16T09:57:18.994-0500 [initandlisten] MongoDB starting : pid=1571 port=27017 dbpath=/data/db 64-bit host=3c15c2e72774
2015-01-16T09:57:18.995-0500 [initandlisten]
2015-01-16T09:57:18.995-0500 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2015-01-16T09:57:18.995-0500 [initandlisten] db version v2.6.7
2015-01-16T09:57:18.995-0500 [initandlisten] git version: nogitversion
2015-01-16T09:57:18.995-0500 [initandlisten] build info: Darwin minimavericks.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2015-01-16T09:57:18.995-0500 [initandlisten] allocator: tcmalloc
2015-01-16T09:57:18.995-0500 [initandlisten] options: {}
2015-01-16T09:57:18.996-0500 [initandlisten] journal dir=/data/db/journal
2015-01-16T09:57:18.996-0500 [initandlisten] recover : no journal files present, no recovery needed
2015-01-16T09:57:19.056-0500 [initandlisten] bad .ns file: /data/db/local.ns
2015-01-16T09:57:19.056-0500 [initandlisten] warning database /data/db local could not be opened
2015-01-16T09:57:19.056-0500 [initandlisten] DBException 10079: bad .ns file length, cannot open database
2015-01-16T09:57:19.056-0500 [initandlisten] exception in initAndListen: 10079 bad .ns file length, cannot open database, terminating
2015-01-16T09:57:19.056-0500 [initandlisten] dbexit:
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to close listening sockets...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to flush diaglog...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to close sockets...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: waiting for fs preallocator...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: lock for final commit...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: final commit...
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: closing all files...
2015-01-16T09:57:19.056-0500 [initandlisten] closeAllFiles() finished
2015-01-16T09:57:19.056-0500 [initandlisten] journalCleanup...
2015-01-16T09:57:19.060-0500 [initandlisten] removeJournalFiles
2015-01-16T09:57:19.060-0500 [initandlisten] shutdown: removing fs lock...
2015-01-16T09:57:19.060-0500 [initandlisten] dbexit: really exiting now
答案 0 :(得分:1)
删除/ data / db中任何旧的或损坏的.ns文件,然后重新启动mongodb
答案 1 :(得分:0)
我有这个问题。我通过使用Virtual Box增加副本的内存大小来解决它。