Home » How-To » Gaming » How to Fix “Failed to connect to the server” in Minecraft

How to Fix “Failed to connect to the server” in Minecraft

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?

Failed to connect to the server in Minecraft

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)

  1. Quit the game/server.
  2. Close the Minecraft launcher (you can use task manager for this).
  3. Reopen the launcher.
  4. Join the game/server.

Fix 2: Log in to an alternate Minecraft account (for regular players)

  1. Open the Minecraft launcher.
  2. Click on the dropdown box of your account.
  3. Select “Log out” from the dropdown menu.
  4. Click on “Add account”.
  5. Log in to your alternate Mincraft account using Microsoft/Mojang.

Fix 3: Log in using the Minecraft/Mojang license (for cracked players)

  1. Log in using the Minecraft/Mojang license in the “Accounts” menu item.
  2. Join a server that allows cracked versions/does not check for licenses.

Fix 4: Set “Online-Mode” to “False” (for server owners)

  1. Access the main folder of your Minecraft server.
  2. Open the server.properties file > Online-Mode > set to “False”.
  3. Save the file and restart your server.

Further reading

How to Fix “Failed to login: Invalid session (try restarting your game)” in Minecraft

How to Fix “internal exception java.net.socketexception connection reset” in Minecraft

30+ Free Minecraft Redeem Codes


About the author

Lim How Wei

Lim How Wei is the founder of followchain.org, with 8+ years of experience in Social Media Marketing and 4+ years of experience as an active investor in stocks and cryptocurrencies. He has researched, tested, and written thousands of articles ranging from social media platforms to messaging apps.

Lim has been quoted and referenced by major publications and media companies like WikiHow, Fast Company, HuffPost, Vice, New York Post, The Conversation, and many others. One of his articles about the gig economy was quoted by Joe Rogan who hosts The Joe Rogan Experience (arguably the most popular podcast in the world), in the This Past Weekend podcast by Theo Von.

In his free time, Lim plays multiple games like Genshin Impact, League of Legends, Counter-Strike, Hearthstone, RuneScape, and many others. He creates guides, walkthroughs, solutions, and more on games that he plays to help other players with their progression.