By using AWS re:Post, you agree to the Terms of Use

Not able to deploy daemon java process in Lightsail Container Service


I have a daemon java process runs ok on my local machine with Docker. But failed the deployment on Lightsail Container Service. The error message seems indicate the deployment "took too long" but the process was actually started correctly, just because the java process hangs in the terminal due to it is a daemon and is supposed to hangs and waiting for new jobs but Lightsail thought it is still trying to spin up and failed the deployment after x mins.

I wonder how could I fix it? Maybe does Lightsail container support detached mode? will that help?

thanks for any insight!

  • Hello, does this service expose a public endpoint? If so, then the health check needs to be configured to prevent Lightsail from thinking the deployment has failed. If there's no public endpoint, then you might want to make sure that the process that the container binds to does not exit prematurely.