Error Upgrade Openfire from 4.2.4 to 4.3.2

Hi, community.
When upgrading to Openfire from 4.2.4 (or from 4.2.3) to 4.3.2, the Openfire server does not start and http: // openfire: 9090 does not work. =(

What I’ve done:
/etc/init.d/openfire stop
dpkg -i openfire_4.3.2_all.deb chose parameter N
/etc/init.d/openfire start

Ubuntu 16.04.1 LTS
Database and Version:|MySQL 5.7.25-0ubuntu0.16.04.2|
JDBC Driver:|MySQL Connector Java|
JDBC Driver Version:|mysql-connector-java-5.1.42

logs:
2019.02.01 19:46:28 org.jivesoftware.database.DbConnectionManager - The server time zone value ‘MSK’ 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.
java.sql.SQLException: The server time zone value ‘MSK’ 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 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.setConnectionProvider(DbConnectionManager.java:602) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.database.DbConnectionManager.ensureConnectionProvider(DbConnectionManager.java:99) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:121) [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 ‘MSK’ 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 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]
… 30 more
2019.02.01 19:46:31 org.jivesoftware.util.JiveProperties - 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 ‘MSK’ 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.
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 ‘MSK’ 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.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]
2019.02.01 19:46:34 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 ‘MSK’ 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.(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]
2019.02.01 19:46:34 org.jivesoftware.openfire.XMPPServer - 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 ‘MSK’ 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.
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 server time zone value ‘MSK’ 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.openfire.XMPPServer.verifyDataSource(XMPPServer.java:956) ~[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.(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: 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 ‘MSK’ 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]
… 9 more

jdbc:mysql://x.x.x.x:3306/openfire?serverTimezone=UTC

add to config ?serverTimezone=UTC

2 Likes

Hello;
you have to try to change the connector from mysql-connector-java-8.0.12.jar to mysql-connector-java-5.1.42.jar.

Thx it helped even in v4.4.2

This will be the case with any newer version too. It’s not a bug, but how new version of sql driver operates.