简体   繁体   中英

AWS Elastic Beanstalk - How to quickly check if non web container is running

I have a docker container with a batch application running on Elastic Beanstalk. By default, it runs health checks on localhost:80/ . However, since my container is not a web app it throws this error:

sqsd is in fault mode (12 hours ago): service healthcheck failed with error: Connection refused - connect(2) for "localhost" port 80.

This causes the health to turn RED, making it hard to check if my container is up because I have to request and download the recent logs and start reading them when I just want to know if the container is still running. This is how my dashboard looks:

在此处输入图像描述

And this is how health details section looks:

在此处输入图像描述

You see? Everything makes it look like my container is messed up when, in fact, is running properly. One way to check the status is to go to ECS console directly but I thought Elastic Beanstalk was supposed to abstract me from ECS.

How can I quickly check in Elastic Beanstalk console if my container is running? I mean, I get the health check, something can be running and still be unhealthy. But it would be nice to have a running status next to health status

I'm lack of reputation so i could not comment and can only suggest something through here.

I assumed that you probably deployed something runnable that did not expose neither HTTP nor HTTPS ports (could be WEB socket, async workers etc.).

EBS makes health checks through ELB (load balancer).

Go to configuration > load balancer > health checks and double check the rules.

As a work around solution, you can expose random TCP port on docker image, and put health check rule based on that TCP port under load balancer configuration.

It works, but obviously it is dirty!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM