ENGINE-03053 History is not enabled

Hello Team,

We have upgraded camunda from 7.10 to 7.19 and DB migration scripts also executed.

Camunda engine is running but we are seeing below error.

07-Nov-2023 17:15:52.869 SEVERE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03053 History is not enabled.

org.camunda.bpm.engine.ProcessEngineException: ENGINE-03053 History is not enabled.

at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.disabledHistoryException(EnginePersistenceLogger.java:484)

at org.camunda.bpm.engine.impl.persistence.AbstractHistoricManager.checkHistoryEnabled(AbstractHistoricManager.java:39)

at org.camunda.bpm.engine.impl.persistence.entity.CommentManager.insert(CommentManager.java:46)

=============

2nd error is.

07-Nov-2023 18:15:20.092 SEVERE [http-nio-8080-exec-9] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Cannot correlate message ‘ACTIVATION_COMPLETE’: No process definition or execution matches the parameters

org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘ACTIVATION_COMPLETE’: No process definition or execution matches the parameters

at org.camunda.bpm.engine.impl.cmd.CorrelateMessageCmd.execute(CorrelateMessageCmd.java:88)

at org.camunda.bpm.engine.impl.cmd.CorrelateMessageCmd.execute(CorrelateMessageCmd.java:42)

at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)

Please provide your help.

Hello my friend!

The first error means that your history is not enabled on camunda…
You can enable it in the application.properties file and also by changing it in the Camunda database.

In application.properties you can configure the history level as you wish.
Example:

camunda.bpm.history-level=FULL

Don’t forget to change it in the database, in the ACT_GE_PROPERTY table in the “historyLevel” field in which the “value” must be 3 if your application.properties is defined as FULL.

image


The second error means that Camunda is not recognizing this message Correlation… probably you must have some message correction in Camunda, in which the instance is not in the necessary place when the correlation is triggered, or speaking in other words, the correlation does not exist or the instance is not in the necessary scope to receive the correlation.

William Robert Alves

Thanks William for response, we are getting few more errors.

07-Nov-2023 17:15:52.961 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

07-Nov-2023 17:15:52.962 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/camunda-invoice] startup failed due to previous errors

Kindly help us in these also.

Hi \o!

After migrating to version 7.19, did you search the documentation for possible other necessary updates?

Like Java version, spring version, compatible database version, compatible dependencies, etc…?
Your problem may be related to this. You went from a very old version, directly to a very new version.

William Robert Alves

Hello,

We are using Camunda as a microservice and pulling docker image for 7.19.0 , it has all the updated versions.

and we are connecting to new DB on mysql8

Can u show me your configuration in web.xml file?

Hello William,

Please find below web.xml file.

camunda-service-13-w4b45:~/webapps/camunda/WEB-INF$ pwd
/camunda/webapps/camunda/WEB-INF
camunda-service-13-w4b45:~/webapps/camunda/WEB-INF$ 
camunda-service-13-w4b45:~/webapps/camunda/WEB-INF$ cat web.xml 
<?xml version="1.0" encoding="UTF-8"?>
<web-app
  version="3.0"
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

  <display-name>Camunda Platform webapp</display-name>

  <!-- cockpit bootstrap listener -->
  <listener>
    <listener-class>org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap</listener-class>
  </listener>

  <!-- admin bootstrap listener -->
  <listener>
    <listener-class>org.camunda.bpm.admin.impl.web.bootstrap.AdminContainerBootstrap</listener-class>
  </listener>

  <!-- tasklist bootstrap listener -->
  <listener>
    <listener-class>org.camunda.bpm.tasklist.impl.web.bootstrap.TasklistContainerBootstrap</listener-class>
  </listener>

  <!-- welcome bootstrap listener -->
  <listener>
    <listener-class>org.camunda.bpm.welcome.impl.web.bootstrap.WelcomeContainerBootstrap</listener-class>
  </listener>

  <!-- http session mutex listener -->
  <listener>
    <listener-class>org.camunda.bpm.webapp.impl.security.filter.util.HttpSessionMutexListener</listener-class>
  </listener>

  <session-config>
    <cookie-config>
      <http-only>true</http-only>
      <secure>false</secure>
    </cookie-config>
  </session-config>

  <!-- Container Based Authentication filter -->
  <!-- <filter>
    <filter-name>Container Based Authentication Filter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.auth.ContainerBasedAuthenticationFilter</filter-class>
    <init-param>
      <param-name>authentication-provider</param-name>
      <param-value>org.camunda.bpm.engine.rest.security.auth.impl.ContainerBasedAuthenticationProvider</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Container Based Authentication Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping> -->

  <!-- Authentication filter -->
  <filter>
    <filter-name>Authentication Filter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter</filter-class>
    <!-- See https://docs.camunda.org/manual/latest/webapps/shared-options/authentication/#cache -->
    <init-param>
      <param-name>cacheTimeToLive</param-name>
      <param-value>300000</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Authentication Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>

  <!-- Security filter -->
  <filter>
    <filter-name>SecurityFilter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.filter.SecurityFilter</filter-class>
    <init-param>
      <param-name>configFile</param-name>
      <param-value>/WEB-INF/securityFilterRules.json</param-value>  
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>SecurityFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>

  <!-- CSRF Prevention filter -->
  <filter>
    <filter-name>CsrfPreventionFilter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.filter.CsrfPreventionFilter</filter-class>
    <!--<init-param>-->
    <!--<param-name>targetOrigin</param-name>-->
    <!--<param-value>http://localhost:8080</param-value>-->
    <!--</init-param>-->
  </filter>
  <filter-mapping>
    <filter-name>CsrfPreventionFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!-- Session Cookie filter -->
  <filter>
    <filter-name>SessionCookieFilter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.filter.SessionCookieFilter</filter-class>
    <!--<init-param>-->
    <!--<param-name>enableSecureCookie</param-name>-->
    <!--<param-value>true</param-value>-->
    <!--</init-param>-->
  </filter>
  <filter-mapping>
    <filter-name>SessionCookieFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <!-- HTTP Header Security Filter -->
  <filter>
    <filter-name>HttpHeaderSecurity</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.security.filter.headersec.HttpHeaderSecurityFilter</filter-class>

    <!--
    The Strict Transport Security header is disabled by default.
    You can enable it by uncommenting the configuration below.
    Read more about it in the documentation
    https://docs.camunda.org/manual/latest/webapps/shared-options/header-security/#strict-transport-security
    -->

    <!--
    <init-param>
      <param-name>hstsDisabled</param-name>
      <param-value>false</param-value>
    </init-param>
    -->
  </filter>

  <filter-mapping>
    <filter-name>HttpHeaderSecurity</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>

  <!-- Empty body filter -->
  <filter>
    <filter-name>EmptyBodyFilter</filter-name>
    <filter-class>org.camunda.bpm.engine.rest.filter.EmptyBodyFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>EmptyBodyFilter</filter-name>
    <url-pattern>/api/*</url-pattern>
  </filter-mapping>

  <!-- REST cache control filter -->
  <filter>
    <filter-name>CacheControlFilter</filter-name>
    <filter-class>org.camunda.bpm.engine.rest.filter.CacheControlFilter</filter-class>    
  </filter>
  <filter-mapping>
    <filter-name>CacheControlFilter</filter-name>
    <url-pattern>/api/*</url-pattern>
  </filter-mapping>

  <!-- engines filter -->
  <filter>
    <filter-name>Engines Filter</filter-name>
    <filter-class>org.camunda.bpm.webapp.impl.engine.ProcessEnginesFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>Engines Filter</filter-name>
    <url-pattern>/app/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>

  <!-- cockpit rest api -->
  <servlet>
    <servlet-name>Cockpit Api</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.camunda.bpm.cockpit.impl.web.CockpitApplication</param-value>
    </init-param>
    <init-param>
      <param-name>resteasy.servlet.mapping.prefix</param-name>
      <param-value>/api/cockpit</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Cockpit Api</servlet-name>
    <url-pattern>/api/cockpit/*</url-pattern>
  </servlet-mapping>

  <!-- admin rest api -->
  <servlet>
    <servlet-name>Admin Api</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.camunda.bpm.admin.impl.web.AdminApplication</param-value>
    </init-param>
    <init-param>
      <param-name>resteasy.servlet.mapping.prefix</param-name>
      <param-value>/api/admin</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Admin Api</servlet-name>
    <url-pattern>/api/admin/*</url-pattern>
  </servlet-mapping>

  <!-- tasklist rest api -->
  <servlet>
    <servlet-name>Tasklist Api</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.camunda.bpm.tasklist.impl.web.TasklistApplication</param-value>
    </init-param>
    <init-param>
      <param-name>resteasy.servlet.mapping.prefix</param-name>
      <param-value>/api/tasklist</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Tasklist Api</servlet-name>
    <url-pattern>/api/tasklist/*</url-pattern>
  </servlet-mapping>

  <!-- engine rest api (embedded) -->
  <servlet>
    <servlet-name>Engine Api</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.camunda.bpm.webapp.impl.engine.EngineRestApplication</param-value>
    </init-param>
    <init-param>
      <param-name>resteasy.servlet.mapping.prefix</param-name>
      <param-value>/api/engine</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Engine Api</servlet-name>
    <url-pattern>/api/engine/*</url-pattern>
  </servlet-mapping>

  <!-- welcome rest api -->
  <servlet>
    <servlet-name>Welcome Api</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.camunda.bpm.welcome.impl.web.WelcomeApplication</param-value>
    </init-param>
    <init-param>
      <param-name>resteasy.servlet.mapping.prefix</param-name>
      <param-value>/api/welcome</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Welcome Api</servlet-name>
    <url-pattern>/api/welcome/*</url-pattern>
  </servlet-mapping>

  <!-- default error page -->
  <error-page>
    <!-- Missing resource -->
    <error-code>404</error-code>
    <location>/error-404-page.html</location>
  </error-page>
  <error-page>
    <!-- Uncaught exception -->
    <error-code>500</error-code>
    <location>/error-500-page.html</location>
  </error-page>
</web-app>

I’m trying to understand but it’s still confusing to me…
Because just looking at this, I can’t understand and find the error…

Have you checked if the environment variables are correct in your docker?

See if you can check your tomcat logs by searching for the words “ERROR” or “SEVERE”…

William Robert Alves

Hello William,

Environment variables are correct and Camunda engine is also started and working but we see these error in the logs.