# How to Fix a Minecraft Server That Won't Start (/docs/minecraft/fix-server-wont-start)



import { Step, Steps } from 'fumadocs-ui/components/steps';

When a Minecraft server refuses to start, the **first error in the Console** almost always tells you exactly what's wrong. Most startup failures fall into one of seven categories: EULA, Java version, RAM, mods/plugins, corrupted JAR, world corruption, or port conflict.

> **The golden rule of Minecraft troubleshooting:** Read the *first* error in the Console, not the last. Later errors are usually side effects of the first.

Diagnostic Flow [#diagnostic-flow]

<Steps>
  <Step>
    Open Console and read the first error [#open-console-and-read-the-first-error]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), open **Console**. Scroll to the start of the latest startup attempt. Look for the **first** line containing `ERROR`, `Exception`, `FATAL`, or `Failed`.
  </Step>

  <Step>
    Match the error to the table below [#match-the-error-to-the-table-below]

    Use this table to identify the cause and jump to the fix.
  </Step>
</Steps>

Errors and Fixes [#errors-and-fixes]

You need to agree to the EULA [#you-need-to-agree-to-the-eula]

Minecraft requires you to accept Mojang's EULA before the server runs.

**Fix:** Open **Files**, edit `eula.txt`, change `eula=false` to `eula=true`, save, and restart. See [Accept the EULA](/docs/minecraft/agree-to-eula).

UnsupportedClassVersionError or has been compiled by a more recent version of the Java Runtime [#unsupportedclassversionerror-or-has-been-compiled-by-a-more-recent-version-of-the-java-runtime]

Your server JAR was built for a newer Java than the one running it.

| Minecraft version | Required Java |
| ----------------- | ------------- |
| 1.20.5 and newer  | Java 21+      |
| 1.18 – 1.20.4     | Java 17+      |
| 1.17              | Java 16+      |
| 1.13 – 1.16       | Java 8 or 11  |
| 1.12 and older    | Java 8        |

**Fix:** Open **Startup** in the panel and select the matching Java version (or Docker image). See [Java Version](/docs/minecraft/java-version).

OutOfMemoryError / Java heap space / Exit code 137 [#outofmemoryerror--java-heap-space--exit-code-137]

The server ran out of allocated RAM.

**Fix:** Open **Startup** and increase memory. See [How Much RAM](/docs/minecraft/how-much-ram). Also check for memory leaks: a 4GB server hitting OOM with 5 players probably has a runaway entity or chunk loader. See [Optimize Server](/docs/minecraft/optimize-server).

Address already in use [#address-already-in-use]

Another process is using the port.

**Fix:** Rare on hosted servers. Restart the server from the Dashboard. If it persists, contact support — the previous process may not have released the port.

Crash on plugin or mod load (NoClassDefFoundError, ClassCastException, NoSuchMethodError) [#crash-on-plugin-or-mod-load-noclassdeffounderror-classcastexception-nosuchmethoderror]

A plugin or mod is incompatible with your Minecraft version, your server software, or another mod.

**Fix:** The error trace usually names the offending plugin/mod. Remove the most recently added file from `plugins/` or `mods/` and try starting again. See [Find / Read Crash Reports](/docs/minecraft/find-read-crash-reports).

Session lock / level.dat is missing / chunk loading failed [#session-lock--leveldat-is-missing--chunk-loading-failed]

World file corruption — usually from an unclean shutdown.

**Fix options (in order):**

1. Delete `world/session.lock` (safe — it's a lock file, gets recreated)
2. Restore from **Backups** in the panel
3. Replace `level.dat` with `level.dat_old` from the world folder
4. Use an offline world editor (NBTExplorer) to inspect

See [Fix: Session Lock](/docs/minecraft/fix-session-lock).

Failed to start the minecraft server / Exit code 1 with no obvious error [#failed-to-start-the-minecraft-server--exit-code-1-with-no-obvious-error]

The JAR may be corrupted or incomplete.

**Fix:** From the panel **Settings**, click **Reinstall Server**. This re-downloads the server JAR. Your world and configs are preserved.

Exception in server tick loop [#exception-in-server-tick-loop]

The server started, then crashed during the first tick. Usually a bad world chunk, bad NBT data, or a broken plugin.

**Fix:** See [Fix: Server Tick Loop](/docs/minecraft/fix-server-tick-loop).

Java Exit Codes [#java-exit-codes]

| Exit code | Meaning                                          |
| --------- | ------------------------------------------------ |
| `0`       | Clean shutdown                                   |
| `1`       | General error — read the Console                 |
| `137`     | Out of memory (OOM kill) — increase RAM          |
| `139`     | Segfault — usually JNI/native lib bug            |
| `143`     | Server received SIGTERM (manual stop or timeout) |

Full reference: [Java Exit Codes](/docs/minecraft/fix-java-exit-codes).

Diagnostic Checklist [#diagnostic-checklist]

Run through this in order — each step rules out one common cause:

1. ✅ **EULA** accepted? (`eula.txt` → `eula=true`)
2. ✅ **Java version** matches Minecraft version? (Startup tab)
3. ✅ **RAM** sufficient? (no exit 137 in history)
4. ✅ **No new mods/plugins** added since last working start? (remove and retry)
5. ✅ **JAR not corrupted**? (Reinstall Server)
6. ✅ **World not corrupted**? (delete session.lock, restore backup)
7. ✅ **Console first error read**? (not just the last line)

If all 7 pass and the server still won't start, open a support ticket with the **full Console log** from the failed attempt.

Common Mistakes [#common-mistakes]

| Mistake                                      | Fix                                                    |
| -------------------------------------------- | ------------------------------------------------------ |
| Reading only the last error                  | Read the **first** error — later ones are side effects |
| Reinstalling the server (loses configs)      | Reinstall is safe — keeps world and configs by default |
| Deleting `world/` to "fix" startup           | Almost never the problem — and you lose everything     |
| Ignoring the Java version warning            | Wrong Java is the #2 cause of startup failures         |
| Restarting in a loop without reading Console | Each crash leaves the same error — read it once        |

Related Guides [#related-guides]

* [Find / Read Crash Reports](/docs/minecraft/find-read-crash-reports)
* [Java Exit Codes](/docs/minecraft/fix-java-exit-codes)
* [Java Version](/docs/minecraft/java-version)
* [How Much RAM](/docs/minecraft/how-much-ram)
* [Accept the EULA](/docs/minecraft/agree-to-eula)
* [Server Tick Loop](/docs/minecraft/fix-server-tick-loop)
* [Session Lock](/docs/minecraft/fix-session-lock)
* [Common Issues](/docs/minecraft/common-issues)
