2
我读了很多有关mongod.lock文件的文档,但我无法找到的答案是干净关闭是否应该删除此文件。MongoDb关闭不会删除mongod.lock
其实我试图做的是停止蒙戈在使用下面的代码作为服务运行如图所示here(请注意,我在Win 8.1运行和蒙戈2.6.4运行服务)
mongo
>use admin
>db.shutdownServer({timeoutSecs: 60});
此命令输出我:
2014-09-02T20:40:05.061+0200 DBClientCursor::init call() failed
server should be down...
2014-09-02T20:40:05.066+0200 trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
2014-09-02T20:40:06.068+0200 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2014-09-02T20:40:06.069+0200 reconnect 127.0.0.1:27017 (127.0.0.1) failed failed couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
当执行此命令的mongod.lock文件冲洗(从X KB传递到0 KB),而不是被删除。这个关机之后,mongo每次重新启动都没问题。
那么干净的mongo shutdown是否会删除.lock文件?
谢谢,最大。