Data dir on network: error starting Zotero

I run Zotero on Debian GNU/Linux. I own a network harddrive that also runs on Linux. Storing the Zotero data dir on that network harddrive results in failure to start Zotero, whether accessed over NFS or over Samba.

The error message is simply: "[JavaScript Application] There was an error starting Zotero"

zotero.sqlite is created but the file size is 0.

Has anybody succeeded where I failed? Is it possible at all? Should I be using specific mount options? Does the problem involve libsqlite and/or file locking?

The network drive works fine except with Zotero.
Zotero works fine with the data dir stored locally.

Does Zotero's data dir work on networked mount points at all?
  • I believe a good number of people people put the Zotero data directory on a network drive, but it's never been something we've particularly recommended, since network environments vary widely and it's impossible to say that there won't be issues.

    But follow the steps in the Advanced Instructions section of the Reporting Bugs page and let us know what appears in the Error Console.
  • Dan:

    Error: [Exception... "Component returned failure code: 0x80630001 [mozIStorageService.openDatabase]" nsresult: "0x80630001 (<unknown>)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 807" data: no]
    Source File: chrome://zotero/content/xpcom/zotero.js
    Line: 230

    Thanks for the tips. This was the only error message. A bit too vague, I presume?
  • From some googling, looks like a locking issue of some sort...I figured as much..
  • SQLite uses POSIX advisory locks to implement locking on Unix. On Windows it uses the LockFile(), LockFileEx(), and UnlockFile() system calls. SQLite assumes that these system calls all work as advertised. If that is not the case, then database corruption can result. One should note that POSIX advisory locking is known to be buggy or even unimplemented on many NFS implementations (including recent versions of Mac OS X) and that there are reports of locking problems for network filesystems under Windows. Your best defense is to not use SQLite for files on a network filesystem.


    6.0 How To Corrupt Your Database Files
    http://www.sqlite.org/lockingv3.html
  • Yup. It really depends on the specific implementation (and we recommend frequent backups and regular checking of the database integrity via the Advanced pane of the Zotero prefs for people who get it to work at all).

    You could try sshfs if you're able to SSH into the network drive.

    Also be sure there's no sqlite-journal file in the data directory when Zotero is closed. If there is, delete it and try again.
  • Thanks a lot, will try these things.
  • Dan,

    Mounting with -o nolock fixed the problem!

    From man 5 nfs:

    lock / nolock Selects whether to use the NLM sideband protocol to lock files on the server. If neither option is specified (or if lock is specified), NLM locking is used for this mount point. When using the nolock option, applications can lock files, but such locks provide exclusion only against other applications running on the same client.

    Remote applications are not affected by these locks.

    NLM locking must be disabled with the nolock option when using NFS to mount /var because /var contains files used by the NLM implementation on Linux. Using the nolock option is also required when mounting exports on NFS servers that do not support the NLM protocol.
    ---------

    I don't see any particular dangers at this point, except perhaps an increased chance of corruptions when using multiple clients. I'll have to read up on that. For now, I'm stoked I got it to work.
  • By the way, I used sqlitebrowser for testing.
Sign In or Register to comment.