> This page location: /docs.md > /docs/management.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Exit Codes and Statuses for a Self-Managed Deployment

MongoDB will return one of the following codes and statuses when exiting. Use this guide to interpret logs and when troubleshooting issues with [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) and [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances.

| Code | Cause |
| --- | --- |
|  | Returned by MongoDB applications upon successful exit. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) as a generic failure when no other error codes apply. |
|  | The specified options are in error or are incompatible with other options. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) if there is a mismatch between hostnames specified on the command line and in the `local.sources` collection when running a replica set. |
|  | The version of the database is different from the version supported by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) (or [`mongod.exe`](https://www.mongodb.com/docs/manual/reference/program/mongod.exe.md#mongodb-binary-bin.mongod.exe)) instance.  The instance exits cleanly. |
|  | Returned by [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) if a problem is encountered during initialization. |
|  | Returned by the [`mongod.exe`](https://www.mongodb.com/docs/manual/reference/program/mongod.exe.md#mongodb-binary-bin.mongod.exe) process on Windows when it receives a Control-C, Close, Break or Shutdown event. |
|  | Returned by MongoDB applications which encounter an unrecoverable error, an uncaught exception or uncaught signal. The system exits without performing a clean shutdown. |
|  | *Message:* `ERROR: wsastartup failed <reason>` Returned by MongoDB applications on Windows following an error in the WSAStartup function, used to initialize the networking subsystem. *Message:* `NT Service Error` Returned by MongoDB applications for Windows due to failures installing, starting or removing the NT Service for the application. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) when an error prevents a newly started instance from listening for incoming connections. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) during server initialization if it fails to fork the process. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) during server initialization if the daemon fails to send a ready signal. The process exits cleanly. |
|  | Returned by the [Storage Node Watchdog](https://www.mongodb.com/docs/manual/administration/monitoring.md#std-label-storage-node-watchdog) if any of the filesystems with monitored directories are unresponsive. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) when the datafiles in [`--dbpath`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--dbpath) are incompatible with the version of [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) currently running. To resolve data incompatibility issues after upgrading, refer to the release notes for your version of MongoDB and search for "Compatibility Changes." |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) when the process health check triggers a crash. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) when the process throws an uncaught exception. |
|  | Returned by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) when the process fails to rotate audit logs on startup. |
