Failed to Login : Invalid session (Try restarting your game)

Getting kicked out with "Failed to login: Invalid session (Try restarting your game)" when joining your Minecraft server? Super frustrating, but it's a common auth glitch — usually fixed in 1 minute by relogging. This hits Java Edition players most, and it's not a server crash.
 
Perfect for new players/admins — we'll cover player fixes first, then server tweaks.
 
Pro tip: Check my connecting guide if basics are off.

 

Why this error happens

  • Player session expired: Minecraft logged you in on another device/app, or the launcher glitched.
  • Multiple logins: Game might have opened twice (e.g. main + alt account)
  • Cracked/unofficial launcher: Server required the premium Mojang account (default "online-mode=true").
  • Rare: Mojang servers are down. (Check mcsstatus.com)

Good news: 90% of these issues are fixed by restarting the launcher!

 

Fix #1: Player side (Try first!)

For anyone joining the server:
  1. Close ALL Minecraft:
    • Exit game fully (Alt+F4 or Task Manager: End "javaw.exe" / Minecraft processes).
    • Close launcher too.
  2. Reopen & Relog:
    • Launch official Minecraft Launcher.
    • Log out (profile icon → Switch Account → Log Out).
    • Log back in with your premium Microsoft/Mojang account.
    • Launch your version (match server's, e.g., 1.21.1).
  3. Join Server:
    • Multiplayer → Add/Direct Connect → Paste IP:port.
    • Done!

Pro Tip: If closing the minecraft launcher didn't work, it's recommended to reboot the gaming system.

Launcher warning: Avoid TLauncher/Badlion/Prism if the server is premium-only - switch to official.

 

Fix #2: If you're the server admin

Allow cracked/offline players (not recommended for public servers — security risk!):
  1. Stop the Server: Console tab → Stop.
  2. Edit server.properties:
    • Files tab → Find server.properties.
    • Click on the file to edit.
    • Change online-mode=true to online-mode=false.
    • Save Content.
  3. Restart: Console → Start.
Now anyone joins — but use plugins like AuthMe for passwords.

 

Still Stuck? 

Issue Quick Fix
Multiple devices logged in Log out everywhere (minecraft.net) -> Relaunch on one device.
Modded launcher (Forge/Fabric) Close the mod launcher -> Use vanilla -> Add mods after joining.
VPN/Firewall Disable the VPN -> Try again
Wrong version Match the client to server (Startup tab in our game panel). See our connecting article.
Whitelist on Admin: Files -> whitelist.json -> Add username -> Restart
Server logs error? Console: Look for "Invalid session" - confirms online-mode issue.

 

Bonus: Prevent it forever!

  • Players: Always close the game fully before switching your account.
  • Admins: Set up auto-backups and schedule restarts.
  • Test: OP youself via the console: op YourUsername

 

Quick Recap (Cheat Sheet)

Who Steps
Player Close MC/Launcher -> Log out/in -> Join. Also try fully restarting the system.
Admin Files -> server.properties -> online-mod=false -> Restart

 

Need Help?

 


 

Logged in! No more session drama - time to build!

Was this answer helpful?

Related Articles

My Minecraft server isn't starting (EULA)

New to running a Minecraft server? If your server won't start and you're seeing errors like "You...

How do I connect to my Minecraft server

First server up and running? Awesome! Now get your squad in. Connecting to your Minecraft server...

Powered by WHMCompleteSolution