Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13388

Concurrent issue while starting engine in a cluster (duplicate key for history level) in Camunda version 7.11

    XMLWordPrintable

Details

    • Task
    • Resolution: None
    • L3 - Default
    • None
    • None
    • engine

    Description

      Problem:
      When two process engines starts in a cluster in parallel, a ProcessEngineException can occur while trying to commit the history level configuration to the database.

      2021-04-10T21:45:17.688+01:00@ieatenmc3b09-flowautomation-0@JBOSS@ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 63) MSC000001: Failed to start service org.camunda.bpm.platform.process-engine.default: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-engine.default: org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:101) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_281]#012#011at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_281]#012#011at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-2.3.3.Final-redhat-00001.jar:2.3.3.Final-redhat-00001]#012#011at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) [jboss-threads-2.3.3.Final-redhat-00001.jar:2.3.3.Final-redhat-00001]#012#011at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) [jboss-threads-2.3.3.Final-redhat-00001.jar:2.3.3.Final-redhat-00001]#012#011at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348) [jboss-threads-2.3.3.Final-redhat-00001.jar:2.3.3.Final-redhat-00001]#012#011at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_281]#012#011at org.jboss.threads.JBossThread.run(JBossThread.java:485) [jboss-threads-2.3.3.Final-redhat-00001.jar:2.3.3.Final-redhat-00001]#012Caused by: org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.#012#011at org.camunda.bpm.engine.impl.util.ExceptionUtil.wrapPersistenceException(ExceptionUtil.java:263) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationException(EnginePersistenceLogger.java:132) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:364) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:323) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:295) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:272) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:188) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:149) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:111) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:973) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startProcessEngine(MscManagedProcessEngineController.java:181) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:135) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:133) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:54) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:46) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startInternal(MscManagedProcessEngineController.java:133) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:94) [camunda-wildfly-subsystem-7.14.6-ee.jar:7.14.6-ee]#012#011... 8 more#012Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03004 Exception while executing Database Operation 'INSERT PropertyEntity[historyLevel]' with message '#012### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "act_ge_property_pkey"#012  Detail: Key (name_)=(historyLevel) already exists.#012'. Flush summary: #012 [#012  INSERT PropertyEntity[historyLevel]#012]#012#011at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationException(EnginePersistenceLogger.java:131) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011... 26 more#012Caused by: org.apache.ibatis.exceptions.PersistenceException: #012### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012#011at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)#012#011at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:254)#012#011at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.flushBatchOperations(DbSqlSession.java:444) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.sql.BatchDbSqlSession.executeDbOperations(BatchDbSqlSession.java:74) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:341) [camunda-engine-7.14.6-ee.jar:7.14.6-ee]#012#011... 25 more#012Caused by: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012  2021-04-10T21:45:17.701+01:00@ieatenmc3b09-flowautomation-0@JBOSS@ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([#012    ("subsystem" => "camunda-bpm-platform"),#012    ("process-engines" => "default")#012]) - failure description: {"WFLYCTL0080: Failed services" => {"org.camunda.bpm.platform.process-engine.default" => "org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.#012    Caused by: org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.#012    Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03004 Exception while executing Database Operation 'INSERT PropertyEntity[historyLevel]' with message '#012### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "act_ge_property_pkey"#012  Detail: Key (name_)=(historyLevel) already exists.#012'. Flush summary: #012 [#012  INSERT PropertyEntity[historyLevel]#012]#012    Caused by: org.apache.ibatis.exceptions.PersistenceException: #012### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012    Caused by: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.insertProperty (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause.#012    Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_GE_PROPERTY (#012        NAME_,#012        VALUE_,#012        REV_#012      ) values (#012        'historyLevel',#012        '2',#012        1#012      ) was aborted.  Call getNextException to see the cause."}}   
      

       

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              michal.dytko Michal Dytko
              tfutaci TOYGUN FUTACI
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce