Project

General

Profile

handling DB reboot

Igor Khomenko
Added almost 3 years ago

Hi there,

We run Tigase on AWS and use Amazon RDS MySQL as database service.

We found an issue with DB reboot, so Tigase isn't working after it, we need to reboot Tigase server as well

here is a detailed log:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1038)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:338)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2237)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2270)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2069)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
        at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:270)
        at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:433)
        at tigase.db.jdbc.DataRepositoryImpl.checkConnection(DataRepositoryImpl.java:372)
        at tigase.db.jdbc.DataRepositoryImpl.getPreparedStatement(DataRepositoryImpl.java:182)
        at tigase.db.DataRepositoryPool.getPreparedStatement(DataRepositoryPool.java:139)
        at tigase.db.jdbc.JDBCRepository.getUserUID(JDBCRepository.java:460)
        at tigase.db.jdbc.JDBCRepository.getUserUID(JDBCRepository.java:1178)
        at tigase.db.jdbc.JDBCRepository.getNodeNID(JDBCRepository.java:1162)
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:239)
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:289)
        at tigase.db.UserRepositoryMDImpl.getData(UserRepositoryMDImpl.java:135)
        at tigase.db.comp.UserRepoRepository.reload(UserRepoRepository.java:128)
        at tigase.db.comp.ConfigRepository$1.run(ConfigRepository.java:73)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:213)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:297)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2237)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2270)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2069)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
        at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:270)
        at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:433)
        at tigase.db.jdbc.DataRepositoryImpl.checkConnection(DataRepositoryImpl.java:372)
        at tigase.db.jdbc.DataRepositoryImpl.getPreparedStatement(DataRepositoryImpl.java:182)
        at tigase.db.DataRepositoryPool.getPreparedStatement(DataRepositoryPool.java:139)
        at tigase.db.jdbc.JDBCRepository.getUserUID(JDBCRepository.java:460)
        at tigase.db.jdbc.JDBCRepository.getUserUID(JDBCRepository.java:1178)
        at tigase.db.jdbc.JDBCRepository.getNodeNID(JDBCRepository.java:1162)
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:239)
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:289)
        at tigase.db.UserRepositoryMDImpl.getData(UserRepositoryMDImpl.java:135)
        at tigase.db.comp.UserRepoRepository.reload(UserRepoRepository.java:128)
        at tigase.db.comp.ConfigRepository$1.run(ConfigRepository.java:73)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
2016-02-17 15:12:23.586 [hostnames]        UserRepoRepository.reload()        SEVERE:   Problem with loading items list from the database.
tigase.db.TigaseDBException: Error getting user data for: vhost-manager/null/vhosts-lists
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:273)
        at tigase.db.jdbc.JDBCRepository.getData(JDBCRepository.java:289)
        at tigase.db.UserRepositoryMDImpl.getData(UserRepositoryMDImpl.java:135)
        at tigase.db.comp.UserRepoRepository.reload(UserRepoRepository.java:128)
        at tigase.db.comp.ConfigRepository$1.run(ConfigRepository.java:73)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

are you aware of it?


Replies (1)

Added by Wojciech Kapcia TigaseTeam almost 3 years ago

Tigase should reinitialize the connection once the DB is up again. Is it not the case?

    (1-1/1)