Import db from openfire 3.10.2 to 4.2.3

Hi,

I’m upgrading my openfire server. The old one is running version 3.10.2, so i have installed 4.2.3 to a new server and planning to test and switch over once ok.

However, I also need a lot more data (particularly chat and conference room logs). So i tried to export the old db and import to the new one, but it didn’t work. Here are some output logs:

Database update successful.
ERROR [pool-4-thread-1]: org.jivesoftware.openfire.spi.MINAConnectionAcceptor[component_ssl] - Error starting: 5276
java.lang.NullPointerException
ERROR [pool-4-thread-1]: org.jivesoftware.openfire.spi.MINAConnectionAcceptor[connection_manager_ssl] - Error starting: 5263
java.lang.NullPointerException

I wanted to upgrade the OS and Java version, so didn’t go to the typical rpm upgrade option. Is there any recommended way of upgrading?

TIA.

it looks like your two servers are/were configured slightly differently. It might be worth re-running the guided setup on your 4.2.3 server against the re-imported database, to see if that clears things up. Stop openfire, edit openfire/conf/openfire.xml and change true to false to re-run the setup.

Greg

Thanks Greg. Let me try that and update here.

I would do a copy of database and then copy it to new server or connect to it. But i will start with installing same version and then upgrading that new instance in steps. You can find all versions here
https://github.com/igniterealtime/Openfire/releases

Installing an older version as suggested by @wroot worked for me (thanks!). However, now having error on some config, like importing new cert in Identity store.

Configuration problem: Unable to access the store.

Explain what exactly you are doing (importing what, how, on what step it shows error, etc.). Also, how do you run Openfire? Is it on Windows? Do you run it via service or manually?

I have Openfire on a CentOS 7 machine, and have successfully upgraded via rpm command. Systemd is used to manage the service - systemctl [start|stop|status] openfire.

As it’s a new server, I generated a new certificate (CA issued). Trying to import this certificate and private key in TLS/SSL Certificates tab in the web admin console.

In the Certificate stores, there is a warning in either Identity or Trust store:
“Configuration problem: Unable to access the store.”

When i go to Manage Store contents for Identity store (for example), there’s this error on top:
“Internal server error: Unable to get an instance. (identityStore)”

When i go to ‘Import Private Key and Certificate’, i get this error:
“Internal server error: Name is null (connectionType)”

I have tried to delete the keystore. Have also tried adding “xmpp.socket.ssl.client.keypass” under Server Properties. Anything i’m missing? TIA.

I guess something got corrupted during the update or files are missing. Anything in Openfire logs? Openfire/logs/all.log

Here’s a bit of the logfile that looks related to ssl:

2018.05.17 16:01:22 ERROR [pool-4-thread-1]: org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s_ssl] - Error starting: 5223
java.lang.NullPointerException
at org.jivesoftware.openfire.spi.EncryptionArtifactFactory.getKeyManagers(EncryptionArtifactFactory.java:69)
at org.jivesoftware.openfire.spi.EncryptionArtifactFactory.getSSLContext(EncryptionArtifactFactory.java:103)
at org.jivesoftware.openfire.spi.EncryptionArtifactFactory.createServerModeSslFilter(EncryptionArtifactFactory.java:261)
at org.jivesoftware.openfire.spi.MINAConnectionAcceptor.start(MINAConnectionAcceptor.java:127)
at org.jivesoftware.openfire.spi.ConnectionListener.start(ConnectionListener.java:216)
at org.jivesoftware.openfire.spi.ConnectionManagerImpl.startListeners(ConnectionManagerImpl.java:298)
at org.jivesoftware.openfire.spi.ConnectionManagerImpl.access$100(ConnectionManagerImpl.java:46)
at org.jivesoftware.openfire.spi.ConnectionManagerImpl$1.pluginsMonitored(ConnectionManagerImpl.java:287)
at org.jivesoftware.openfire.container.PluginManager.firePluginsMonitored(PluginManager.java:1221)
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:323)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018.05.17 16:01:23 ERROR [pool-4-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - Error creating SSL connector for Http bind
java.lang.NullPointerException

That doesn’t say much to me, but i’m not a java exceptions expert. Maybe you should post more of the logs. Or you can try reinstalling it again. Now you can install the newest version right away as your database must be updated already. Btw, when you install Openfire, it generates its own self-signed certificates, which are shown in the truststore and one have to remove them and import their own certificates. Did you see them?

Re self-signed certificate, no i didn’t see it this time. I did see it on a fresh install yes, which I have since replaced with my certificate. But for the latest setup with old db imported, i didn’t see it, and there’s no certificate in the store.

Anyway, i also think the upgrade corrupted it, as some of the plugins are also missing. Thanks for the help. Will try to re-install for now.