Wei-Chiu Chuang created SUBMARINE-446:
-----------------------------------------
Summary: 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
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)
.....
{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: [email protected]
For additional commands, e-mail: [email protected]