diff --git a/source/reference/exit-codes.txt b/source/reference/exit-codes.txt new file mode 100644 index 00000000000..40eed34b71f --- /dev/null +++ b/source/reference/exit-codes.txt @@ -0,0 +1,46 @@ +:orphan: + +============================ +MongoDB Exit and Error Codes +============================ + +.. default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_clean.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_bad_options.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_replication_error.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_need_upgrade.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_sharding_error.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_kill.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_abrupt.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_ntservice_error.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_fs.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_clock_skew.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_net_error.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_windows_service_stop.txt + :start-after: default-domain:: mongodb + +.. include:: /reference/exit-codes/exit_uncaught.txt + :start-after: default-domain:: mongodb diff --git a/source/reference/exit-codes/exit_abrupt.txt b/source/reference/exit-codes/exit_abrupt.txt new file mode 100644 index 00000000000..aebe32cc451 --- /dev/null +++ b/source/reference/exit-codes/exit_abrupt.txt @@ -0,0 +1,20 @@ +:orphan: + +============== +14 Abrupt Exit +============== + +.. default-domain:: mongodb + +.. error:: 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. + +.. symbol: EXIT_ABRUPT = 14 +.. mongo/src/mongo/client/mongo_client_lib.cpp +.. mongo/src/mongo/db/db.cpp +.. mongo/src/mongo/s/server.cpp +.. mongo/src/mongo/util/exit_code.h +.. mongo/src/mongo/util/signal_handlers.cpp diff --git a/source/reference/exit-codes/exit_bad_options.txt b/source/reference/exit-codes/exit_bad_options.txt new file mode 100644 index 00000000000..0614f53d15f --- /dev/null +++ b/source/reference/exit-codes/exit_bad_options.txt @@ -0,0 +1,22 @@ +:orphan: + +======================== +2 Bad Options +======================== + +.. default-domain:: mongodb + +.. error:: 2 + + The specified options are in error or are incompatible + with other options. + +.. symbol: EXIT_BADOPTIONS 2 + +.. /Users/epc/Documents/github/epc/mongo/src/mongo/db/db.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/db/repl.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/dbtests/framework.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/s/config.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/shell/dbshell.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/tools/tool.cpp +.. /Users/epc/Documents/github/epc/mongo/src/mongo/util/ntservice.cpp diff --git a/source/reference/exit-codes/exit_clean.txt b/source/reference/exit-codes/exit_clean.txt new file mode 100644 index 00000000000..e6fc9fd5605 --- /dev/null +++ b/source/reference/exit-codes/exit_clean.txt @@ -0,0 +1,21 @@ +:orphan: + +============ +0 Clean exit +============ + +.. default-domain:: mongodb + +.. error:: 0 + + Returned by MongoDB applications upon successful exit. + +.. symbol: EXIT_CLEAN +.. ./src/mongo/db/db.cpp +.. ./src/mongo/db/dbcommands_generic.cpp +.. ./src/mongo/dbtests/framework.cpp +.. ./src/mongo/s/server.cpp +.. ./src/mongo/shell/dbshell.cpp +.. ./src/mongo/tools/restore.cpp +.. ./src/mongo/tools/tool.cpp +.. ./src/mongo/util/ntservice.cpp diff --git a/source/reference/exit-codes/exit_clock_skew.txt b/source/reference/exit-codes/exit_clock_skew.txt new file mode 100644 index 00000000000..1ea0a7e812e --- /dev/null +++ b/source/reference/exit-codes/exit_clock_skew.txt @@ -0,0 +1,15 @@ +:orphan: + +=============== +47 Clock Skewed +=============== + +.. default-domain:: mongodb + +.. error:: 47 + + MongoDB applications exit cleanly if a large clock skew (32768 + milliseconds) occurs. + +.. symbol: EXIT_CLOCK_SKEW +.. mongo/src/mongo/db/db.cpp diff --git a/source/reference/exit-codes/exit_fs.txt b/source/reference/exit-codes/exit_fs.txt new file mode 100644 index 00000000000..aa70dee554e --- /dev/null +++ b/source/reference/exit-codes/exit_fs.txt @@ -0,0 +1,16 @@ +:orphan: + +=================== +45 Cannot open file +=================== + +.. default-domain:: mongodb + +.. error:: 45 + + Returned when a MongoDB application cannot open a file or cannot + obtain a lock on a file. + +.. Symbol: EXIT_FS +.. found-in: mongo/db/namespace_details.cpp:192 +.. found-in: mongo/tools/tool.cpp:238 diff --git a/source/reference/exit-codes/exit_kill.txt b/source/reference/exit-codes/exit_kill.txt new file mode 100644 index 00000000000..3d8352d8003 --- /dev/null +++ b/source/reference/exit-codes/exit_kill.txt @@ -0,0 +1,15 @@ +:orphan: + +=================== +12 Killed (Windows) +=================== + +.. default-domain:: mongodb + +.. error: 12 + + Returned by the :program:`mongod.exe` process on Windows when it + receives a Control-C, Close, Break or Shutdown event. + +.. symbol: EXIT_KILL = 12 +.. mongo/src/mongo/db/db.cpp diff --git a/source/reference/exit-codes/exit_need_upgrade.txt b/source/reference/exit-codes/exit_need_upgrade.txt new file mode 100644 index 00000000000..0a6b24a30f9 --- /dev/null +++ b/source/reference/exit-codes/exit_need_upgrade.txt @@ -0,0 +1,19 @@ +:orphan: + +================================ +4 Database Format Upgrade Needed +================================ + +.. default-domain:: mongodb + +.. 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 ` option to upgrade the + database to the version supported by this :program:`mongod` + instance. + +.. symbol: EXIT_NEED_UPGRADE = 4 +.. mongo/src/mongo/db/db.cpp diff --git a/source/reference/exit-codes/exit_net_error.txt b/source/reference/exit-codes/exit_net_error.txt new file mode 100644 index 00000000000..d0dfc872240 --- /dev/null +++ b/source/reference/exit-codes/exit_net_error.txt @@ -0,0 +1,16 @@ +:orphan: + +================ +48 Network Error +================ + +.. default-domain:: mongodb + +.. error:: 48 + + :program:`mongod` exits cleanly if the server socket is closed (either + `27017` or the port specified with :option:`--port `). + +.. symbol: EXIT_NET_ERROR = 48 +.. mongo/src/mongo/s/server.cpp +.. mongo/src/mongo/db/db.cpp diff --git a/source/reference/exit-codes/exit_ntservice_error.txt b/source/reference/exit-codes/exit_ntservice_error.txt new file mode 100644 index 00000000000..3c73406768d --- /dev/null +++ b/source/reference/exit-codes/exit_ntservice_error.txt @@ -0,0 +1,21 @@ +:orphan: + +============================== +20 NT Service Errors (Windows) +============================== + +.. default-domain:: mongodb + +.. error:: 20 ERROR: wsastartup failed _reason_ + + Returned by MongoDB applications on Windows due to an error in the + WSAStartup function. + +.. error:: 20 NT Service Error + + Returned by MongoDB applications for Windows due to failures installing, + starting or removing the NT Service for the application. + +.. symbol: EXIT_NTSERVICE_ERROR = 20 +.. mongo/src/mongo/util/net/sock.cpp +.. mongo/src/mongo/util/ntservice.cpp diff --git a/source/reference/exit-codes/exit_replication_error.txt b/source/reference/exit-codes/exit_replication_error.txt new file mode 100644 index 00000000000..d9076118f65 --- /dev/null +++ b/source/reference/exit-codes/exit_replication_error.txt @@ -0,0 +1,17 @@ +:orphan: + +=================== +3 Replication Error +=================== + +.. default-domain:: mongodb + +.. error:: 3 + + Returned by :program:`mongod` if there is a mismatch between hostnames + specified on the command line and in the :data:`local.sources` collection or + if the local :term:`oplog` collection cannot be read. + +.. symbol: EXIT_REPLICATION_ERROR = 3 +.. mongo/src/mongo/db/repl.cpp +.. mongo/src/mongo/db/repl/rs.cpp diff --git a/source/reference/exit-codes/exit_sharding_error.txt b/source/reference/exit-codes/exit_sharding_error.txt new file mode 100644 index 00000000000..895651fa957 --- /dev/null +++ b/source/reference/exit-codes/exit_sharding_error.txt @@ -0,0 +1,15 @@ +:orphan: + +================ +5 Sharding Error +================ + +.. default-domain:: mongodb + +.. error:: 5 + + Returned by :program:`mongod` if a :dbcommand:`moveChunk` operation + fails to confirm a commit. + +.. symbol: EXIT_SHARDING_ERROR = 5 +.. mongo/src/mongo/s/d_migrate.cpp diff --git a/source/reference/exit-codes/exit_uncaught.txt b/source/reference/exit-codes/exit_uncaught.txt new file mode 100644 index 00000000000..10b388d8a4b --- /dev/null +++ b/source/reference/exit-codes/exit_uncaught.txt @@ -0,0 +1,15 @@ +:orphan: + +====================== +100 Uncaught Exception +====================== + +.. default-domain:: mongodb + +.. error:: 100 + + Returned by :program:`mongod` when an uncaught exception is thrown. + +.. symbol: EXIT_UNCAUGHT = 100 +.. mongo/src/mongo/util/net/message_server_port.cpp +.. mongo/src/mongo/db/db.cpp diff --git a/source/reference/exit-codes/exit_windows_service_stop.txt b/source/reference/exit-codes/exit_windows_service_stop.txt new file mode 100644 index 00000000000..f12cd86d651 --- /dev/null +++ b/source/reference/exit-codes/exit_windows_service_stop.txt @@ -0,0 +1,18 @@ +:orphan: + +======================= +49 Windows Service Stop +======================= + +.. default-domain:: mongodb + +.. error:: 49 + + Returned by :program:`mongod.exe` or :program:`mongos.exe` on Windows + when either receives a shutdown message from the + Windows Service Control Manager. + +.. mongo/src/mongo/util/ntservice.cpp +.. mongo/src/mongo/s/server.cpp + +.. symbol: EXIT_WINDOWS_SERVICE_STOP 49