Running CoordinatedShutdown with reason [JvmExitReason]

hello
I was running my solution (akka version 2.8.4) with sbt 1.5.6
I updated recently the sbt version to 1.9.6
Since then I have this strange message :

[2023-09-20 08:00:44,756] [INFO] [akka.actor.CoordinatedShutdown] [] [DeepNeuralNetwork-akka.actor.default-dispatcher-24] - Running CoordinatedShutdown with reason [JvmExitReason]

[2023-09-20 08:00:54,809] [WARN] [akka.actor.CoordinatedShutdown] [] [DeepNeuralNetwork-akka.actor.default-dispatcher-6] - Coordinated shutdown phase [actor-system-terminate] timed out after 10000 milliseconds

Is there any link between sbt version & akka? if so this seems strange to me

Do you recommend to use java command instead of launching the akka server with sbt “runMain” command? I would like to use jdk 20.x

thanks
ps : if i specify again sbt 1.5.6 it works

sbt changed behaviour when running inside of the same process which terminates immediately once main returns or something along those lines. I don’t remember the exact sbt version when it changed but probably some time between 1.5 and 1.9.

Make sure to configure run to fork a separate JVM instead and it should work fine again. See the Akka samples build files, for example: https://github.com/akka/akka-samples/blob/main/akka-sample-cluster-scala/build.sbt#L28

1 Like

Updating

run / fork := true,
did the work.
Thanks!