Skip to content
Merged
Show file tree
Hide file tree
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: 46 additions & 0 deletions source/reference/exit-codes.txt
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions source/reference/exit-codes/exit_abrupt.txt
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions source/reference/exit-codes/exit_bad_options.txt
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions source/reference/exit-codes/exit_clean.txt
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions source/reference/exit-codes/exit_clock_skew.txt
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions source/reference/exit-codes/exit_fs.txt
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions source/reference/exit-codes/exit_kill.txt
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions source/reference/exit-codes/exit_need_upgrade.txt
Original file line number Diff line number Diff line change
@@ -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 <mongod --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
16 changes: 16 additions & 0 deletions source/reference/exit-codes/exit_net_error.txt
Original file line number Diff line number Diff line change
@@ -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 <mongod --port>`).

.. symbol: EXIT_NET_ERROR = 48
.. mongo/src/mongo/s/server.cpp
.. mongo/src/mongo/db/db.cpp
21 changes: 21 additions & 0 deletions source/reference/exit-codes/exit_ntservice_error.txt
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions source/reference/exit-codes/exit_replication_error.txt
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions source/reference/exit-codes/exit_sharding_error.txt
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions source/reference/exit-codes/exit_uncaught.txt
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions source/reference/exit-codes/exit_windows_service_stop.txt
Original file line number Diff line number Diff line change
@@ -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