Home > OS >  502 Bad Gateway in elasticbeanstalk of AWS
502 Bad Gateway in elasticbeanstalk of AWS

Time:02-14

I have deployed a spring boot application in elasticbeanstalk. In the "application.properties" file, I have set,

server.port=5000

I have added a RDS db and set the following environment properties.

enter image description here

I have also added an inbound rule in the security group of the environment as shown in the image below:

enter image description here

I am still getting the 502 Bad Gateway error when I click on the URL.

CodePudding user response:

Your rule is incorrect.

0.0.0.0/32 means that you accept traffic only from the IP address 0.0.0.0 which basically doesn't exist.

What you want to do is allow traffic from 0.0.0.0/0 which means accept traffic from anywhere in the world.

CodePudding user response:

In case of Elastic Beanstalk, in your instance there is an nginx reverse proxy, which accepts HTTP connections on port 80 and proxies these connections to port 5000.

In your security group inbound rule you should accept HTTP connections on port 80 from everywhere (0.0.0.0/0).

  • Related