Reputation: 529
I have an application running two services in a docker container. I'm running into a situation where the JVM unexpectedly exits after completing the first process (which is to build a jar from a play project) with the following message:
[info] Your package is ready in /app/.../project-0.1.0.zip
[success]
[Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
Archive: /app/.../target/universal/project-0.1.0.zip
The second process (which is to extract the jar and run the application) begins with Archive: /app/.../target/universal/project-0.1.0.zip
but fails to extract the jar. The docker container does not exit.
Surprisingly, this issue is not seen in multiple runs after rebuilding and running the containers. Also, I had recently upgraded my sbt version from 0.13.11
to 1.1.1
. It was since then that I started facing this issue of CoordinatedShutdown
. I am quite certain thus that this is not a docker issue.
I had also tried adding akka.coordinated-shutdown.exit-jvm = off
and
akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off
to my application.conf but CoordinatedShutdown
still occurs. Any solutions?
Upvotes: 0
Views: 1140
Reputation: 529
I figured out the issue was that the play application failed to start in its container because the RUNNING_PID file had not been deleted. Finally, managed to solve this by preventing Play from creating a PID with -Dpidfile.path=/dev/null
.
Related issues: Restarting Play application Docker container results in 'This application is already running' - RUNNING_PID is not deleted
References: https://www.playframework.com/documentation/2.6.x/Deploying#play-pid-configuration
Upvotes: 1