Search code examples
javamysqldockertomcatcamunda

Docker Image not starting up correctly


I am trying to run an image from Camunda workflow engine.

I used the source code from here: https://github.com/camunda/docker-camunda-bpm-platform

I changed the Driver and the connection to:

ENV DB_DRIVER=com.mysql.jdbc.Driver 
ENV DB_URL=jdbc:mysql://xxx.mysql.database.azure.com/camunda;MVCC=TRUE;TRACE_LEVEL_FILE=0;DB_CLOSE_ON_EXIT=FALSE
ENV DB_USERNAME=xxx@mysqlserverforcamunda
ENV DB_PASSWORD=xxxx.

the docker build commmands works perfect.

However, if I run docker run:

docker run -d --name camunda2 -p 8080:8080 -e SKIP_DB_CONFIG=true openjdk:8u191-jre-alpine3.9

Note: I have created all the tables in advance in mysql already, thats why I added the SKIP DB CONFIG flag

THere is nothing in the logs:

docker logs -f cbcdef0df5a5abe7f9b144e14e04996932696aeca9835f48adcc48854dcf11f8

Question: How can I troubleshoot whats going on? what the real error is.?


Solution

  • Better to run the container in the foreground for debugging and troubleshooting purpose.

    docker run -it --name camunda2 -p 8080:8080 -e SKIP_DB_CONFIG=true openjdk:8u191-jre-alpine3.9
    

    Also will suggest checking logs of this specific container using the container name or ID of the container.

    docker logs -f camunda2
    

    Debug

    To enable JPDA inside the container you can set the environment variable DEBUG=true on startup of the container. This will allow you to connect to the container on port 8000 to debug your application.

    ocker-camunda-bpm-platform-debug

    update:

    You need to run camunda/camunda-bpm-platform, while you are running openjdk:8u191-jre-alpine3.9 and there is nothing to expose and the image provide just JDK platform so it will exist or it will enter to shell if you run it in the foreground.

     docker run --rm -it --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest