Elastic Beanstalk

0

Hello, I have uploaded java application on Elastic Beanstalk, i have given the port 5000 and enabled Database as well, and its showing status healthy. But when i copy paste the URL to browse the application it is giving error 502 bad Gateway nginix . Can somebody suggest what am i missing here? if i run sample application it is running fine but if i upload any application it does not work. Can somebody please share any running java source code, so that i can check, may be i am uploading wrong application.

Thank you!!

Monica
asked 3 months ago142 views
2 Answers
0

Hello.

Can I connect to EC2 and check Nginx error logs?
I think that logs are probably output that can be used for troubleshooting.

/var/log/nginx/error.log

Also, check whether the listening port in the Nginx configuration file is correct.
https://shreyakupadhyay.medium.com/deployment-next-react-js-and-spring-boot-on-aws-ec2-with-nginx-d39bd57ca9

profile picture
EXPERT
answered 3 months ago
0

I do have a similar issue with a nestjs app (nodejs setup) deployed on beanstalk. When i did the sample application from AWS it worked but when i deployed a local laptop working nestjs app it gives me 502 bad Gateway nginix. I have no errors on the instance setup ( shows green health) in beanstalk and have the port setup accordingly in the config file with process.env.PORT ... any ideas where to look for any further troubleshooting ? TIA

sudhir
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions