Skip to content

Commit 70c3fc4

Browse files
author
Sam Kleinman
committed
DOCS-19: editing exit code reference page.
1 parent 8122236 commit 70c3fc4

15 files changed

+100
-261
lines changed

source/reference.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Status and Reporting
5555
reference/replica-configuration
5656
reference/replication-info
5757
reference/current-op
58+
reference/exit-codes
5859

5960
General Reference
6061
-----------------

source/reference/exit-codes.txt

Lines changed: 99 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,114 @@
1-
:orphan:
2-
3-
============================
4-
MongoDB Exit and Error Codes
5-
============================
1+
=======================
2+
Exit Codes and Statuses
3+
=======================
64

75
.. default-domain:: mongodb
86

9-
.. include:: /reference/exit-codes/exit_clean.txt
10-
:start-after: default-domain:: mongodb
7+
MongoDB will return one of the following codes and statuses when
8+
exiting. Use this guide to interpret logs and when troubleshooting
9+
issues with :program:`mongod` and :program:`mongos` instances.
10+
11+
.. error:: 0
12+
13+
Returned by MongoDB applications upon successful exit.
14+
15+
.. symbol: EXIT_CLEAN
16+
17+
.. error:: 2
18+
19+
The specified options are in error or are incompatible
20+
with other options.
21+
22+
.. symbol: EXIT_BADOPTIONS 2
23+
24+
.. error:: 3
25+
26+
Returned by :program:`mongod` if there is a mismatch between hostnames
27+
specified on the command line and in the :data:`local.sources`
28+
collection. :program:`mongod` may also return this status if
29+
:term:`oplog` collection in the ``local`` database is not readable.
30+
31+
.. symbol: EXIT_REPLICATION_ERROR = 3
32+
33+
.. error:: 4
34+
35+
The version of the database is different from the version supported
36+
by the :program:`mongod` (or :program:`mongod.exe`) instance. The
37+
instance exits cleanly. Restart :program:`mongod` with the
38+
:option:`--upgrade <mongod --upgrade>` option to upgrade the
39+
database to the version supported by this :program:`mongod`
40+
instance.
41+
42+
.. symbol: EXIT_NEED_UPGRADE = 4
43+
44+
.. error:: 5
45+
46+
Returned by :program:`mongod` if a :dbcommand:`moveChunk` operation
47+
fails to confirm a commit.
48+
49+
.. symbol: EXIT_SHARDING_ERROR = 5
50+
51+
.. error:: 12
52+
53+
Returned by the :program:`mongod.exe` process on Windows when it
54+
receives a Control-C, Close, Break or Shutdown event.
55+
56+
.. symbol: EXIT_KILL = 12
57+
58+
.. error:: 14
59+
60+
Returned by MongoDB applications which encounter an unrecoverable
61+
error, an uncaught exception or uncaught signal. The system exits
62+
without performing a clean shut down.
63+
64+
.. symbol: EXIT_ABRUPT = 14
65+
66+
.. error:: 20
67+
68+
*Message:* ``ERROR: wsastartup failed <reason>``
69+
70+
Returned by MongoDB applications on Windows following an error in the
71+
WSAStartup function.
72+
73+
*Message:* ``NT Service Error``
74+
75+
Returned by MongoDB applications for Windows due to failures installing,
76+
starting or removing the NT Service for the application.
77+
78+
.. symbol: EXIT_NTSERVICE_ERROR = 20
79+
80+
.. error:: 45
81+
82+
Returned when a MongoDB application cannot open a file or cannot
83+
obtain a lock on a file.
84+
85+
.. Symbol: EXIT_FS
1186

12-
.. include:: /reference/exit-codes/exit_bad_options.txt
13-
:start-after: default-domain:: mongodb
87+
.. error:: 47
1488

15-
.. include:: /reference/exit-codes/exit_replication_error.txt
16-
:start-after: default-domain:: mongodb
89+
MongoDB applications exit cleanly following a large clock skew (32768
90+
milliseconds) event.
1791

18-
.. include:: /reference/exit-codes/exit_need_upgrade.txt
19-
:start-after: default-domain:: mongodb
92+
.. symbol: EXIT_CLOCK_SKEW
2093

21-
.. include:: /reference/exit-codes/exit_sharding_error.txt
22-
:start-after: default-domain:: mongodb
94+
.. error:: 48
2395

24-
.. include:: /reference/exit-codes/exit_kill.txt
25-
:start-after: default-domain:: mongodb
96+
:program:`mongod` exits cleanly if the server socket closes. The
97+
server socket is on port ``27017`` by default, or as specified to
98+
the :option:`--port <mongod --port>` run-time option.
2699

27-
.. include:: /reference/exit-codes/exit_abrupt.txt
28-
:start-after: default-domain:: mongodb
100+
.. symbol: EXIT_NET_ERROR = 48
29101

30-
.. include:: /reference/exit-codes/exit_ntservice_error.txt
31-
:start-after: default-domain:: mongodb
102+
.. error:: 49
32103

33-
.. include:: /reference/exit-codes/exit_fs.txt
34-
:start-after: default-domain:: mongodb
104+
Returned by :program:`mongod.exe` or :program:`mongos.exe` on Windows
105+
when either receives a shutdown message from the
106+
:guilabel:`Windows Service Control Manager`.
35107

36-
.. include:: /reference/exit-codes/exit_clock_skew.txt
37-
:start-after: default-domain:: mongodb
108+
.. symbol: EXIT_WINDOWS_SERVICE_STOP 49
38109

39-
.. include:: /reference/exit-codes/exit_net_error.txt
40-
:start-after: default-domain:: mongodb
110+
.. error:: 100
41111

42-
.. include:: /reference/exit-codes/exit_windows_service_stop.txt
43-
:start-after: default-domain:: mongodb
112+
Returned by :program:`mongod` when the process throws an uncaught exception.
44113

45-
.. include:: /reference/exit-codes/exit_uncaught.txt
46-
:start-after: default-domain:: mongodb
114+
.. symbol: EXIT_UNCAUGHT = 100

source/reference/exit-codes/exit_abrupt.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

source/reference/exit-codes/exit_bad_options.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

source/reference/exit-codes/exit_clean.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

source/reference/exit-codes/exit_clock_skew.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

source/reference/exit-codes/exit_fs.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

source/reference/exit-codes/exit_kill.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

source/reference/exit-codes/exit_need_upgrade.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

source/reference/exit-codes/exit_net_error.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

source/reference/exit-codes/exit_ntservice_error.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

source/reference/exit-codes/exit_replication_error.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

source/reference/exit-codes/exit_sharding_error.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

source/reference/exit-codes/exit_uncaught.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

source/reference/exit-codes/exit_windows_service_stop.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)