powered by Jive Software

Multiple processes, embedded db locked

I seems I’ve gotten myself wedged. I started this server on a whim, so I wasn’t particularly careful. Now I have 40-some people using it, and losing their logins is highly undesirable.

I seem to have ended up with two servers running on the same node:

daemon 4200 1 0 Mar20 ? 00:00:18 /opt/openfire/jre/bin/java -server -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar

root 17308 2211 0 Mar25 pts/18 00:00:23 /opt/openfire/jre/bin/java -server -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar

And now I’m getting lots of messages like this in the log:

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@50bade09[http://file =/opt/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null|http://file =/opt/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception

: checkHeartbeat(): lock file /opt/openfire/embedded-db/openfire.lck is presumably locked by another process.

I’m using the embedded-db, and my openfire.script hasn’t been updated since March 25th, the date on the second process. I’ve had a lot of users join since then, and I can see thier transactions in the openfire.log.

Is there a way I can avoid losing all the recent accounts when I shut down the server the next time?

Thanks in advance,

Fate intervined. The second process was accidentally killed, and magically the database got written out to disk.

No users were lost, I had the chance to reinstall the server correctly, this time correctly, as well as adding some plugins. Happy endings all around.

Thanks for writing something that did the right thing, despite all the wrong things that were happening.