So there I was, finally getting a multiplayer session going with some friends after weeks of scheduling chaos, and the moment I try to join the server — boom. "Failed to authenticate your connection." Minecraft just sitting there, mocking me. If you're dealing with a Minecraft Java Edition authentication error right now, trust me, you're in the right place and it's almost never your fault.
The error usually looks something like this in your game or server console:
Failed to authenticate your connection.
java.net.SocketTimeoutException: Read timed out
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.hasJoinedServer
Or sometimes the shorter, equally unhelpful version:
Error: Failed to login: Invalid session (try restarting your game)
Yeah. Super helpful, Mojang. Thanks for that.
Why This Actually Happens
Here's the thing — this error is almost always a session token problem. When you launch Minecraft, the launcher grabs a temporary authentication token from Mojang's servers (now Microsoft's auth servers, post-migration). That token has a short lifespan. If you left the game open for a while before joining, or your internet hiccuped, or Mojang's auth servers had a sneezing fit, that token goes stale. The server then tries to validate you and can't, so it boots you.
Sometimes it's also a DNS issue, or your local network is blocking the auth endpoint. I've seen this happen a LOT on college networks and corporate WiFi. Honestly, those environments love blocking random outbound connections and the Minecraft session service gets caught in the crossfire.
Alright, let's get into the actual fixes.
Fix #1: Restart the Launcher and Re-login (The Obvious One)
I know, I know. But seriously — don't just close the game. Fully close the Minecraft launcher and reopen it. The launcher doesn't always refresh your session token automatically, and a full restart forces it to grab a fresh one from Microsoft's authentication servers.
If you're already signed into Microsoft but still getting the error, sign out first:
- Open the Minecraft Launcher
- Click your account name in the top-right corner
- Hit "Sign Out"
- Sign back in with your Microsoft account
- Launch the game fresh and try joining again
This fixes it probably 60% of the time. The session token gets refreshed, Mojang's servers recognize you, life is good. If it doesn't work, keep reading.
Fix #2: Flush Your DNS Cache
This one catches people off guard, but a stale DNS cache can actually prevent your client from reaching Mojang's authentication endpoint at sessionserver.mojang.com. If your machine is resolving that to an old or wrong IP, the handshake fails silently and you get the authentication error.
On Windows, open Command Prompt as Administrator and run:
ipconfig /flushdns
ipconfig /release
ipconfig /renew
On macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
On Linux (Ubuntu/Debian):
sudo systemd-resolve --flush-caches
After that, also try switching your DNS to Google's or Cloudflare's temporarily. In my experience, ISP-provided DNS servers are flaky more often than people realize. Set your DNS to 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) in your network adapter settings and retest. This has saved me more than once on sketchy hotel WiFi during a conference, not gonna lie.
Fix #3: Check Mojang's Server Status (and Force Your Server to Offline Mode Temporarily)
Sometimes — and this is genuinely Mojang's fault — their authentication servers just go down or get overloaded. Before you spend another hour troubleshooting your setup, check status.mojang.com or the unofficial mcstatus.io to see if session.minecraft.net is having issues.
Now here's where it gets tricky. If you're running your own server and you just need to get your friends in while Mojang's auth is being weird, you can temporarily set online mode to false in your server.properties file:
# server.properties
online-mode=false
Restart the server after saving that. This bypasses Microsoft/Mojang authentication entirely and lets players join with just their username. Fair warning though — only do this on a private server with people you trust, and flip it back to true once Mojang's servers recover. Running a public server in offline mode is how you end up with griefers and impersonators. I've seen server owners forget to switch it back and then wonder why random people are showing up. Don't be that person.
Fallback Tip: Check Your Firewall and Antivirus
If none of the above worked, your firewall or antivirus might be blocking Minecraft's outbound connections to the session server. Windows Defender in particular has gotten more aggressive in recent versions. Go into your firewall settings and make sure javaw.exe (or the Minecraft launcher executable) has permission for outbound connections on ports 80 and 443.
On Windows, you can quickly check and add a rule from an elevated Command Prompt:
netsh advfirewall firewall add rule name="Minecraft Java" dir=out action=allow program="C:\Program Files (x86)\Minecraft Launcher\MinecraftLauncher.exe" enable=yes
Adjust the path if your launcher is installed somewhere else. Also worth temporarily disabling your antivirus and testing — just to isolate whether it's the culprit. If that fixes it, add Minecraft as an exception rather than leaving your AV off permanently. Obviously.
One more thing — if you migrated your Mojang account to a Microsoft account recently and started seeing this error, make sure you're actually launching through the official Minecraft launcher and not an old shortcut pointing to a legacy version. The old Yggdrasil auth system is completely dead, and any launcher config still pointed at it will fail every single time.
Hope this saves you the 45 minutes of forum-digging I had to do the first time I ran into this. The DNS flush + re-login combo fixes it for most people, so start there.
Related: How to Fix "Failed to Verify Username" in Minecraft (2024)
๋๊ธ
๋๊ธ ์ฐ๊ธฐ