---
description: You can find common issues listed here
---

# Common Issues

***

## 1. Minecraft Authentication Issues

**Error Messages:**

```
Failed to verify username!
Failed to authenticate user: Invalid session (Try restarting your game and the launcher)  
```

**Explanation:**\
This error occurs when a Minecraft server is running in **online mode**, which requires players to have a valid **Minecraft: Java Edition** account purchased from Mojang/Microsoft. If a user does not own an official copy of the game or the authentication servers are temporarily down, they will not be able to join.

**Solution:**\
If you want to allow players without an official Minecraft account (cracked clients) to join your server, you must disable online authentication.

1. **Locate `server.properties` File:**
   * Navigate to your server’s root folder.
   * Find the file named `server.properties`.
2. **Modify Online Mode Setting:**
   * Open `server.properties` with a text editor.
   *   Find the line:

       ```
       online-mode=true
       ```
   *   Change it to:

       ```
       online-mode=false
       ```
3. **Save and Restart the Server:**
   * Save the file.
   * Restart your server for the changes to take effect.

{% hint style="danger" %}
Disabling **online mode** allows players with non-premium accounts to join but **disables Mojang’s authentication system**, making your server more vulnerable to impersonation and security risks. To improve security, consider installing plugins like **FastLogin** or **AuthMe** to require password authentication for players.
{% endhint %}

## **2. Java Issues**

**Console Message**:

```
Error: A JNI error has occurred, please check your installation and try again.
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/MinecraftServer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
```

or the following message immediatelly after starting the server:

```
The server either closed or crashed...
The server will restart after the countdown, please close this window to stop the server completely.
```

**Explanation**:\
This error means that the Minecraft server requires a newer version of Java, typically **Java 21** for Minecraft 1.21 and above, but your system is running an older version like Java 8 or Java 11.

**Solution** (for Windows):

1. **Download Java 21**:
   * Go to the [Oracle Java SE Downloads](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html) and download the **Windows Installer** for **Java 21**.
2. **Install Java**:
   * Run the installer and follow the prompts to install Java 21 on your system.
3. **Verify Java Version**:
   *   Open **Command Prompt** and type:

       ```bash
       java -version
       ```

       It should return something like `java version "21.0.x"`.

***

## **3. Insufficient Resources**

**Console Message**:

```
[17:22:31 ERROR]: Exception in server tick loop
java.lang.OutOfMemoryError: Java heap space
    at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:721)
    at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:305)
    ...
```

**Explanation**:\
This error occurs when the server doesn’t have enough RAM to function. By default, the server may allocate only 1GB of RAM, which is insufficient for larger servers, modded worlds, or multiple players.

**Solution** (for Windows):

1. **Modify the Server Startup Script**:
   * Open the **start.bat** file (or create one if it doesn’t exist) in your server folder.
   *   Edit the file to allocate more memory by changing the `-Xmx` and `-Xms` parameters:

       ```bat
       java -Xmx4G -Xms2G -jar server.jar
       ```

       Here, `-Xmx4G` sets the maximum RAM to 4GB, and `-Xms2G` sets the initial allocated RAM to 2GB.
2. **Ensure Sufficient System Memory**:
   * Right-click **This PC** > **Properties** and check how much RAM your system has. Make sure the server’s allocated RAM doesn’t exceed your system's total available memory.
3. **Command Line Check**:
   *   If the server still crashes, open **Command Prompt** and run:

       ```bash
       tasklist | findstr java
       ```

       This will show how much memory the Minecraft server is using in real time.

***

## **4. Port Already in Use**

**Console Message**:

```
[17:22:31] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[17:22:31] [Server thread/WARN]: The exception was: java.net.BindException: Address already in use: bind
[17:22:31] [Server thread/WARN]: Perhaps a server is already running on that port?
```

**Explanation**:\
This error means that another application (or another Minecraft server instance) is already using the default server port (**25565**). A port can only be used by one process at a time.

**Solution** (for Windows):

1. **Check for Other Processes Using the Port**:
   *   Open **Command Prompt** as Administrator and run the following command to see if any process is using port 25565:

       ```bash
       netstat -aon | findstr :25565
       ```

       This will list any processes using port 25565. The last number is the **PID** (Process ID).
2. **Terminate the Conflicting Process**:
   *   If a process is using the port, find it by running:

       ```bash
       tasklist | findstr <PID>
       ```
   *   Terminate the process by running:

       ```bash
       taskkill /F /PID <PID>
       ```
3. **Change the Server Port**:
   *   If you cannot free up port 25565, open the `server.properties` file and change:

       ```properties
       server-port=25566
       ```
   * Save the file and restart the server.

***

## **5. Firewall or Network Issues**

**Console Message**:

```
[17:22:31 INFO]: /192.168.1.101:54321 lost connection: Timed out
```

**Explanation**:\
This error means that a player was unable to connect to your server. It could be due to your firewall blocking connections or incorrect port forwarding. On a local machine, firewalls sometimes block external traffic from reaching the server.

**Solution** (for Windows):

1. **Allow Minecraft Server Through Windows Firewall**:
   * Open **Control Panel** > **System and Security** > **Windows Defender Firewall** > **Allow an app or feature through Windows Defender Firewall**.
   * Find `javaw.exe` in the list and ensure it's allowed for both **Private** and **Public** networks. If it's not there:
     * Click **Allow another app** > **Browse** > navigate to your Java installation folder (`C:\Program Files\Java\jdk-21.x.x\bin`) and select `javaw.exe`.
2. **Port Forwarding** (for home routers):
   * Open your router settings (usually accessed via a browser at `192.168.1.1`).
   * Go to **Port Forwarding** settings and forward port **25565** (or whichever port your server uses) to your machine’s local IP (e.g., `192.168.1.101`).
   * Set both **TCP** and **UDP** protocols for this port.
3. **Verify Your Public IP**:
   * If you are hosting the server on a home network and allowing external players, provide them with your **public IP**. You can check your public IP by visiting [WhatIsMyIP](https://www.whatismyip.com).

***

## **6. Incorrect EULA**

**Console Message**:

```
[17:22:31 INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
```

**Explanation**:\
The Minecraft server requires you to accept the **End User License Agreement (EULA)** before it can start. If `eula=false` in the `eula.txt` file, the server won’t run.

**Solution** (for Windows):

1. Open the `eula.txt` file in the server directory using **Notepad**.
2.  Change the line:

    ```properties
    eula=false
    ```

    to:

    ```properties
    eula=true
    ```
3. Save the file and restart the server.

***

Sure! Here’s the updated guide with additional sections covering **Minecraft plugin errors** and **general Minecraft server errors** that often occur with plugins or mods.

***

## **7. Plugin Errors**

### **7.1. Incompatible Plugin Version**

**Console Message**:

```
[17:22:31 ERROR]: Could not load 'plugins/WorldEdit.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.20
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:132)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:398)
    ...
```

**Explanation**:\
This error occurs when a plugin is designed for a different version of Minecraft than the server is running. For example, the server might be running **Minecraft 1.18**, but the plugin was made for **Minecraft 1.20**.

**Solution** (for Windows):

1. **Check Plugin Compatibility**:
   * Go to the plugin’s page (usually on sites like [SpigotMC](https://www.spigotmc.org) or [Bukkit](https://dev.bukkit.org)) and verify which Minecraft versions the plugin supports.
2. **Download the Correct Version**:
   * If an older or newer version of the plugin is available for your Minecraft version, download that version and place it in the `plugins` folder.
3. **Update the Server**:
   * If you prefer to use the newer plugin version, consider updating your server to match the plugin’s version. Always ensure your plugins and server are compatible.

***

### **7.2. Missing Dependencies**

**Console Message**:

```
[17:22:31 ERROR]: Could not load 'plugins/EssentialsX.jar' in folder 'plugins'
org.bukkit.plugin.UnknownDependencyException: Vault
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:219)
    ...
```

**Explanation**:\
This error occurs when a plugin requires another plugin (known as a **dependency**) to function, but the dependency is not installed. In this example, the **EssentialsX** plugin requires **Vault** to be installed.

**Solution** (for Windows):

1. **Identify the Missing Dependency**:
   * Check the error log to find out which dependency is missing (e.g., Vault in the above error).
2. **Download the Dependency**:
   * Go to the plugin repository (e.g., [Vault](https://www.spigotmc.org/resources/vault.34315/)) and download the latest compatible version of the missing plugin.
3. **Install the Dependency**:
   * Place the downloaded plugin in the `plugins` folder.
   * Restart your server to load the new dependency.
4. **Check Plugin Documentation**:
   * Some plugins require additional configuration or dependencies. Always review the plugin’s official documentation to ensure all necessary dependencies are installed.

***

### **7.3. Plugin Configuration Error**

**Console Message**:

```
[17:22:31 ERROR]: Could not pass event PlayerJoinEvent to MyPlugin v1.0
org.bukkit.event.EventException: null
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72)
    ...
Caused by: java.lang.NullPointerException
    at myplugin.MyPlugin.onPlayerJoin(MyPlugin.java:42)
    ...
```

**Explanation**:\
This error occurs when a plugin encounters an issue during runtime, often due to an incorrect configuration file, missing settings, or a code issue within the plugin itself.

**Solution** (for Windows):

1. **Check the Plugin’s Configuration**:
   * Open the plugin's configuration file (usually located in the `plugins/<plugin_name>` folder).
   * Look for any errors, missing fields, or invalid values.
2. **Revert to Default Config**:
   * If you’re unsure about the correct settings, delete the configuration file and restart the server. The plugin will generate a fresh default configuration file.
3. **Check for Plugin Updates**:
   * If the error persists, visit the plugin’s page and check if there’s an update or patch that fixes the issue.
4. **Report the Issue**:
   * If it seems like a plugin bug, report the error to the plugin developer, providing the error message and steps to reproduce.

***

## **8. General Minecraft Errors**

### **8.1. Corrupted World Files**

**Console Message**:

```
[17:22:31 WARN]: Chunk file at 45, 12 is in the wrong location; relocating. (Expected 45, 12, got 44, 11)
[17:22:31 ERROR]: Couldn't load chunk at 45, 12
java.io.IOException: Corrupted world data
    at net.minecraft.server.level.chunk.ChunkProvider.load(ChunkProvider.java:421)
    ...
```

**Explanation**:\
This error occurs when one or more chunks in your Minecraft world become corrupted, often due to improper shutdowns, crashes, or disk errors. The server can’t read the chunk data properly, which can cause issues when loading the world.

**Solution** (for Windows):

1. **Backup Your World**:
   * Before trying to fix the issue, make a backup of your world folder by copying it to a safe location.
2. **Use MCEdit to Repair**:
   * Download and install **MCEdit** (a world editing tool for Minecraft).
   * Open your world in MCEdit and locate the corrupted chunk. Delete or repair the chunk, and save the world.
3. **Delete the Corrupted Region File**:
   * Minecraft worlds are divided into **region files**, each containing a large set of chunks. Find the region file corresponding to the corrupted chunk and delete it. The server will regenerate it automatically:
     * World region files are located in `world/region/` and have names like `r.x.z.mca`. Use an online tool like [ChunkBase](https://www.chunkbase.com) to find the region containing the corrupted chunk.
4. **Restore From Backup**:
   * If repairing doesn’t work, restore the world from a previous backup before the corruption occurred.

### **8.2. Corrupted Server Files**

**Console Message**:

```
[17:22:31 ERROR]: Failed to load properties from file: server.properties
java.io.FileNotFoundException: server.properties (The system cannot find the file specified)
```

**Explanation**:\
This error occurs when the **server.properties** file is missing or corrupted. This file controls many of the server’s settings, such as world name, game mode, and server port.

**Solution** (for Windows):

1. **Recreate the `server.properties` File**:
   * If the file is missing, you can manually create a new `server.properties` file in the server folder. Use a basic text editor like Notepad and input the default settings. Alternatively, starting the server without a `server.properties` file should automatically generate a new one.
2. **Verify File Integrity**:
   * If the file is corrupted, open the file and inspect it for any unusual characters or missing lines. You can also compare it with the default `server.properties` configuration from the Minecraft wiki or re-download it from the official Minecraft server files.

***

### **8.3. "Internal Server Error" on Player Join**

**Console Message**:

```
[17:22:31 ERROR]: Player lost connection: Internal Server Error
java.lang.NullPointerException: Cannot invoke "net.minecraft.server.level.EntityPlayer.d()" because "<parameter>" is null
```

**Explanation**:\
This error often occurs when a player tries to join a server that has an issue with plugins, mods, or corrupted player data, resulting in the server disconnecting them due to an internal error.

**Solution** (for Windows):

1. **Check for Plugin or Mod Conflicts**:
   * Disable any newly installed or recently updated plugins or mods. You can do this by temporarily moving them out of the `plugins` or `mods` folder and restarting the server to see if the issue is resolved.
2. **Clear Player Data**:
   * If the issue seems specific to a player, you can reset that player’s data by deleting their player data file from the `world/playerdata/` folder. Be sure to make a backup of this file before deleting it.
3. **Review Logs**:
   * Check the server logs in the `logs/latest.log` file for more detailed information about what caused the error.

***

{% content-ref url="common-issues/further-assistance" %}
[further-assistance](common-issues/further-assistance)
{% endcontent-ref %}
