-1

I have four instances running on my AWS. Web server on windows, Keycloack gateway on Linux, App server on Linux and DB on Linux. I have a Load balancer through which the traffic is routed to both my web server and gateway. I was getting 502 Bad gateway error when i was trying to access my gateway link, i restarted the instances and the link worked. 2 days later i m getting the 502 gateway error. I restarted all the instances but that didnt help but made things worse. Now my website is also down. I m not an aws engineer and my engineer is out of pocket for family emergency.

The target groups are showing Unhealthy with 2 messages

web server target group unhealthy Health Check Failed

Keycloack target group unhealthy Health Check Failed

I appreciate if someone can give me the command line for both windows and linux instances to go and check if the services or the listener ports are working properly.

Or what other troubleshooting i need to fix this issue.

Thanks

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67
KPM
  • 1
  • Since you mentioned health check failed, you need to troubleshoot cause of failing health checks https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/ most common issues are security group misconfiguration or service is not running on your servers, also take a look on your health check route https://serverfault.com/q/990314 – Jatin Mehrotra Sep 15 '22 at 04:58
  • Thanks Jatin. My webserver wasn't running on the target server. – KPM Sep 21 '22 at 04:07
  • would you mind to accept as solution if I post the cause as answer so that it helps other in the future – Jatin Mehrotra Sep 21 '22 at 04:21

1 Answers1

0

Based on the comments

Health checks generally fail when:-

  • Security groups are misconfigured
  • improper health check route
  • Service/server not running on your server/backend

https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67