Skip to content

Update and fix numerous issues with exit codes. #2839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 9 additions & 37 deletions source/reference/exit-codes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,21 @@ issues with :program:`mongod` and :program:`mongos` instances.

Returned by :program:`mongod` if there is a mismatch between hostnames
specified on the command line and in the :data:`local.sources`
collection. :program:`mongod` may also return this status if
:term:`oplog` collection in the ``local`` database is not readable.
collection, in master/slave mode.

.. symbol: EXIT_REPLICATION_ERROR = 3

.. error:: 4

The version of the database is different from the version supported
by the :program:`mongod` (or :program:`mongod.exe`) instance. The
instance exits cleanly. Restart :program:`mongod` with the
:option:`--upgrade <mongod --upgrade>` option to upgrade the
database to the version supported by this :program:`mongod`
instance.

instance exits cleanly.

.. symbol: EXIT_NEED_UPGRADE = 4

.. error:: 5

Returned by :program:`mongod` if a :dbcommand:`moveChunk` operation
fails to confirm a commit.
Returned by :program:`mongos` if a problem is encountered during initialization.

.. symbol: EXIT_SHARDING_ERROR = 5

Expand All @@ -65,7 +60,7 @@ issues with :program:`mongod` and :program:`mongos` instances.

Returned by MongoDB applications which encounter an unrecoverable
error, an uncaught exception or uncaught signal. The system exits
without performing a clean shut down.
without performing a clean shutdown.

.. symbol: EXIT_ABRUPT = 14

Expand All @@ -74,7 +69,7 @@ issues with :program:`mongod` and :program:`mongos` instances.
*Message:* ``ERROR: wsastartup failed <reason>``

Returned by MongoDB applications on Windows following an error in the
WSAStartup function.
WSAStartup function, used to initialize the networking subsystem.

*Message:* ``NT Service Error``

Expand All @@ -83,36 +78,13 @@ issues with :program:`mongod` and :program:`mongos` instances.

.. symbol: EXIT_NTSERVICE_ERROR = 20

.. error:: 45

Returned when a MongoDB application cannot open a file or cannot
obtain a lock on a file.

.. Symbol: EXIT_FS

.. error:: 47

MongoDB applications exit cleanly following a large clock skew (32768
milliseconds) event.

.. symbol: EXIT_CLOCK_SKEW

.. error:: 48

:program:`mongod` exits cleanly if the server socket closes. The
server socket is on port ``27017`` by default, or as specified to
the :option:`--port <mongod --port>` run-time option.

A newly started :program:`mongod` or :program:`mongos` could not start listening for incoming connections,
due to an error.

.. symbol: EXIT_NET_ERROR = 48

.. error:: 49

Returned by :program:`mongod.exe` or :program:`mongos.exe` on Windows
when either receives a shutdown message from the
:guilabel:`Windows Service Control Manager`.

.. symbol: EXIT_WINDOWS_SERVICE_STOP 49

.. error:: 100

Returned by :program:`mongod` when the process throws an uncaught exception.
Expand Down