SQLite database always locked

Discussion in 'Bukkit Help' started by CosmicVoyager, Dec 4, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    CosmicVoyager

    Greetings,

    I have had this problem for many months through many versions of Bukkit and plugins.

    Any plugin the uses SQLite gives continuous database busy and locked errors, LWC being the main one. What the heck could be the problem? This happens with just one player online doing nothing. I have no idea how SQLite works.

    Here is some of the logs.

    "Caused by: javax.persistence.PersistenceException: Query threw SQLException:[SQLITE_BUSY] The database file is locked (database is locked)"

    http://pastebin.com/dnuhwBVJ

    Thanks
     
  2. Offline

    zeeveener

    Check to see if ChestShop has an update available. The error is referring back to that plugin so it may be the/a cause of your problem.
     
  3. Offline

    CosmicVoyager

    It happens without ChestShop. It happens with *anything* that uses SQLite.

    Here, I removed ChestShop. Now, it is happening with LWC. This has been going for about six months. I doubt very much it is has anything to do with Minecraft, Bukkit, or any plugins.

    http://pastie.org/8529887
     
  4. Offline

    zeeveener

    Ok. What type of machine are you running this on? Do the plugin files have the same permissions as the server?

    Example: Sometimes, in linux especially, if you use sudo start.sh to run the server, plugin files will be created as the user root. However, if you go back and run the server under a different user, say your usual login, it won't be allowed to access that file.

    If you are running MacOSX or Linux, type "top" into the terminal.
    If you are running Windows, try "tasklist" (not sure as I don't have a windows) for the same thing.

    You are looking for the Java task, or whatever relates to your server. Check to see if the user is the same as the permissions on the databases in the plugins folder. If not, that's your problem. If they are the same, then something else is the problem.
     
  5. Offline

    CosmicVoyager

    I am running Mac OS X.
    Using "top" in terminal it shows the User of Java is me, Chuck. The info window of the database file shows the users Chuck, admin, everyone, and _unknown have permission to read and write. I think I manually added me. I think this problem began after reinstalling Mac OS X and copying the files from backup. The file owner is _unkown.
     
  6. Offline

    zeeveener

    The file owner for the database?

    Try this then:

    • cd to the database folder.
      • Ex: cd /Users/Chuck/Server/plugins/LWC/
    • chown the file to yourself.
      • Ex: sudo chown Chuck:staff database.db
    See if that helps. You can also just recursively chown the whole Server folder.
    sudo chown -R Chuck:staff /Users/Chuck/Server/

    Edit: Lots of edits lol.

    To see what to use for "Chuck:staff", cd to Desktop and type "ls -al" you will get a list of all your files. The 3rd and 4th columns are what you use. Ex: My 3rd column is "zee" my 4th is "staff", I would use "zee:staff"
     
  7. Offline

    CosmicVoyager

    I think that might have fixed it. No errors so far. I changed the owner of the Minecraft server folder and all files in it.
     
  8. Offline

    zeeveener


    Awesome! Hopefully that fixed it for good lol. At the very least, you most likely learned one or two things about your terminal.
     
Thread Status:
Not open for further replies.

Share This Page