powered by Jive Software

Database Setup or Configuration Error This Morning

I am a temp IT person at a small (60 person) company. I inherited all the systems and applications with no turnover and i am the lone IT person for the group. Today no one can login to Spark. I figure out which server has openfire running and launch the Openfire Server and i get this message:

Database setup or configuration error: Please verify your datEbarraesor t satsring th eettingsasn re dvrechec .tkPhlee lgassoe/ rcrhere.okclo ftihlege ofl odrg files ofter mor eiaiflnormation
.de
error messages.
java.lang.IllegalArgumentException: 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: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files (x86)\Openfire\embedded-db\openfire.lck
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:734)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:448)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:169)
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: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files (x86)\Openfire\embedded-db\openfire.lck
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:156)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:724)
… 16 more
Server halted

I try to launch admin but i don’t have a login. I also have no idea what the above error message means. I tried rebooting the server, i checked the services are running but no luck. Any ideas?

You shouldn’t run it with that yellow bulb icon program. Openfire is already running as a service probably and you create a conflict this way Explanation: Database lock acquisition failure error

I suggest to reboot that server and see if Spark can login. If not, check the logs at C:\Program Files (x86)\Openfire\logs\all.log

Also, what error Spark gives?

1 Like

Ok, i rebooted the server. Tried to login to spark and get a Can’t connect to server: invalid name or server not reachable.

Log info:
2019.11.20 11:21:30 WARN [socket_c2s-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x00000009: nio socket, server, /192.168.100.182:53085 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2019.11.20 11:34:11 WARN [socket_c2s-thread-2]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x0000000A: nio socket, server, /192.168.100.149:52976 => 0.0.0.0/0.0.0.0:5222)
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down 50 modules …
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s-legacyMode] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_s2s] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[component] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[component-legacyMode] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager-legacyMode] - Stopped.
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.http.HttpSessionManager - Stopping instance
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.http.HttpBindManager - HTTP bind service stopped
2019.11.20 11:55:01 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down plugins …
2019.11.20 11:55:02 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Openfire stopped
2019.11.20 11:55:02 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Server halted
2019.11.20 11:56:14 INFO [main]: org.jivesoftware.openfire.XMPPServer - Registering shutdown hook (standalone mode)
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Servers Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Components Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing Users Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing AnonymousUsers Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Routing User Sessions
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Roster
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Multicast Service
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Offline Message Size
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for VCard
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Privacy Lists
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for File Transfer Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Offline Presence Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Last Activity Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for User
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Remote Users Existence
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Components Sessions
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Connection Managers Sessions
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Incoming Server Sessions
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Sessions by Hostname
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Validated Domains
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Client Session Info Cache
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Entity Capabilities
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Entity Capabilities Users
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Directed Presences
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created local-only cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for PEPServiceManager
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for File Transfer
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Published Items
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Disco Server Features
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Disco Server Items
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.openfire.pubsub.PubSubModule - Publish-Subscribe domain: pubsub.tcstorage01
2019.11.20 11:56:16 INFO [main]: org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Multi User Chat domain: conference.tcstorage01
2019.11.20 11:56:17 INFO [main]: org.jivesoftware.openfire.XMPPServer - Openfire 4.0.4 [Nov 20, 2019 11:56:17 AM]
2019.11.20 11:56:18 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.EncryptionArtifactFactory - Creating new SslContextFactory instance
2019.11.20 11:56:18 INFO [pool-3-thread-1]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Favicon Misses
2019.11.20 11:56:18 INFO [pool-3-thread-1]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Favicon Hits
2019.11.20 11:56:18 INFO [pool-3-thread-1]: org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at:
http://tcstorage01:9090
https://tcstorage01:9091
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s-legacyMode] - Started.
2019.11.20 11:56:19 WARN [pool-3-thread-1]: org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Configuration allows for up to 16 threads, although implementation is limited to exactly one.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_s2s] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[component] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[component-legacyMode] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager-legacyMode] - Started.
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.spi.EncryptionArtifactFactory - Creating new SslContextFactory instance
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - Installed response compression filter
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpSessionManager - Starting instance
2019.11.20 11:56:19 INFO [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - HTTP bind service started
2019.11.20 11:56:29 INFO [socket_c2s-thread-3]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Locked Out Accounts
2019.11.20 11:56:29 INFO [socket_c2s-thread-2]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group
2019.11.20 11:56:29 INFO [socket_c2s-thread-2]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group Metadata Cache

Is the service running (check in services.msc)? Can you login to admin console in a browser on that server? Go to http://localhost:9090 or https://localhost:9091

The error says that connection is closed by remote host. This means that Spark is closing the connection for some reason. Is Spark connecting to the server using IP as Server/Domain? What versions of Openfire/Spark are used?

1 Like

Yes the service is running. I can’t login to admin console, we don’t know what credentials are. Spark is connecting via hostname, timbercon.com
Openfire we are using version 4.0.4, Spark i am not sure the version.

Strange thing, when i put the IP address from the server instead of timbercon.com it says “unable to verify certificate”

Spark version can be found in Program and Features list on Windows. From the error it looks like some recent version. On Spark login screen you can go to Advanced and disable the hostname certificate verification. This will allow Spark to login using IP. Or on the same screen you can put IP into a host field and still use proper domain name on login screen. This could work. One of these options could be a workaround, but will have to be done on all 60 PCs. I’m guessing something is up with DNS name resolution in your network and Spark can’t find the server by its domain name anymore. Maybe more details can be in Spark logs

Error Logs:
C:\Users\User\AppData\Roaming\Spark\logs
There is a bunch of files, look through all of them and select events that correlate with the time of your issue.

1 Like

Spark version is 2.8.3.960
Now i am seeing errors about SSL handshake failed, unknown certificate

2019.11.20 13:15:11 WARN [socket_c2s-thread-2]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x0000000B: nio socket, server, /192.168.100.176:59959 => /192.168.100.4:5222)
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:487)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
at sun.security.ssl.SSLEngineImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLEngineImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLEngineImpl.readNetRecord(Unknown Source)
at sun.security.ssl.SSLEngineImpl.unwrap(Unknown Source)
at javax.net.ssl.SSLEngine.unwrap(Unknown Source)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:728)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:666)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:552)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:351)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:468)
… 15 more
2019.11.20 13:16:58 WARN [socket_c2s-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x0000000C: nio socket, server, /192.168.100.176:60021 => 0.0.0.0/0.0.0.0:5222)
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:487)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
at sun.security.ssl.SSLEngineImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLEngineImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLEngineImpl.readNetRecord(Unknown Source)
at sun.security.ssl.SSLEngineImpl.unwrap(Unknown Source)
at javax.net.ssl.SSLEngine.unwrap(Unknown Source)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:728)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:666)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:552)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:351)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:468)
… 15 more
2019.11.20 13:34:32 WARN [socket_c2s_ssl-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to exception in session: (0x0000000D: nio socket, server, /192.168.100.101:54628 => 0.0.0.0/0.0.0.0:5223)
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down 50 modules …
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - Flushing write cache to database
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s-legacyMode] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[socket_s2s] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[component] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[component-legacyMode] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager-legacyMode] - Stopped.
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.http.HttpSessionManager - Stopping instance
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.http.HttpBindManager - HTTP bind service stopped
2019.11.20 13:34:44 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Shutting down plugins …
2019.11.20 13:34:45 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Openfire stopped
2019.11.20 13:34:45 INFO [Thread-2]: org.jivesoftware.openfire.XMPPServer - Server halted

Do you mean you have tried both workarounds and it still can’t connect? What error does Spark give when you check the “Disable certificate hostname verification” setting and try to login? Also, check Spark logs.

This looks like your server’s certificate probably got expired. But to generate new one you have to get to the console. You can try adding another user as an admin.

Stop Openfire service. Edit C:\Program Files\Openfire (x86)\conf\openfire.xml, between

<admin> and </admin> tags add
<authorizedUsernames>user@timbercon.com</authorizedUsernames>

The user is that you know the password. Then you can run Openfire service and try to login to Admin Console with that user, change real admin’s password and remove admin role from this user.

1 Like

Using the IP as the domain I get Unable to verify certificate. I added that authorizedusernames string to Openfire.xml but when I start the service it gets deleted. I also noticed when I start Openfire it creates a Openfire.lck file in the embedded-db folder. If I understand correctly that is locking the database.

I think at this point it may be a good idea to just upgrade to the newest version of Openfire. We would lose our chat history though correct? Thank you so much for your help wroot, you are the real MVP

Disabling hostname certificate verification in Spark Advanced menu should have gotten you through that Unable to verify error.

It is normal for these tags to disappear on Openfire start. Server writes them into database and removes. You should try to login to Admin Console with the user you added this way.

Lck file should always be created, this is normal. This prevents two processes accessing same database. This is why you were getting an error when trying to run Openfire again, when it was already running as a service. Without lck both processes would try to work with db and probably would damage it.

By upgrading you mean installing fresh new version? Well, with 60 users this is probably not so hard. Although i still think you might be able to make old server work once you get into console.

1 Like

By chat history you mean rooms or one to one chats? Spark doesn’t support server history, so one to one chats are stored locally on every PC. If you recreate a server with identical domain name and usernames, i think Spark should pick up old history files. You would lose rooms history though, it is stored on the server.

1 Like

We found out we have 2 instances of Spark/Openfire running, one tied to our old website that is no longer in service and a 2nd that is used internally and working. We were trying to troubleshoot them as if they were 1 instance. What a confusing mess! Thank you so much for your help wroot!

1 Like