xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.46k stars 10.86k forks source link

docker的swarm下调度中心集群报错? #1082

Closed kervin521 closed 4 years ago

kervin521 commented 5 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

v2.1.0

Expected behavior

image

Actual behavior

05:26:26.553 logback [xxl-job, admin JobScheduleHelper#scheduleThread] ERROR c.x.j.a.c.thread.JobScheduleHelper - >>>>>>>>>>> xxl-job, JobScheduleHelper#scheduleThread error:{}, com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction, 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.Util.getInstance(Util.java:408), at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:952), at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978), at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914), at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530), at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683), at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495), at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903), at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1242), at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), at java.lang.reflect.Method.invoke(Method.java:498), at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114), at com.sun.proxy.$Proxy77.execute(Unknown Source), at com.xxl.job.admin.core.thread.JobScheduleHelper$1.run(JobScheduleHelper.java:65), at java.lang.Thread.run(Thread.java:748),

Steps to reproduce the behavior

Other information

xuxueli commented 4 years ago

你好,这只底层触发组件小概率触发DB死锁导致,v2.1.1 已经做了修复,可以pull master体验下,参考master分支修改JobScheduleHelper相关实现。或者升级v2.1.1版本(即将发布);