powered by Jive Software

OS Server update crashed web access of openfire

I have ubuntu server 16.04 with openfire 4.3.2 and Java Version 8. It worked fine to last update of ubuntu. Now I can’t access the web page localhost:9090 anymore - page not found! How can I find out what the problem is and how can I fix that?

Restart of openfire works and gives no failure alert!

Could be a number of reasons. I’d start with:

  • Check if the Openfire process is running (ps ax | grep -i openfire).
  • See what version of Java is used to run Openfire (you can have more than one version of Java installed, maybe the upgrade installed something new).
  • Make sure that not more than one process is running.
  • Review the Openfire logs (less -Si /opt/openfire/logs/all.log). Did Openfire start correctly? Any errors?
  • See if the Openfire process is correctly listening for network traffic (netstat -alnp | less -Si)
  • Check if the OS upgrade installed/enabled a firewall that is blocking access.
1 Like

I have a test machine with Ubuntu Server 16.04.6 and Openfire 4.3.2 installed. I have just done “sudo apt-get upgrade”. Not many updates actually. Openfire still works fine.

If you have a few Java versions on your system, usually new one is the default (run “java -version” to see). If Java 10 is the default on your system, then you should define custom default for Openfire:

sudo nano /etc/default/openfire
uncomment JAVA_HOME
set to =/usr/lib/jvm/java-8-openjdk-amd64/jre

ps ax | grep -i openfire
6513 ? Sl 0:08 /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/openfire/lib/startup.jar -jar /usr/share/openfire/lib/startup.jar
6534 pts/2 S+ 0:00 grep --color=auto -i openfire

less -Si /opt/openfire/logs/all.log
/opt/openfire/logs/all.log: file or directory not found

Network no problems!

Deb installs into /user/share/openfire, so run
less -Si /usr/share/openfire/logs/all.log

here is the result of: sudo less -Si /usr/share/openfire/logs/all.log
It do not give me any information, what I can do to fix it.
2019.04.05 09:18:06 INFO [main]: org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 4 out of 10).
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 pr
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[?:1.8.0_191]
at java.sql.DriverManager.getConnection(DriverManager.java:247) ~[?:1.8.0_191]
at org.apache.commons.dbcp2.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:90) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:291) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:883) ~[commons-pool2-2.6.0.jar:2.6.0]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:436) ~[commons-pool2-2.6.0.jar:2.6.0]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:365) ~[commons-pool2-2.6.0.jar:2.6.0]
at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnectionProvider.java:91) ~[xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:129) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:438) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:90) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:66) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:556) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.util.cache.CacheFactory.(CacheFactory.java:88) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:394) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:640) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.XMPPServer.(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]
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value ‘CEST’ is unrecognized or represents more than one time zone. You must configure either the server or JDB
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 com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:128) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2236) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2260) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1314) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:963) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) ~[mysql-connector-java-8.0.12.jar:8.0.12]

It seems that recent Ubuntu or MySQL update changed something about the timezones. Here a user fixed similar issue by editing the mysql config file (you should put a time zone that is correct for you) Openfire doesn't start in linux. May be a timezone problem?

You can also edit the /conf/openfire.xml and edit the database connection string as described here https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue:

what timezone is correct to set? normal time or daylight saving time? And based on UTC or CET?

I think it should be UTC. I don’t know your timezone. Mine is UTC +02:00, so i would put ‘+02:00’.

Berlin
|2019|So, 31. Mar, 02:00|CET → CEST|+1 hour (DST start)|UTC+2h|
|2019|So, 27. Oct, 03:00|CEST → CET|-1 hour (DST end)|UTC+1h|
does that mean, I have to change the timezone in October again?

Can’t answer that.

So, have you tried to apply any of these values? Did it help?


In this thread it seems that it helped for a user (second one replying) to set it to
&serverTimezone=UTC instead of say &serverTimezone=PST at the end of connection string in openfire.xml
As this is not a specific UTC zone, i guess this should work when time changes. But only time will tell.

What I did yet is: ```

edit /etc/mysql/mysql.conf.d/mysqld.cnf
in section [mysqld] i put the following sentence
default_time_zone=’+01:00’
restart mysql
same problem as before
I do not know what is that command doing?
sudo shutdown -r now

I have a File-Cloud running on that server and it has to be run. I can relinquish on openfire but not on the cloud. So what ever I do, I need to be shure that I do not crash the cloud.

That command would restart your server, which you don’t want. You can try the other variant with editing your DB connection string in /usr/share/openfire/openfire.xml and put &serverTimezone=UTC instead of &serverTimezone=PST or whatever zone code you have there. Stop Openfire before doing that.

I did reboot the server today, and openfire is back to work!
The steps:
dit /etc/mysql/mysql.conf.d/mysqld.cnf
in section [mysqld] i put the following sentence
default_time_zone=’+01:00’
restart server
Thanks for help!

1 Like

It soveld my timezone errors I had with CalDAV in lightning calender (Thunderbird) also!

1 Like

Additional bonus :slight_smile: Do you store your calendars in the same database?

Hallo!

it‘s a different database, but on the same mysql server. Time zone configuration was general, so it changed for CalDAV in owncloud also.

Viele Grüße,

Frank Klopotowski