[ https://issues.apache.org/jira/browse/SUBMARINE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wanqiang Ji updated SUBMARINE-446: ---------------------------------- Target Version: 0.4.0 > Submarine server does not reconnect automatically to MySQL > ---------------------------------------------------------- > > Key: SUBMARINE-446 > URL: https://issues.apache.org/jira/browse/SUBMARINE-446 > Project: Apache Submarine > Issue Type: Bug > Reporter: Wei-Chiu Chuang > Assignee: Neo Chien > Priority: Major > Labels: pull-request-available > Fix For: 0.4.0 > > Time Spent: 20m > Remaining Estimate: 0h > > After a few hours, the Submarine server emits the following error message in > the log: > {noformat} > Opening JDBC Connection > Checked out connection 49237116 from pool. > Setting autocommit to false on JDBC Connection > [com.mysql.jdbc.JDBC4Connection@2ef4c7c] > Resetting autocommit to true on JDBC Connection > [com.mysql.jdbc.JDBC4Connection@2ef4c7c] > Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@2ef4c7c] > Returned connection 49237116 to pool. > [ERROR] 2020-03-20 22:26:17,724 > method:org.apache.submarine.server.workbench.rest.LoginRestApi.login(LoginRestApi.java:65) > ### Error querying database. Cause: > org.apache.ibatis.transaction.TransactionException: Error configuring > AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). > Requested setting: false. Cause: > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet > successfully received from the server was 163,618,589 milliseconds ago. The > last packet sent successfully to the server was 163,618,589 milliseconds ago. > is longer than the server configured value of 'wait_timeout'. You should > consider either expiring and/or testing connection validity before use in > your application, increasing the server configured values for client > timeouts, or using the Connector/J connection property 'autoReconnect=true' > to avoid this problem. > ### The error may exist in > org/apache/submarine/database/mappers/SysUserMapper.xml > ### The error may involve > org.apache.submarine.server.workbench.database.mappers.SysUserMapper.login > ### The error occurred while executing a query > ### Cause: org.apache.ibatis.transaction.TransactionException: Error > configuring AutoCommit. Your driver may not support getAutoCommit() or > setAutoCommit(). Requested setting: false. Cause: > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet > successfully received from the server was 163,618,589 milliseconds ago. The > last packet sent successfully to the server was 163,618,589 milliseconds ago. > is longer than the server configured value of 'wait_timeout'. You should > consider either expiring and/or testing connection validity before use in > your application, increasing the server configured values for client > timeouts, or using the Connector/J connection property 'autoReconnect=true' > to avoid this problem. > org.apache.ibatis.exceptions.PersistenceException: > ### Error querying database. Cause: > org.apache.ibatis.transaction.TransactionException: Error configuring > AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). > Requested setting: false. Cause: > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet > successfully received from the server was 163,618,589 milliseconds ago. The > last packet sent successfully to the server was 163,618,589 milliseconds ago. > is longer than the server configured value of 'wait_timeout'. You should > consider either expiring and/or testing connection validity before use in > your application, increasing the server configured values for client > timeouts, or using the Connector/J connection property 'autoReconnect=true' > to avoid this problem. > ### The error may exist in > org/apache/submarine/database/mappers/SysUserMapper.xml > ### The error may involve > org.apache.submarine.server.workbench.database.mappers.SysUserMapper.login > ### The error occurred while executing a query > ### Cause: org.apache.ibatis.transaction.TransactionException: Error > configuring AutoCommit. Your driver may not support getAutoCommit() or > setAutoCommit(). Requested setting: false. Cause: > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet > successfully received from the server was 163,618,589 milliseconds ago. The > last packet sent successfully to the server was 163,618,589 milliseconds ago. > is longer than the server configured value of 'wait_timeout'. You should > consider either expiring and/or testing connection validity before use in > your application, increasing the server configured values for client > timeouts, or using the Connector/J connection property 'autoReconnect=true' > to avoid this problem. > at > org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) > at > org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111) > at > org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102) > at > org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66) > at > org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68) > at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) > at com.sun.proxy.$Proxy42.login(Unknown Source) > at > org.apache.submarine.server.workbench.rest.LoginRestApi.login(LoginRestApi.java:61) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ..... > Caused by: org.apache.ibatis.transaction.TransactionException: Error > configuring AutoCommit. Your driver may not support getAutoCommit() or > setAutoCo > mmit(). Requested setting: false. Cause: > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet > successfully received from the serv > er was 163,618,589 milliseconds ago. The last packet sent successfully to > the server was 163,618,589 milliseconds ago. is longer than the server conf > igured value of 'wait_timeout'. You should consider either expiring and/or > testing connection validity before use in your application, increasing the > server configured values for client timeouts, or using the Connector/J > connection property 'autoReconnect=true' to avoid this problem. > at > org.apache.ibatis.transaction.jdbc.JdbcTransaction.setDesiredAutoCommit(JdbcTransaction.java:105) > at > org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:138) > at > org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:61) > at > org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279) > at > org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72) > at > org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59) > at > org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) > at > org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137) > at > org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96) > at > com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:108) > at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60) > at com.sun.proxy.$Proxy41.query(Unknown Source) > at > org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108) > ... 58 more > Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last > packet successfully received from the server was 163,618,589 milliseconds > ago. The last packet sent successfully to the server was 163,618,589 > milliseconds ago. is longer than the server configured value of > 'wait_timeout'. You should consider either expiring and/or testing connection > validity before use in your application, increasing the server configured > values for client timeouts, or using the Connector/J connection property > 'autoReconnect=true' to avoid this problem. > 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:423) > ... > Caused by: java.net.SocketException: Broken pipe (Write failed) > at java.net.SocketOutputStream.socketWrite0(Native Method) > at > java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) > at java.net.SocketOutputStream.write(SocketOutputStream.java:155) > at > java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) > at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) > at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3721) > ... 80 more > {noformat} > The default JDBC URL has the autoReconnect=true option. Not sure why it still > doesn't reconnect automatically. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org For additional commands, e-mail: dev-h...@submarine.apache.org