Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22765

Make AdministrativeStatusManagerImpl.NotifyStatusesHandler a regular scheduled job

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.10
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Scheduler

      Description

      Currently AdministrativeStatusManagerImpl.NotifyStatusesHandler is scheduled every 5 minutes by an ad hoc Executors.newScheduledThreadPool. If this happens during shutdown, then the following may be thrown:

      2017-07-12 20:33:18,285 INFO  [main] [org.apache.catalina.core.StandardServer] A valid shutdown command was received via the shutdown port. Stopping the Server instance.
      2017-07-12 20:33:18,286 INFO  [main] [org.apache.coyote.http11.Http11Protocol] Pausing ProtocolHandler ["http-bio-0.0.0.0-8080"]
      2017-07-12 20:33:18,337 INFO  [main] [org.apache.coyote.ajp.AjpProtocol] Pausing ProtocolHandler ["ajp-bio-0.0.0.0-8009"]
      2017-07-12 20:33:18,388 INFO  [main] [org.apache.catalina.core.StandardService] Stopping service Catalina
      2017-07-12 20:37:29,281 ERROR [Nuxeo-Administrative-Statuses-Notify-Scheduler] [org.apache.geronimo.transaction.manager.RollbackTask] Unexpected exception committing org.apache.geronimo.connector.outbound.LocalXAResource@1af00a12; continuing to commit other RMs
      javax.transaction.xa.XAException
      	at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:88)
      	at org.apache.geronimo.transaction.manager.RollbackTask.run(RollbackTask.java:63)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:584)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:491)
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.rollback(NuxeoContainer.java:556)
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:386)
      	at org.nuxeo.ecm.core.management.statuses.AdministrativeStatusManagerImpl$NotifyStatusesHandler.run(AdministrativeStatusManagerImpl.java:133)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.resource.spi.LocalTransactionException: Unable to rollback
      	at org.nuxeo.runtime.datasource.PooledDataSourceFactory$JdbcConnectionFactory$1ManagedJDBCConnection.localTransactionRollback(PooledDataSourceFactory.java:281)
      	at org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback(AbstractManagedConnection.java:203)
      	at org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)
      	... 14 more
      Caused by: org.postgresql.util.PSQLException: This connection has been closed.
      	at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:766)
      	at org.postgresql.jdbc.PgConnection.rollback(PgConnection.java:773)
      	at org.nuxeo.runtime.datasource.PooledDataSourceFactory$JdbcConnectionFactory$1ManagedJDBCConnection.localTransactionRollback(PooledDataSourceFactory.java:279)
      	... 16 more
      

      Instead, it should be scheduled by the standard SchedulerService.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: