zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Mysql 的异常:The last packet successfully received from the server was 90 milliseconds ago. The last packet sent successfully to the server was 43,603,303 milliseconds ago. is longer than the server con

mysqlserver异常 to The is from was
2023-09-14 08:57:00 时间

 

调试一个程序, 调试到一半, 下班回家, 程序卡在了某一行, 第二天早上回来一看, 发现了异常:

Wed Sep 18 09:51:00 GMT+08:00 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Wed Sep 18 09:51:00 GMT+08:00 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2019-09-18 09:51:00.722 [pool-3-thread-1] ERROR com.alibaba.druid.pool.DruidDataSource - discard connection
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 90 milliseconds ago.  The last packet sent successfully to the server was 43,603,303 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)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3743)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2506)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
    at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1453)
    at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:178)
    at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:6692)
    at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:851)
    at com.alibaba.druid.pool.DruidPooledResultSet.close(DruidPooledResultSet.java:87)
    at com.alibaba.otter.canal.client.adapter.support.Util.sqlRS(Util.java:42)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.subTableSimpleFieldOperation(ESSyncService.java:602)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.update(ESSyncService.java:302)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:95)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:58)
    at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:172)
    at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:151)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.batchSync(AbstractCanalAdapterWorker.java:201)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$1(AbstractCanalAdapterWorker.java:62)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$2(AbstractCanalAdapterWorker.java:58)
    at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
    at java.util.concurrent.FutureTask.run(FutureTask.java)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
    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:3725)
    ... 24 common frames omitted
2019-09-18 09:51:00.867 [pool-3-thread-1] ERROR com.alibaba.otter.canal.client.adapter.support.Util - sqlRs has error, sql: SELECT * FROM (SELECT user_id, group_concat(label ORDER BY id DESC SEPARATOR ';') AS labels
FROM label
GROUP BY user_id) c WHERE c.user_id=3  
2019-09-18 09:51:00.867 [pool-3-thread-1] ERROR c.a.otter.canal.client.adapter.es.service.ESSyncService - sync error, es index: erdp-join, DML : Dml{destination='example', database='elppmdb', table='label', type='UPDATE', es=1568727199000, ts=1568727199765, sql='', data=[{id=5, user_id=3, name=ttt, label=lab-rst, c_time=2019-09-17 21:33:19.0}], old=[{label=lab-rs, c_time=2019-09-17 19:10:04.0}]}
2019-09-18 09:51:00.923 [pool-3-thread-1] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 90 milliseconds ago.  The last packet sent successfully to the server was 43,603,303 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.
java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 90 milliseconds ago.  The last packet sent successfully to the server was 43,603,303 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 com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:110)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:58)
    at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:172)
    at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:151)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.batchSync(AbstractCanalAdapterWorker.java:201)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$1(AbstractCanalAdapterWorker.java:62)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$2(AbstractCanalAdapterWorker.java:58)
    at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
    at java.util.concurrent.FutureTask.run(FutureTask.java)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 90 milliseconds ago.  The last packet sent successfully to the server was 43,603,303 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 com.alibaba.otter.canal.client.adapter.support.Util.sqlRS(Util.java:45)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.subTableSimpleFieldOperation(ESSyncService.java:602)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.update(ESSyncService.java:302)
    at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:95)
    ... 12 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 90 milliseconds ago.  The last packet sent successfully to the server was 43,603,303 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)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3743)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2506)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
    at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1453)
    at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:178)
    at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:6692)
    at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:851)
    at com.alibaba.druid.pool.DruidPooledResultSet.close(DruidPooledResultSet.java:87)
    at com.alibaba.otter.canal.client.adapter.support.Util.sqlRS(Util.java:42)
    ... 15 common frames omitted
Caused by: java.net.SocketException: Software caused connection abort: socket write error
    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:3725)
    ... 24 common frames omitted
2019-09-18 09:51:01.447 [Thread-26] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - process error!
com.alibaba.otter.canal.protocol.exception.CanalClientException: java.io.IOException: 你的主机中的软件中止了一个已建立的连接。
    at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.ack(SimpleCanalConnector.java:351)
    at com.alibaba.otter.canal.adapter.launcher.loader.CanalAdapterWorker.process(CanalAdapterWorker.java:135)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: 你的主机中的软件中止了一个已建立的连接。
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
    at sun.nio.ch.IOUtil.write(IOUtil.java:65)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
    at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)
    at java.nio.channels.Channels.writeFully(Channels.java:98)
    at java.nio.channels.Channels.access$000(Channels.java:61)
    at java.nio.channels.Channels$1.write(Channels.java:174)
    at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
    at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.writeWithHeader(SimpleCanalConnector.java:393)
    at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.writeWithHeader(SimpleCanalConnector.java:381)
    at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.ack(SimpleCanalConnector.java:345)
    ... 2 common frames omitted
2019-09-18 09:51:01.449 [Thread-26] INFO  c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Disconnect destination: example <=============
2019-09-18 09:51:02.450 [Thread-26] INFO  c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Start to connect destination: example <=============
2019-09-18 09:51:02.454 [Thread-26] INFO  c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Start to subscribe destination: example <=============
2019-09-18 09:51:02.455 [Thread-26] INFO  c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - =============> Subscribe destination: example succeed <=============
2019-09-18 09:51:02.476 [pool-3-thread-1] INFO  c.a.o.canal.client.adapter.logger.LoggerAdapterExample - DML: {"data":[{"id":5,"user_id":3,"name":"ttt","label":"lab-rst","c_time":1568727199000}],"database":"elppmdb","destination":"example","es":1568727199000,"groupId":null,"isDdl":false,"old":[{"label":"lab-rs","c_time":1568718604000}],"pkNames":["id"],"sql":"","table":"label","ts":1568771462474,"type":"UPDATE"}

 

错误信息一大堆,其实就是 其实关键字是 timeouts, 也就是 mysql 的连接 超时了! 不用管, 重启就好了!