vitalidze / traccar-web

Traccar Web UI mod
http://traccar.litvak.su/
152 stars 145 forks source link

SEVERE: Error during scheduled task execution #846

Open akamomer opened 8 years ago

akamomer commented 8 years ago

Dear,

Your kind help about this error, Thanks.

INFO | jvm 1 | 2016/09/14 02:00:28 | INFO | jvm 1 | 2016/09/14 02:00:28 | Sep 14, 2016 2:00:28 AM org.traccar.web.server.model.ScheduledTask run INFO | jvm 1 | 2016/09/14 02:00:28 | SEVERE: Error during scheduled task execution INFO | jvm 1 | 2016/09/14 02:00:28 | javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed: INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:62) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.traccar.web.server.model.ScheduledTask.run(ScheduledTask.java:35) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | 2016/09/14 02:00:28 | Caused by: org.hibernate.TransactionException: JDBC begin transaction failed: INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:76) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1435) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61) INFO | jvm 1 | 2016/09/14 02:00:28 | ... 9 more INFO | jvm 1 | 2016/09/14 02:00:28 | Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure INFO | jvm 1 | 2016/09/14 02:00:28 | INFO | jvm 1 | 2016/09/14 02:00:28 | The last packet successfully received from the server was 210,639 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. INFO | jvm 1 | 2016/09/14 02:00:28 | at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source) INFO | jvm 1 | 2016/09/14 02:00:28 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) INFO | jvm 1 | 2016/09/14 02:00:28 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:981) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3465) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3365) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3805) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4874) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:1059) INFO | jvm 1 | 2016/09/14 02:00:28 | at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:72) INFO | jvm 1 | 2016/09/14 02:00:28 | ... 12 more INFO | jvm 1 | 2016/09/14 02:00:28 | Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2957) INFO | jvm 1 | 2016/09/14 02:00:28 | at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3375) INFO | jvm 1 | 2016/09/14 02:00:28 | ... 20 more INFO | jvm 1 | 2016/09/14 02:00:28 |

vitalidze commented 8 years ago

This means the system has lost connection to the MySQL server. It may happen for two reasons:

1) MySQL server went down

2) MySQL server has closed connection. There is a special setting something like "connection wait timeout", which indicates how much time MySQL waits for inactive connection to be closed. This setting must be set to 10 (ten) minutes or greater. On some systems it may be set to 1 (one) minute, which can cause such issues.

akamomer commented 8 years ago

Many thanks, I will do what you recommended and check the server again.