2

I'm trying to deploy my Spring Boot application to Elastic AWS Elastic Beanstalk. However the deployment is always in a "Severe" state, with the below being logged into /var/log/nginx/error.log

Connection refused) while connecting to upstream, client: 172.31.10.241, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/

172.31.12.137 - the IP of the EC2 instance

I'm aware that I need to change the server port to 5000 and I have done that in my application.properties file and from the logs I can see that the application has launched on port 5000

TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 5000 (http)

I'm connecting to a MYSQL database on RDS and I can confirm that the application is connecting successfully to that database.

Is there a configuration setting I am missing? Any help would be much appreciated

FYI: I'm not very experienced with AWS

2 Answers 2

2

Try using port 8080. You can set SERVER_PORT to 8080 from the Configuration > Software Configuration > Environment Properties in AWS Elastic Beanstalk.

Sign up to request clarification or add additional context in comments.

Comments

0

If you are using spring boot application You should add the property server.port=5000 in your application.properties file and also if you are using a profile based property file add the environment variable in the configurations as SPRING_PROFILES_ACTIVE=prod for your profile based property file to be used during run time.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.