- Administration >
- Administration Reference >
- Exit Codes and Statuses
Exit Codes and Statuses¶
MongoDB will return one of the following codes and statuses when
exiting. Use this guide to interpret logs and when troubleshooting
issues with mongod and mongos instances.
-
0¶ Returned by MongoDB applications upon successful exit.
-
2¶ The specified options are in error or are incompatible with other options.
-
3¶ Returned by
mongodif there is a mismatch between hostnames specified on the command line and in thelocal.sourcescollection.mongodmay also return this status if oplog collection in thelocaldatabase is not readable.
-
4¶ The version of the database is different from the version supported by the
mongod(ormongod.exe) instance. The instance exits cleanly. Restartmongodwith the--upgradeoption to upgrade the database to the version supported by thismongodinstance.
-
12¶ Returned by the
mongod.exeprocess on Windows when it receives a Control-C, Close, Break or Shutdown event.
-
14¶ Returned by MongoDB applications which encounter an unrecoverable error, an uncaught exception or uncaught signal. The system exits without performing a clean shut down.
-
20¶ Message:
ERROR: wsastartup failed <reason>Returned by MongoDB applications on Windows following an error in the WSAStartup function.
Message:
NT Service ErrorReturned by MongoDB applications for Windows due to failures installing, starting or removing the NT Service for the application.
-
45¶ Returned when a MongoDB application cannot open a file or cannot obtain a lock on a file.
-
47¶ MongoDB applications exit cleanly following a large clock skew (32768 milliseconds) event.
-
48¶ mongodexits cleanly if the server socket closes. The server socket is on port27017by default, or as specified to the--portrun-time option.
-
49¶ Returned by
mongod.exeormongos.exeon Windows when either receives a shutdown message from the Windows Service Control Manager.