How to deal with "Your Zotero database is currently in use."

Whenever I bring up firefox, The Zotero icon has a "warning triangle", and I can see the mouseover warning:

"Your Zotero database is currently in use. Only one instance of Zotero using the same database may be opened simultaneously at this time. If Zotero Standalone is open, please close it and restart Firefox."

If I click on the Zotero icon, I get the same error message.

I'm not running standalone Zotero. I've tried stopping and restarting firefox, disabling and enabling the Zotero extension, and rebooting the machine. None of this has had any effect.

FWIW, this on a Ubuntu 10.04 LTS system, using Firefox 3.6.16 and Zotero 2.1.5.
  • edited August 28, 2013
    Is your Zotero data directory on a network or external drive?

    Is there a -journal file in the data directory when Firefox is closed? If so, move it somewhere else and try again. [Edit for posterity: Don't do this. It could result in database corruption, and if it helped it'd be due to some other root cause that needed to be fixed.]
  • No, the Zotero data is on a local ext3 file system.

    Yes, there's a zotero.sqlite-journal file in the directory where I've told Zotero to store its files. Checking the date on this, it appears that Zotero was in the middle of updating the database when a recent power outage took my system down. I assume that removing the -journal file will cause any updates that were in process to be lost. The bigger question is whether this risks leaving the database in an inconsistent state?
  • It's probably OK. Just make a backup first and check the database integrity afterwards from the Advanced pane of the Zotero prefs.
  • I tried removing the zotero.sqlite-journal file and restarting firefox, but I'm still getting the same error.
  • I've played around with this a bit more and discovered that the problem seems to be related to the fact that I had configured my system to store the Zotoro data in a separate directory rather than inside my firefox profile. If I switch from the directory to using my profile, the warning message goes away. If I then try to switch to any directory under my home directory, it comes right back. I assume that sqlite is having trouble accessing these directories.

    After switching over to storing data in the firefox profile and synching with the server, I'm back up and running.
  • That could be due to security software (e.g., SELinux-type stuff) on your system.
  • Dan- I agree that it's probably something like that, but I don't believe that Ubuntu 10.04 uses SELinux by default (and I haven't added anything or made any changes to file permissions or done anything else that I can think of that might have caused this to break.)
  • Ubuntu uses AppArmor and that is the culprit. You can either add

    @{HOME}/<zotero_profile_directory>;/* rwlk,

    to the file /etc/apparmor.d/local/usr.bin.firefox
    or disable the AppArmor firefox profile using

    sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disable/
    sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox
  • Thanks for diagnosing the problem and providing a workaround!
  • I'm seeing a different version of this on my MacOS 10.6.8 system. I have multiple Firefox profiles, both with Zotero directories. The system worked for a long time, but now it has failed on one of the profiles. Deleting zotero.sqlite-journal has no effect.

    Any thoughts on how to diagnose the problem?
  • The file zotero.sqlite.bak was locked. Rebooting fixed the problem.
  • Run into the same error but it's peculiarly different.

    I used to put zotero data on a portable external hard drive (with Mac OS X Lion) and it all worked fine until recently when I got a 32G thumbdrive and decided to move the zotero data there.

    I first format the thumbdrive into Mac OS extended journaled, and run into the error "Your Zotero database is currently in use. Only one instance of Zotero using..." I deleted the zotero.sqlite-journal and it worked out fine. Then I realized I also had a windows machine that might use zotero, so I reformatted the thumbdrive into fat32, copied the same file over, and run into the same error. This time deleting the journal file does not work.

    I can still use zotero in firefox without starting zotero standalone or vice versa, but zotero firefox will not shift to standalone. I checked and none of the db files are locked.

    Any idea? Thanks!
  • edited July 8, 2012
    On OS X, Zotero for Firefox won't automatically switch into connector mode if your Zotero data directory is on a file system that does not support named pipes, such as FAT32.
  • Thanks a lot!
  • edited February 17, 2013
    I have now run into this error message a number of times on a firefox crash. The issue of the profile being on an nfs file system is an absolute red herring, since most of us won't have multiple instances of firefox running on the same directory!
    My real bugbear is that the only solution I have found is to delete all the zotero files from within the firefox profile, and repopulate every time, which is a bit time consuming...
    I would like to know where the lock that this message complains about is being stored, and potentially override this check in some way...
  • edited February 17, 2013
    Niels
    What operating system? Wnat version of Zotero? To solve your problem it is necessary to know more background. Is your Zotero in the standard place or did you set a custom location? Is this on your computer's drive or on network storage? When you say that you "repopulate", do you mean that you download the plug-in and install it a second or third time? Are there other Firefox plugins? Have you tried disabling them? Have you looked at the directory and file permissions and write/read-only settings?
  • Sorry, should have said!

    As you may guess (since I am using NFS) this is on linux--At the moment Scientific Linux 6.3 (RHEL6/Centos6 equivalent). Firefox 10.0.12; zotero 3.0.11. The same problem occured with older versions of firefox and zotero.

    Of course I have many other firefox plugins--but the problem is so clearly with zotero that in first instance I am willing to exclude those as a potential cause for the issue.

    The only solution I have found, when after a system or firefox crash this annoying issue appears, is to delete all the zotero.sqlite.* files from my firefox profile. Zotero will then sync my local to remote information (slowly).

    So the lock information seems to be stored inside the database-a very unsatisfactory situation.
  • edited August 23, 2013
    I have tried the way mentioned by borchers@nmt.edu: drag all my standalone .zotero folder under the .mozilla folder. Suddenly and suprisingly i can open my zotero standalone again, although i need to do the synchronzation in order to get all my stored links and files. However, after that i found that a new .zotero folder generated directly under my home folder again. I don't know if i should change the "Data Directory Location" or not in order to avoid the annoying problem happening in the future.
  • NeverCompleted - not sure you're even talking about the same issue. Could you step back a bit and describe what's happening?
  • edited August 26, 2013
    The problem that i met is similar with borchers@nmt.edu : whenever i tried to open Zotero standalone, the error comes out

    Your Zotero database is currently in use. Only one instance of Zotero using the same database may be opened simultaneously at this time. ...Please close it and restart Firefox. (something like that)

    I think i should step back further to explain what have happened to my firefox zotero.

    I used to add zotero to my Firefox addons, first it was OK. Then one day my firefox can't be opened. Whenever i tried to open it, it says:

    Your Firefox has already been opened, either restart Firefox or restart your system. (Something like that) I searched the troubleshooting of Firefox and one solution is to delete the .parentlock to rebook it. I did it and succeeded to open Firefox again. However, after that my Firefox zotero disappear, besides that all my Firefox addons seem to be blocked as no addons appear when i click the addons bouton.

    I guess the problem i can't open zotero may link to the weird state of my Firefox addons. So i did as i have said in the last post: drag my zotero folder under the .mozilla folder, and succeeded in rebooking zotero again. However, firefox addons is still in trouble.
  • I haven't been able to access zotero in months because of the same issue.
    ssameer Jun 10th 2011

    Ubuntu uses AppArmor and that is the culprit. You can either add

    @{HOME}//* rwlk,

    to the file /etc/apparmor.d/local/usr.bin.firefox
    or disable the AppArmor firefox profile using

    sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disable/
    sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox
    I was quite hopeful that ssameer's workaround would solve my problem, but it hasn't. I still get the message, "Your Zotero database is currently in use. Only one instance of Zotero using the same database may be opened simultaneously at this time. If Zotero Standalone is open, please close it and restart Firefox."

    ❯ sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox
    apparmor_parser: Unable to remove "/usr/lib/firefox/firefox{,*[^s][^h]}". Profile doesn't exist

    (I'm using Ubuntu and Firefox. My home directory is stored on a server so that I can use any computer at work.)
  • We frequently see issues with Zotero on Network drives and there really isn't much we can do about it. In this case it may actually be the case that the database is still open from another computer, or it might be that the location of /home breaks mozilla's database locking.
  • Can I just turn off database locking somehow? I would really like to be able to access my zotero database and the website is clunky.
Sign In or Register to comment.