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

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

      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."}}   
      

       

        This is the controller panel for Smart Panels app

            [CAM-13388] Concurrent issue while starting engine in a cluster (duplicate key for history level) in Camunda version 7.11

            Hi tfutaci,

            Thanks for contacting us with this issue.

            A short question: was this issue meant to be raised in our support project?

            The difference between the Support project and the Camunda BPM project is that when raising issues in the Camunda BPM project, they are not subject to the agreed SLAs and they can be viewed by all users. In contrast, issues raised in the Support project can only be seen by your authorized support contacts and us. You can find more information in our documentation.

            If you intended to raise a support issue, please let us know and we'll move this issue to the support project. Please let us know which customer's project it should belong to.

            Best regards,
            Michal

            Michal Dytko added a comment - Hi tfutaci , Thanks for contacting us with this issue. A short question: was this issue meant to be raised in our support project? The difference between the Support project and the Camunda BPM project is that when raising issues in the Camunda BPM project, they are not subject to the agreed SLAs and they can be viewed by all users. In contrast, issues raised in the Support project can only be seen by your authorized support contacts and us. You can find more information in our documentation . If you intended to raise a support issue, please let us know and we'll move this issue to the support project. Please let us know which customer's project it should belong to. Best regards, Michal

            Hi Michal

            thanks for your reply

            I'm closing and deleting this is a wrong ticket type.

            regards

            TOYGUN FUTACI added a comment - Hi Michal thanks for your reply I'm closing and deleting this is a wrong ticket type. regards

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

                Created:
                Updated:
                Resolved: