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!
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
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?
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?
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.
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!