Openfire error-cannot connect

This is the error message I get when I try to connect to the Openfire server. Because of this none of the Spark users are able to log in. I have uninstalled Openfire and then reinstalled it on the same PC but that also didn’t fix it and I am wondering now if I have to reconfigure things since I did that.

This error means that two instances of Openfire are running and are struggling to access the database. Openfire 4.1.5 installs and runs the service automatically, so there is no need to run the launcher.

I am still not able to get Openfire to open or Spark to run. This is the error I get.

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.Error starting the server. Pelase

javal.hcang.IllegalArgueemntExceptio:cn java.sql.SQLException: ConnectionManager.getConnection)(k the log files for more information.

failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2017-08-22 22:10:06 heartbeat - read: -639 ms.

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:700)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:423)

at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:163)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)

at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)

at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:26)

Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2017-08-22 22:10:06 heartbeat - read: -639 ms.

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:156)

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:690)

… 16 more

Server halted

I have uninstalled and reinstalled Openfire and also the Spark program on my PC with no luck.

Stop Openfire (both the launcher and the service). Go to C:\Program Files (x86)\Openfire\embedded-db and delete the openfire.lck file (not the script one!). Run the service. Do not run the launcher (with the yellow light bulb icon). It’s not meant to be used in production.

So I might be dumb but when I stop the service the openfire.lck file does not show in the embedded-db folder anymore. If I start the service it’s there but obviously cannot delete it. What am I missing?

lck (lock) file usually should only show up when Openfire is running and database is in use. Sometimes it can get stuck, but it is not your case. So you only see the above error when you already have Openfire running via windows service and you also run the launcher (program with the yellow light bulb icon). This creates two instances of Openfire and they can’t share one database. Don’t run the launcher, you don’t need it. Clients should already be able to connect. To connect to Admin Console just go to http://localhost:9090 in the browser on the same server (or to http://servername:9090 if connecting remotely and if servername is resolvable in the network).