MongoDB will return one of the following codes and statuses when exiting. MongoDB将在退出时返回以下代码和状态之一。Use this guide to interpret logs and when troubleshooting issues with mongod and mongos instances.使用本指南解释日志,并在对mongod和mongos实例的问题进行故障排除时使用。
Code代码
Cause原因
0
Returned by MongoDB applications upon successful exit.成功退出后由MongoDB应用程序返回。
2
The specified options are in error or are incompatible with other options.指定的选项出错或与其他选项不兼容。
3
Returned by mongod if there is a mismatch between hostnames specified on the command line and in the local.sources collection, in master/slave mode.如果在主/从模式下,命令行和local.sources集合中指定的主机名不匹配,则由mongod返回。
4
The version of the database is different from the version supported by the mongod (or exe) instance. 数据库的版本与mongod(或exe)实例支持的版本不同。The instance exits cleanly.实例干净地退出。
5
Returned by mongos if a problem is encountered during initialization.如果在初始化过程中遇到问题,则由mongos返回。
12
Returned by the exe process on Windows when it receives a Control-C, Close, Break or Shutdown event.Windows上的exe进程在接收到Control-C、Close、Break或Shutdown事件时返回。
14
Returned by MongoDB applications which encounter an unrecoverable error, an uncaught exception or uncaught signal. 由遇到不可恢复错误、未捕获异常或未捕获信号的MongoDB应用程序返回。The system exits without performing a clean shutdown.系统在未执行完全关闭的情况下退出。
20
Message:ERROR: wsastartup failed <reason>
Returned by MongoDB applications on Windows following an error in the WSAStartup function, used to initialize the networking subsystem.Windows上的MongoDB应用程序在WSAStartup函数出错后返回,用于初始化网络子系统。
Message:NT Service Error
Returned by MongoDB applications for Windows due to failures installing, starting or removing the NT Service for the application.由于安装、启动或删除应用程序的NT服务失败,MongoDB applications for Windows返回。
48
A newly started mongod or mongos could not start listening for incoming connections, due to an error.由于错误,新启动的mongod或mongos无法开始侦听传入连接。
62
Returned by mongod if the datafiles in --dbpath are incompatible with the version of mongod currently running.如果--dbpath中的数据文件与当前运行的mongod版本不兼容,则由mongod返回。
100
Returned by mongod when the process throws an uncaught exception.当进程抛出未捕获的异常时,mongod返回。