Limited offer! Discounts of up to 50% on your servers

✨ BLACK FRIDAY ✨

November 19 to December 2, 2024

Coffre et cadenas dans un paysage pixelisé nocturne.

How to fix the Failed to check session lock error in Minecraft?

Is your Minecraft server crashing with “Failed to check session lock”? Let’s fix it in minutes with a clean, safe method. With our dedicated Minecraft server, enjoy exceptional performance.

Prerequisites

  • Access to your Oxygenserv panel (login and password)
  • File Manager or SFTP access (SFTP credentials)
  • Server properly stopped (type stop or use the Stop button)
  • An SFTP client (e.g., FileZilla) if using SFTP
  • A fresh backup of your world folders (world, world_nether, world_the_end)

Step-by-step

  1. Confirm the error in the logs
    Open the Console, then view logs/latest.log. Look for lines like “Failed to check session lock” or “Aborting, can’t access session.lock”. If present, a stuck session lock is causing the crash. Note the world name if shown (e.g., ServerLevel[world]) to target the right folder.
  2. Gracefully stop the server
    Click the red Stop button or type stop in the console. Wait until you see “Saving chunks” followed by “Server stopped”. If the panel shows “File in use” later, the server wasn’t fully stopped. Avoid “Force Stop” unless necessary; it can recreate the issue.
  3. Make a quick backup
    Go to Files and locate your world folders: by default world, world_nether, world_the_end. Select them, click “Compress/Zip”, then download. If you use custom worlds (e.g., survival, creative), back up any folder that contains a level.dat at its root.
  4. Delete the session.lock file (Java Edition)
    In the File Manager, open world, select session.lock, and click Delete. Repeat the same in world_nether and world_the_end. For extra worlds (Multiverse, modpacks), open each world root that contains level.dat and delete its session.lock. If you see “Permission denied” or “File in use”, the server is still running—go back and stop it properly.
  5. Bedrock Edition: clear lock files
    Open worlds, then your world folder (e.g., MyWorld). Delete the session.lock inside it. Repeat for every Bedrock world you use. If deletion fails, make sure the server is fully stopped.
  6. Restart and verify
    Click Start. Watch the console for a clean boot with “Done” and no new “Failed to check session lock” messages. Join the server to confirm everything loads fine. If it persists, check disk space, permissions, or potential world corruption.
  7. Check disk space and permissions if it keeps happening
    Ensure you have free disk space (keep at least 1 GB free for world writes). Remove old backups or large logs/ if needed. If permissions are problematic, temporarily rename world to world_old and start the server: if it boots, the old world is the culprit. Restore from backup or repair affected regions.

Tips & optimization

Always stop with stop or the Stop button to avoid orphaned locks. Keep 10% free disk space; under ~1 GB, writing session.lock may fail. Schedule daily backups and keep 3–7 rotations. To identify world roots, look for level.dat: that’s where session.lock lives. If the issue repeats, update your server jar (Paper/Spigot) and plugins/mods that might cause hard crashes.

FAQ

What is the session.lock file?

A tiny file Minecraft creates in each world to mark it as in-use. If it’s left behind after a crash or hard stop, the server refuses to load that world. Deleting it (while the server is stopped) fixes the lock.

Is it normal that session.lock comes back after restart?

Yes. The server recreates session.lock every time a world is loaded. Do not delete it while the server is running—only when the server is fully stopped.

I can’t find session.lock. What now?

Ensure you’re inside a world root (it contains level.dat). Java defaults: world, world_nether, world_the_end. Bedrock: worlds/YourWorld/. Try SFTP if the File Manager hides small files.

Will deleting session.lock damage my world?

No. session.lock isn’t world data; it’s just a lock. Removing it won’t delete builds or player data. Still, make a backup first for safety.

The error returns every boot. What should I do?

Check free disk space and permissions. Test by renaming world to world_old and starting fresh. If a new world works, restore a clean backup of the old one. Update your server jar and plugins/mods to prevent hard stops.

You’ve got this. Follow the steps and your server will be back online fast. Need help? We’re here for you.

Related articles

Table des matières

Facebook
Twitter
LinkedIn