|
1 |
| -:orphan: |
2 |
| - |
3 |
| -============================ |
4 |
| -MongoDB Exit and Error Codes |
5 |
| -============================ |
| 1 | +======================= |
| 2 | +Exit Codes and Statuses |
| 3 | +======================= |
6 | 4 |
|
7 | 5 | .. default-domain:: mongodb
|
8 | 6 |
|
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 |
11 | 86 |
|
12 |
| -.. include:: /reference/exit-codes/exit_bad_options.txt |
13 |
| - :start-after: default-domain:: mongodb |
| 87 | +.. error:: 47 |
14 | 88 |
|
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. |
17 | 91 |
|
18 |
| -.. include:: /reference/exit-codes/exit_need_upgrade.txt |
19 |
| - :start-after: default-domain:: mongodb |
| 92 | + .. symbol: EXIT_CLOCK_SKEW |
20 | 93 |
|
21 |
| -.. include:: /reference/exit-codes/exit_sharding_error.txt |
22 |
| - :start-after: default-domain:: mongodb |
| 94 | +.. error:: 48 |
23 | 95 |
|
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. |
26 | 99 |
|
27 |
| -.. include:: /reference/exit-codes/exit_abrupt.txt |
28 |
| - :start-after: default-domain:: mongodb |
| 100 | + .. symbol: EXIT_NET_ERROR = 48 |
29 | 101 |
|
30 |
| -.. include:: /reference/exit-codes/exit_ntservice_error.txt |
31 |
| - :start-after: default-domain:: mongodb |
| 102 | +.. error:: 49 |
32 | 103 |
|
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`. |
35 | 107 |
|
36 |
| -.. include:: /reference/exit-codes/exit_clock_skew.txt |
37 |
| - :start-after: default-domain:: mongodb |
| 108 | + .. symbol: EXIT_WINDOWS_SERVICE_STOP 49 |
38 | 109 |
|
39 |
| -.. include:: /reference/exit-codes/exit_net_error.txt |
40 |
| - :start-after: default-domain:: mongodb |
| 110 | +.. error:: 100 |
41 | 111 |
|
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. |
44 | 113 |
|
45 |
| -.. include:: /reference/exit-codes/exit_uncaught.txt |
46 |
| - :start-after: default-domain:: mongodb |
| 114 | + .. symbol: EXIT_UNCAUGHT = 100 |
0 commit comments