@@ -14,6 +14,7 @@ MongoDB will return one of the following codes and statuses when
1414exiting. Use this guide to interpret logs and when troubleshooting
1515issues with :binary:`~bin.mongod` and :binary:`~bin.mongos` instances.
1616
17+ .. _exit-codes:
1718
1819.. list-table::
1920 :header-rows: 1
@@ -25,47 +26,45 @@ issues with :binary:`~bin.mongod` and :binary:`~bin.mongos` instances.
2526 * - .. error:: 0
2627 - Returned by MongoDB applications upon successful exit.
2728
28- .. symbol: EXIT_CLEAN
29+
30+ * - .. error:: 1
31+ - Returned by :binary:`~bin.mongod` as a generic failure when no
32+ other error codes apply.
33+
2934
3035 * - .. error:: 2
3136 - The specified options are in error or are incompatible
3237 with other options.
3338
34- .. symbol: EXIT_BADOPTIONS 2
3539
3640 * - .. error:: 3
37- - Returned by :binary:`~bin.mongod` if there is a mismatch
38- between hostnames specified on the command line and in the
39- ``local.sources`` collection, in master/slave mode .
41+ - Returned by :binary:`~bin.mongod` if there is a mismatch between
42+ hostnames specified on the command line and in the
43+ ``local.sources`` collection when running a replica set .
4044
41- .. symbol: EXIT_REPLICATION_ERROR = 3
4245
4346 * - .. error:: 4
4447 - The version of the database is different from the version
4548 supported by the :binary:`~bin.mongod` (or
4649 :binary:`~bin.mongod.exe`) instance. The instance exits
4750 cleanly.
4851
49- .. symbol: EXIT_NEED_UPGRADE = 4
5052
5153 * - .. error:: 5
5254 - Returned by :binary:`~bin.mongos` if a problem is encountered
5355 during initialization.
5456
55- .. symbol: EXIT_SHARDING_ERROR = 5
5657
5758 * - .. error:: 12
5859 - Returned by the :binary:`~bin.mongod.exe` process on Windows
5960 when it receives a Control-C, Close, Break or Shutdown event.
6061
61- .. symbol: EXIT_KILL = 12
6262
6363 * - .. error:: 14
6464 - Returned by MongoDB applications which encounter an
6565 unrecoverable error, an uncaught exception or uncaught signal.
6666 The system exits without performing a clean shutdown.
6767
68- .. symbol: EXIT_ABRUPT = 14
6968
7069 * - .. error:: 20
7170 - *Message:* ``ERROR: wsastartup failed <reason>``
@@ -80,30 +79,50 @@ issues with :binary:`~bin.mongod` and :binary:`~bin.mongos` instances.
8079 installing, starting or removing the NT Service for the
8180 application.
8281
83- .. symbol: EXIT_NTSERVICE_ERROR = 20
8482
8583 * - .. error:: 48
86- - A newly started :binary:`~bin.mongod` or :binary:`~bin.mongos`
87- could not start listening for incoming connections, due to an
88- error.
84+ - Returned by :binary:`~bin.mongod` or :binary:`~bin.mongos`
85+ when an error prevents a newly started instance from listening
86+ for incoming connections.
87+
88+
89+ * - .. error:: 50
90+ - Returned by :binary:`~bin.mongod` during server initialization
91+ if it fails to fork the process.
92+
93+
94+ * - .. error:: 51
95+ - Returned by :binary:`~bin.mongod` during server initialization
96+ if the daemon fails to send a ready signal. The process exits
97+ cleanly.
8998
90- .. symbol: EXIT_NET_ERROR = 48
9199
92100 * - .. error:: 61
93101 - Returned by the :ref:`storage-node-watchdog` if any of the
94102 filesystems with monitored directories are unresponsive.
95103
96- .. symbol: EXIT_WATCHDOG = 61
97104
98105 * - .. error:: 62
99- - Returned by :binary:`~bin.mongod` if the datafiles in
106+ - Returned by :binary:`~bin.mongod` when the datafiles in
100107 :option:`--dbpath <mongod --dbpath>` are incompatible with the
101- version of :binary:`~bin.mongod` currently running.
108+ version of :binary:`~bin.mongod` currently running.
109+
110+ To resolve data incompatibility issues after upgrading, please
111+ refer to the :ref:`release notes <release-notes-6.0>` for your
112+ version of MongoDB and search for "Changes Affecting
113+ Compatibility."
114+
115+
116+ * - .. error:: 87
117+ - Returned by :binary:`~bin.mongod` or :binary:`~bin.mongos` when
118+ the process health check triggers a crash.
102119
103- .. symbol: EXIT_NEED_DOWNGRADE = 62
104120
105121 * - .. error:: 100
106122 - Returned by :binary:`~bin.mongod` when the process throws an
107123 uncaught exception.
108124
109- .. symbol: EXIT_UNCAUGHT = 100
125+
126+ * - .. error:: 102
127+ - Returned by :binary:`~bin.mongod` or :binary:`~bin.mongos` when
128+ the process fails to rotate audit logs on startup.
0 commit comments