到目前为止,我一直在运行mongodb而没有任何问题。我真的不知道发生了什么,因为不记得什么都不做。不过,现在我尝试启动mongo服务器时出现以下错误。
$ mongod --config /usr/local/etc/mongod.conf
2015-01-22T13:58:04.153+0100 Assertion failure getcwd(buffer, 1000) src/mongo/db/server_options_helpers.cpp 355
2015-01-22T13:58:04.169+0100 0x1017ae5aa 0x101759135 0x101745bf2 0x1015509ed 0x10132b7a3 0x100fd2be6 0x100fc5291 0x100fd60be 0x100fd68ae 0x100fc41eb 0x7fff8aff35c9
0 mongod 0x00000001017ae5aa _ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE + 58
1 mongod 0x0000000101759135 _ZN5mongo10logContextEPKc + 453
2 mongod 0x0000000101745bf2 _ZN5mongo12verifyFailedEPKcS1_j + 626
3 mongod 0x00000001015509ed _ZN5mongo18storeServerOptionsERKNS_17optionenvironment11EnvironmentERKNSt3__16vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEE + 10237
4 mongod 0x000000010132b7a3 _ZN5mongo18storeMongodOptionsERKNS_17optionenvironment11EnvironmentERKNSt3__16vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEE + 35
5 mongod 0x0000000100fd2be6 _ZN5mongo45_mongoInitializerFunction_MongodOptions_StoreEPNS_18InitializerContextE + 38
6 mongod 0x0000000100fc5291 _ZN5boost6detail8function17function_invoker1IPFN5mongo6StatusEPNS3_18InitializerContextEES4_S6_E6invokeERNS1_15function_bufferES6_ + 17
7 mongod 0x0000000100fd60be _ZNK5mongo11Initializer7executeERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEERKNS1_3mapIS8_S8_NS1_4lessIS8_EENS6_INS1_4pairIKS8_S8_EEEEEE + 270
8 mongod 0x0000000100fd68ae _ZN5mongo21runGlobalInitializersEiPKPKcS3_ + 526
9 mongod 0x0000000100fc41eb main + 331
10 libdyld.dylib 0x00007fff8aff35c9 start + 1
2015-01-22T13:58:04.177+0100 SEVERE: Failed global initialization: UnknownError assertion src/mongo/db/server_options_helpers.cpp:355
我也尝试过运行mongo --repair
,但也遇到了同样的错误。
答案 0 :(得分:38)
这太奇怪了!
我在OSX上,使用iTerm,我试图运行上述过程。一旦我完成iTerm并重新启动它,创建的shell就可以毫无问题地运行该过程。
似乎这个过程以前无法阻止。在此之前,我甚至尝试运行mongo
以查看是否可以连接,但它失败了。