且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法连接到服务器127.0.0.1:27017

更新时间:2022-11-16 23:12:38

日志表明mongodb正在终止,因为存在一个旧的锁定文件.

The log indicates that mongodb is terminating because there is an old lock file.

如果不是,也没有使用日记功能运行,请删除锁定文件,运行修复程序,然后再次启动mongodb.

If you are not and were not running with journaling, remove the lock file, run repair, and start mongodb again.

如果您正在或正在运行日记功能,请参阅相关的Mongo DB文档 .请注意,他们说如果您正在使用日记功能运行,则不应进行修复以恢复到一致状态."因此,如果您正在记日记,那么维修可能会使情况变得更糟.

If you are or were running with journaling turned on, see the relevant Mongo DB docs. Note that they say "If you are running with Journaling you should not do a repair to recover to a consistent state." So if you were journaling, the repair may have made things worse.