Environment does not load but health status says Ok

0

I have configured my environment on elastic bean stalk and deployed my jar file, I have added the necessary configurations to the best of my knowledge. (inbound and outbound rules, load balancer listeners etc) My environment health says Ok, but when I navigate to the environment in the browser, it rolls for a few seconds and then gives the error "site cannot be reached", It had worked fine when I pointed the environment to a security group for another environment, but I later changed the security group to a new one, updated some inbound rules, couldn't get it to work on the new security group, but reverting it to the SG that worked now doesn't work anymore.

1 Antwort
0
Akzeptierte Antwort

It looks like a networking related issue in your configuration. I would try the following troubleshooting steps if you haven't already:

  • Security Groups: Double-check the rules in your security group configuration. The security group attached to your Elastic Beanstalk environment should allow incoming traffic on the ports that your application is using. Typically, this would be port 80 for HTTP and port 443 for HTTPS. Also, make sure that the sources of the inbound rules are correctly set. If you're testing from your own machine, you can temporarily add your IP address to the inbound rule to ensure connectivity.
  • VPC and Subnets: Check if your Elastic Beanstalk environment is in a VPC, and ensure that it's in the right subnets. Your subnets should have a route to an Internet Gateway if your application needs to be reachable from the public internet.
  • Elastic Load Balancer (ELB): Verify your load balancer's configuration. If your application communicates on a specific port, your load balancer should be listening on that port. Moreover, your health check settings should correctly point to an endpoint that returns HTTP 200. If the health check fails, your instances would not receive any traffic.
  • Network Access Control Lists (NACLs): While less common, NACLs can also block traffic. These act as a firewall for controlling traffic in and out of one or more subnets. Check if there are any NACLs associated with your VPC that might be blocking traffic. If you try that and it still doesn't work, please provide more details and I will try to recommend some other steps.
profile picture
EXPERTE
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor 2 Monaten
  • The issue was from my security group configurations. I noticed my environment had two SGs, (one created for it during setup, and the other for another environment), I deselected the SG for the other environment, configured the inbound rules correctly, then I started getting 502 bad gateway. Then, I went into my database inbound rule to set a rule to allow connections from my environment's security, which fixed it.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen