Goku__
Goku__

Reputation: 980

502 Bad Gateway in elasticbeanstalk of AWS

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.

Upvotes: 0

Views: 2203

Answers (2)

Ervin Szilagyi
Ervin Szilagyi

Reputation: 16815

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).

Upvotes: 0

Caldazar
Caldazar

Reputation: 3812

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.

Upvotes: 1

Related Questions