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:
- Close ALL Minecraft:
- Exit game fully (Alt+F4 or Task Manager: End "javaw.exe" / Minecraft processes).
- Close launcher too.
- 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).
- 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!):
- Stop the Server: Console tab → Stop.
- Edit server.properties:
- Files tab → Find server.properties.
- Click on the file to edit.
- Change
online-mode=truetoonline-mode=false. - Save Content.
- Restart: Console → Start.
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?
- Have a screenshot?
- Open a ticket: https://my.lunarracks.com/submitticket.php
- Open our live chat
Logged in! No more session drama - time to build!