ec2 route 53 health checks are unhealthy even though instances are running healthy. What could be the cause?
Initially it was healthy but got changed to unhealthy...
Note: I have set security group to pass all inbound and outbound traffic
CodePudding user response:
Route53 checks if it can reach health neck from outside of your network and if it can - it declares the endpoint as healthy - not the instance status.
From the commands below I can see that the first one is still not healthy. Second, should have healthy status now - the goal is to have port 80 open (probably running apache/nginx or another web server) or change the health check to check different service.
curl: (7) Failed to connect to 18.205.25.100 port 80 after 229 ms: Connection refused```
> curl -I http://18.234.126.110
HTTP/1.1 200 OK
Date: Sun, 29 May 2022 10:40:19 GMT
Server: Apache/2.4.53 ()
Upgrade: h2,h2c
Connection: Upgrade
Last-Modified: Sun, 29 May 2022 10:39:04 GMT
ETag: "33-5e02426061fdc"
Accept-Ranges: bytes
Content-Length: 51
Content-Type: text/html; charset=UTF-8