Open Raofy opened 3 years ago
这是数据库连接的问题那。 你可以选择调整下连接参数,或者调整下mysql的配置信息那。
@Mihawk-lf 也就是数据库连接池是没有问题的
JobScheduleHelper 这个类,网上下载最新的版本,替换老版本,重新启动试试。 Connection conn = null; 是这个地方出了问题,数据库链接释放,但是Connection还在,应该每次都重新连接
我现在版本是2.1.0 也有这个问题,开发查原因是因为应用注册地址有通过vpn链接的本地ip,断开之后xxljob会一直尝试调度任务而造成连接池问题,大佬们有什么解决方法么
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
2.2.0 mysql 8.0
Expected behavior
正常运行调度
Actual behavior
全部的任务都没有执行,admin程序没有调度任务
Steps to reproduce the behavior
得到的信息导出xml文件
得到结果如下
The last packet successfully received from the server was 10,601,598 milliseconds ago. The last packet sent successfully to the server was 10,601,603 milliseconds ago. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) at com.mysql.cj.jdbc.ConnectionImpl.commit(ConnectionImpl.java:814) at com.zaxxer.hikari.pool.ProxyConnection.commit(ProxyConnection.java:366) at com.zaxxer.hikari.pool.HikariProxyConnection.commit(HikariProxyConnection.java) at com.xxl.job.admin.core.thread.JobScheduleHelper$1.run(JobScheduleHelper.java:153) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet successfully received from the server was 10,601,598 milliseconds ago. The last packet sent successfully to the server was 10,601,603 milliseconds ago. 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.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:539) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:703) at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:642) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:941) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:887) at com.mysql.cj.NativeSession.execSQL(NativeSession.java:1073) at com.mysql.cj.jdbc.ConnectionImpl.commit(ConnectionImpl.java:802) ... 4 common frames omitted Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:67) at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63) at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45) at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:52) at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:41) at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54) at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44) at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:533) ... 10 common frames omitted 2021-03-08 14:26:43,636 ERROR [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 156] Communications link failure
The last packet successfully received from the server was 10,601,598 milliseconds ago. The last packet sent successfully to the server was 10,601,603 milliseconds ago. com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet successfully received from the server was 10,601,598 milliseconds ago. The last packet sent successfully to the server was 10,601,603 milliseconds ago. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) at com.mysql.cj.jdbc.ConnectionImpl.commit(ConnectionImpl.java:814) at com.zaxxer.hikari.pool.ProxyConnection.commit(ProxyConnection.java:366) at com.zaxxer.hikari.pool.HikariProxyConnection.commit(HikariProxyConnection.java) at com.xxl.job.admin.core.thread.JobScheduleHelper$1.run(JobScheduleHelper.java:153) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet successfully received from the server was 10,601,598 milliseconds ago. The last packet sent successfully to the server was 10,601,603 milliseconds ago. 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.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:539) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:703) at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:642) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:941) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:887) at com.mysql.cj.NativeSession.execSQL(NativeSession.java:1073) at com.mysql.cj.jdbc.ConnectionImpl.commit(ConnectionImpl.java:802) ... 4 common frames omitted Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:67) at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63) at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45) at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:52) at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:41) at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54) at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44) at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:533) ... 10 common frames omitted 2021-03-08 14:26:43,637 ERROR [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 163] Connection is closed java.sql.SQLException: Connection is closed at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.lambda$getClosedConnection$0(ProxyConnection.java:494) at com.sun.proxy.$Proxy100.setAutoCommit(Unknown Source) at com.zaxxer.hikari.pool.ProxyConnection.setAutoCommit(ProxyConnection.java:393) at com.zaxxer.hikari.pool.HikariProxyConnection.setAutoCommit(HikariProxyConnection.java) at com.xxl.job.admin.core.thread.JobScheduleHelper$1.run(JobScheduleHelper.java:160) at java.lang.Thread.run(Thread.java:748) 2021-03-08 14:26:43,662 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 11 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 27 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 33 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 34 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 37 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 38 2021-03-08 14:26:43,663 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 47 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 52 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 61 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 66 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 67 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 74 2021-03-08 14:26:43,664 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 82 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 89 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 98 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 101 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 102 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 110 2021-03-08 14:26:43,665 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 112 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 117 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 118 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 123 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 125 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 126 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 162 2021-03-08 14:26:43,666 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 174 2021-03-08 14:26:43,667 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 175 2021-03-08 14:26:43,667 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 180 2021-03-08 14:26:43,667 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 189 2021-03-08 14:26:43,667 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 191 2021-03-08 14:26:43,667 WARN [xxl-job, admin JobScheduleHelper#scheduleThread] c.x.j.a.c.thread.JobScheduleHelper [JobScheduleHelper.java : 87] >>>>>>>>>>> xxl-job, schedule misfire, jobId = 209