Hello.
I have an openfire server installed in a ubuntu 16.04 server. I have configured automatic updates in it (a cron job make a apt-get update an a apt-get dist-upgrade automatically every day at night).
This morning, openfire is not working. Clients (spark) cant connect to it and i can see this message from them
org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: '_xmpp-client._tcp.192.168.0.14:5222' failed because javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name '_xmpp-client._tcp.192.168.0.14', '192.168.0.14:5222' failed because java.net.ConnectException: Connection refused: connect
at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:255)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:612)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:850)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:364)
at org.jivesoftware.LoginDialog$LoginPanel.login(LoginDialog.java:1138)
at org.jivesoftware.LoginDialog$LoginPanel.access$900(LoginDialog.java:369)
at org.jivesoftware.LoginDialog$LoginPanel$3.construct(LoginDialog.java:928)
at org.jivesoftware.spark.util.SwingWorker.lambda$new$1(SwingWorker.java:138)
at java.lang.Thread.run(Unknown Source)
I have a connection error in firefox when i try to enter in the openfire webpage (http://192.168.0.14:9090/index.jsp) and spark can’t connect to it. I I enter to http://192.168.0.14 I can see the webpage of apache, so apache is running.
So I made a “sudo service openfire status” and i can see this:
root@OpenFire:/var/log/openfire# sudo service openfire status
● openfire.service - LSB: Start/stop openfire jabber server
Loaded: loaded (/etc/init.d/openfire; bad; vendor preset: enabled)
Active: active (running) since lun 2019-04-01 10:04:45 CEST; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 2223 ExecStop=/etc/init.d/openfire stop (code=exited, status=0/SUCCESS)
Process: 2444 ExecStart=/etc/init.d/openfire start (code=exited, status=0/SUCCESS)
Tasks: 15
Memory: 63.9M
CPU: 2.667s
CGroup: /system.slice/openfire.service
└─2454 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -server -DopenfireHome=/usr/share/openfire -Dlog4j.configurationFile=/usr/share/openfire/lib/log4j2.xml -Dopenfire.lib.dir=/usr/share/openfire/lib -classpath /usr/share/ope
abr 01 10:04:45 OpenFire systemd[1]: Starting LSB: Start/stop openfire jabber server...
abr 01 10:04:45 OpenFire openfire[2444]: best java alternative in: /usr/lib/jvm/java-8-openjdk-amd64/jre
abr 01 10:04:45 OpenFire openfire[2444]: Starting openfire: openfire.
abr 01 10:04:45 OpenFire systemd[1]: Started LSB: Start/stop openfire jabber server.
Aparently the openfire service is working. Mysql is running too (I have phpmyadmin installed in this server an I can access to it and see all the databases). I think that all the users and the information still are in the server.
If i see the error logs i can see a lot of errors like this.
2019.04.01 09:34:44 org.jivesoftware.openfire.XMPPServer - Database could not be accessed
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 server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:156) ~[xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:946) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:648) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:236) [xmppserver-4.3.2.jar:4.3.2]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_191]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_191]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_191]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_191]
at java.lang.Class.newInstance(Class.java:442) [?:1.8.0_191]
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:92) [startup.jar:4.3.2]
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56) [startup.jar:4.3.2]
I can see the error of the timezone a lot of times. I think that yesterday there was in ubuntu an update of the timezones or something as it.
If i made “date” in terminal, i can seee this
root@OpenFire:/var/log/openfire# date
lun abr 1 10:37:52 CEST 2019
The timezone in the system is set at Europe/Madrid. I think that the solution is change timezone in any place in openfire or java (but i’m not sure). But remember that i can’t access to the login page of openfire.
How can I solve it?