You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/24 10:43:00 UTC

[jira] [Work logged] (SUBMARINE-446) Submarine server does not reconnect automatically to MySQL

     [ https://issues.apache.org/jira/browse/SUBMARINE-446?focusedWorklogId=408654&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-408654 ]

ASF GitHub Bot logged work on SUBMARINE-446:
--------------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Mar/20 10:42
            Start Date: 24/Mar/20 10:42
    Worklog Time Spent: 10m 
      Work Description: cchung100m commented on pull request #247: SUBMARINE-446. Submarine server does not reconnect automatically to MySQL
URL: https://github.com/apache/submarine/pull/247
 
 
   ### What is this PR for?
   Hi @jojochuang 
   
   This PR is going to solve the submarine server does not reconnect automatically to MySQL, I would appreciate that if you can help to review/manage it, thanks.
   
   
   ### What type of PR is it?
   [Bug Fix ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   
   https://issues.apache.org/jira/browse/SUBMARINE-446
   
   ### How should this be tested?
   
   https://travis-ci.org/github/cchung100m/submarine/builds/666269006?utm_medium=notification&utm_source=github_status
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 408654)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  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-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org