Payara5 terminates when deployed on AWS Docker

45 views
Skip to first unread message

Dimitri

unread,
Jan 27, 2021, 12:22:10 PM1/27/21
to Payara Forum
Hi,

I have a web app deployed on Payara5, which runs on a Docker container. The base Docker image used is Java:8.

When running Payara 5 on localhost, or in a Docker container running on my localhost, then everything works fine.

However when I deploy the same Payara 5 + web app on AWS EBS (Docker AMI), then Payara starts normally but then terminates during deployment of my .war file.

server.log is clean, no error reported. Moreover, this exact same setup works great on Glassfish4, which I'm trying to migrate from.

Does anyone have any knowledge of anything special that may be required when running Payara 5 on AWS EBS Docker?

On what circumstances would Payara decide to terminate, and where would such reason be logged? Does that level of logging require explicit activation?

Many thanks!
Jim

Hans Pikkemaat

unread,
Jan 27, 2021, 1:12:13 PM1/27/21
to Payara Forum
Hi,

If it is terminated without any logs then it could be that its killed by the OOM killer.

If your application is using up a lot of memory the OS could kill it.

Check the /var/log/syslog.

gr. Hans

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/177cb619-c1ab-49f8-bcf1-ab9026082568n%40googlegroups.com.

Dimitri

unread,
Jan 28, 2021, 5:37:58 PM1/28/21
to Payara Forum
Wow! What an insightful guess!! That was it, the OOM was killing it!

For anyone else having the same problem:
I am using Amazon's Multi-Container Docker environment which allows you to run multiple Docker containers per EC2 instance, and as such we need to configure how much memory is allocated per container. We do this in the Dockerrun.aws.json file (JSON key "memory"). More here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html

To see how much memory is allocated for your container, SSH into your EC2 instance and $ sudo docker stats

To check in the logs if the OOM killer is terminating your container, SSH into your EC2 instance and $ sudo grep -i kill /var/log/messages*

Thanks for your help gr. Hans!
Reply all
Reply to author
Forward
0 new messages