I am trying to deploy an application to EC2 with elastic beanstalk and tomcat. In order to try and fix a different problem I had I changed my uploaded file from a .war to a .zip in order to include a .ebextensions folder. However, now I get the following error when trying to enter the website:
I figured that there might be a problem with the .config file I added, so I tried zipping the .war file alone, however I get the exact same error, so this is ruled out.
TL/DR: Put 2 .war files in the .zip file instead of 1.
I realize this post is nearly 18 months old. But I experienced exactly the same symptoms, so this seemed as good a place as any to share my discovery.
Premise: deploying a .war file works well, exactly as expected.
Observation: Elastic Beanstalk does this automatically:
Problem: deploying a .zip file containing this .war file along with valid config files does NOT work well.
Observation: Elastic Beanstalk does this automatically:
To me this seems like a bug. Perhaps it's intended behavior... but I don't understand it. Placing the .war file in webapps would make sense. Placing the contents of the .war in ROOT would make sense. But placing the .war file there directly seems very strange.
Solution: Add a second .war file to the .zip (even if you don't need the second app!).
Observation: Elastic Beanstalk does this automatically:
Now my-war.war deploys normally, and life is good.