Troubleshooting Java Error Exit Codes

Reference for common Java exit codes and what they mean for your Minecraft server.

When your server crashes, it exits with a numeric code. This code helps identify the cause of the crash.

Common Exit Codes

Exit CodeMeaningCommon CauseFix
0Normal shutdownServer stopped gracefullyNot an error
1General errorPlugin/mod error, config issueCheck Console for the error message
137Out of Memory (OOM)Server ran out of RAMIncrease RAM in Startup, use Aikar's Flags
143SIGTERMServer was forcefully stoppedNormal when stopping from panel
-1Unknown errorVarious causesCheck Console and crash reports
127Command not foundMissing Java installationCheck Java version in Startup
255General failureVariousCheck Console for details

Exit Code 137 (Most Common)

This is the most frequent crash code. The server ran out of memory and was killed by the system.

Fixes:

  1. Increase RAM allocation in Startup
  2. Apply Aikar's Flags for better memory management
  3. Reduce view distance and simulation distance
  4. Remove heavy plugins/mods
  5. Install Spark and check /spark health for memory usage

Exit Code 1

This means the server encountered an error during startup or operation.

Fixes:

  1. Check Console for the first error message (not the last)
  2. If you recently added a plugin/mod, try removing it
  3. Check for YAML errors in config files
  4. Verify Java version compatibility

💡 Tip: The exit code alone isn't always enough — always check Console output and crash reports for the actual error message.

See also: Server Won't Start | How Much RAM

If you need help, join our Discord.

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page