Are you getting a “Failed to connect to the server” error in Minecraft?
Here’s the second part of the error, “Failed to log in: Invalid session”.
Followed by, “Try restarting your game and the launcher”.
The error usually occurs in the Java Edition of Minecraft when you try to connect to a server.
It can happen on multiple servers—Hypixel, Mineplex, Brawl, and others.
In this guide, you’ll learn how to fix the “Failed to connect to the server” error in Minecraft (Java or Bedrock edition).
- Why did I fail to connect to a Minecraft server?
- How to fix “Failed to connect to the server” in Minecraft
Why did I fail to connect to a Minecraft server?
You failed to connect to a Minecraft server because you might have started two instances of Minecraft and the old session ID is invalidated.
It can also happen because you’re using a cracked version of the game like TLauncher.
This is because most Minecraft servers do not allow cracked players to join them.
If you’re the server owner and you’ve set “online-mode” to “true” in your server’s properties, it can also cause connection issues,
Otherwise, there’s a technical issue on Mojang’s/Microsoft’s end that needs to be fixed.
In May, the “Failed to connect to the server” error is a known bug in the Mojang Studios Official Issue Tracker website.
The bug is categorized as a “Networking” issue here: https://bugs.mojang.com/browse/MC-262264.
If there’s an official bug in the tracker, it means that the Mojang team is investigating the issue and working on a fix.
You can check the status of Minecraft here to see if anyone is encountering the same issue as you: https://downdetector.com/status/minecraft/.
How to fix “Failed to connect to the server” in Minecraft
To fix “Failed to connect to the server” in Minecraft, you need to quit the game, close the launcher, and reopen it.
You can also try to log in to an alternate Minecraft account (if you have one).
If you’re playing a cracked version of Minecraft, you need to join a server that allows cracked versions or doesn’t check for licenses.
If you’re a server owner, you need to set “online-mode” to “false” in your server’s properties.
In rare cases, Minecraft might be experiencing an outage or a bug that cannot be fixed from your end.
Fix 1: Quit and reopen Minecraft (for regular players)
- Quit the game/server.
- Close the Minecraft launcher (you can use task manager for this).
- Reopen the launcher.
- Join the game/server.
Fix 2: Log in to an alternate Minecraft account (for regular players)
- Open the Minecraft launcher.
- Click on the dropdown box of your account.
- Select “Log out” from the dropdown menu.
- Click on “Add account”.
- Log in to your alternate Mincraft account using Microsoft/Mojang.
Fix 3: Log in using the Minecraft/Mojang license (for cracked players)
- Log in using the Minecraft/Mojang license in the “Accounts” menu item.
- Join a server that allows cracked versions/does not check for licenses.
Fix 4: Set “Online-Mode” to “False” (for server owners)
- Access the main folder of your Minecraft server.
- Open the server.properties file > Online-Mode > set to “False”.
- Save the file and restart your server.