org.quartz.JobPersistenceException: Couldn't acquire next trigger: No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.]

Terracotta Project Issue Tracker | xing wei | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Will use quartz to schedule out timed-jobs, we found a problem(possible is a bug). When the disk sapce is full, the trigger can't connect to database(Database is on the same server), so the transaction will't commit, the data of table fired_triggers will not be removed, the next trigger will not be excute even then the disk has clean up! Othes jobs work fine. If restart the process, it can be resume.During the working, it can’t be resumed automatically. org.quartz.JobPersistenceException: Couldn't acquire next trigger: No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.] at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2827) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2746) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2742) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. at sun.reflect.GeneratedConstructorAccessor44.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1311) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1303) at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4530) at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4495) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302) at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:73) at com.sun.proxy.$Proxy20.prepareStatement(Unknown Source) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2557) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778) ... 4 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 20,012 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.GeneratedConstructorAccessor45.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1129) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3720) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3609) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4160) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5355) at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.setAutoCommit(AttributeRestoringConnectionInvocationHandler.java:98) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:66) at com.sun.proxy.$Proxy20.setAutoCommit(Unknown Source) at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:788) at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:71) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788) ... 2 more 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.jdbc.MysqlIO.readFully(MysqlIO.java:3166) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3620) ... 16 more Thanks!

    Terracotta Project Issue Tracker | 2 years ago | xing wei
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.]
  2. 0

    Will use quartz to schedule out timed-jobs, we found a problem(possible is a bug). When the disk sapce is full, the trigger can't connect to database(Database is on the same server), so the transaction will't commit, the data of table fired_triggers will not be removed, the next trigger will not be excute even then the disk has clean up! Othes jobs work fine. If restart the process, it can be resume.During the working, it can’t be resumed automatically. org.quartz.JobPersistenceException: Couldn't acquire next trigger: No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.] at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2827) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2746) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2742) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. at sun.reflect.GeneratedConstructorAccessor44.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1311) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1303) at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4530) at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4495) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:302) at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:73) at com.sun.proxy.$Proxy20.prepareStatement(Unknown Source) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2557) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778) ... 4 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 20,012 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.GeneratedConstructorAccessor45.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1129) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3720) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3609) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4160) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5355) at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.setAutoCommit(AttributeRestoringConnectionInvocationHandler.java:98) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:66) at com.sun.proxy.$Proxy20.setAutoCommit(Unknown Source) at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:788) at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:71) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788) ... 2 more 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.jdbc.MysqlIO.readFully(MysqlIO.java:3166) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3620) ... 16 more Thanks!

    Terracotta Project Issue Tracker | 2 years ago | xing wei
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.]
  3. 0

    OTTER中NODE日志告警:Communications link failure

    GitHub | 4 months ago | aiaix
    java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.transaction.Cann otCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.Comm unicationsException: Communications link failure The last packet successfully received from the server was 59,574 milliseconds ago. The last packet sent successfully to the server wa s 0 milliseconds ago.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    LWC timing out

    GitHub | 4 years ago | mrchasez
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 394,675 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
  6. 0

    org.hibernate.exception.JDBCConnectionException: Cannot open connection

    Stack Overflow | 3 years ago | Muhammad Tauseef
    org.hibernate.exception.JDBCConnectionException: Cannot open connection

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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.jdbc.MysqlIO.readFully()
    2. MySQL jdbc
      ConnectionImpl.setAutoCommit
      1. com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3166)
      2. com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3620)
      3. com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3609)
      4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4160)
      5. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
      6. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
      7. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819)
      8. com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5355)
      8 frames
    3. Commons DBCP
      PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit
      1. org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
      2. org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
      2 frames
    4. quartz
      AttributeRestoringConnectionInvocationHandler.invoke
      1. org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.setAutoCommit(AttributeRestoringConnectionInvocationHandler.java:98)
      2. org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:66)
      2 frames
    5. com.sun.proxy
      $Proxy20.setAutoCommit
      1. com.sun.proxy.$Proxy20.setAutoCommit(Unknown Source)
      1 frame
    6. quartz
      QuartzSchedulerThread.run
      1. org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:788)
      2. org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:71)
      3. org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
      4. org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2742)
      5. org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
      5 frames