awsdocs/elastic-beanstalk-samples

403 response from EB running with Tomcat8/Java8.

ibraheemnabeelfauzi opened this issue · 1 comments

Hey folks,

I'm running into this weird issue that I never seen before and wondering if someone can shed some light.

So I deployed an elastic beanstalk environment with tomcat8/Java8 as the platform.

I uploaded the WAR file, accessed the box via SSH all is well, deployed the MySQL server, build my tables and what not, everything is functional. However, the issue is when I send a request by postman I get the following response:

{

"status": 403,

"error": "Forbidden",

"message": "Access Denied",

}

The weird thing is that I have an EC2 instance running on it's own without an EB environment and it does function without any problems. I hit that API and it returns a valid response for me. Same DB same war file and same version of tomcat8.

I couldn't really think of much but to check the EB logs and the below caught my attention - if so what could be causing it? I never seen it before even in my line of work.

Mon Apr 20 03:29:19.380050 2020 https://forums.aws.amazon.com/ https://forums.aws.amazon.com/ (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed

Mon Apr 20 03:29:19.380090 2020 https://forums.aws.amazon.com/ https://forums.aws.amazon.com/ client 162.243.131.92:55570 AH01114: HTTP: failed to make connection to backend: localhost

I would be grateful if someone could point me in the right direction as I'm super puzzled into what's the possible cause here. As I mentioned that same WAR file returns valid responses when hitting the end point that runs on the EC2 instance and my last suspect is the Ngnix server.

Hello @ibraheemnabeelfauzi -

Although this channel is for documentation issues, I can suggest that you check your Elastic Beanstalk environment permissions. For more information see: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-instanceprofile.html .

These other resources may offer some help as well:

Sorry about how long it took us to get back to you. I hope that you have found a solution to your issue.

Thanks!