Hi, i’m using docker compose file to deploy up camunda bpm + custom db.
After deployed the application and after 30 minutes i got connection issue between camunda engine and Mysql or Postgres DB.
This is my compose file:
postgres:
image: postgres:9.6
networks:
- ‘default’
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: camunda
POSTGRES_PASSWORD: camunda
camunda:
image: camunda/camunda-bpm-platform:7.17.0
environment:
DB_DRIVER: org.postgresql.Driver
DB_URL: jdbc:postgresql://postgres:5432/process-engine
DB_USERNAME: camunda
DB_PASSWORD: camunda
WAIT_FOR: postgres:5432
restart: unless-stopped
depends_on:
- postgres
networks:
- ‘default’
This is a piece of my stack trace
14-Nov-2022 13:29:37.438 INFO [http-nio-8080-exec-8] org.jboss.resteasy.spi.ResteasyDeployment.processApplication RESTEASY002205: Adding provider class org.camunda.bpm.engine.rest.exception.RestExceptionHandler from Application class org.camunda.bpm.admin.impl.web.AdminApplication
14-Nov-2022 14:04:54.808 SEVERE [http-nio-8080-exec-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.
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.
at org.camunda.bpm.engine.impl.util.ExceptionUtil.wrapPersistenceException(ExceptionUtil.java:263)
at org.camunda.bpm.engine.impl.util.ExceptionUtil.doWithExceptionWrapper(ExceptionUtil.java:257)
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.executeSelectList(DbSqlSession.java:111)
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:103)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
If the issue persist i think the only solution is using the h2 database but i just wanna know if is possible to persist the h2 in a volume or change the h2 database to file type and mount the file as a volume.
Thanks