I have a Java web application that is deployed on Azure. The app has several endpoints, one of which accepts a POST request together with an image as input. This endpoint works perfectly when I run it on localhost, however it gives me the following error when deployed on Azure:
The specified CGI application encountered an error and the server terminated the process.
The HTTP status code for this response is 502 Bad Gateway.
The logs under /LogFiles/
do not tell me anything about the cause of the problem. I see some exceptions, but my application handles with ease using a mechanism that catches any uncaught exceptions before they can crash the application, and sends the exception message back as a response, in a JSON format. So the fact that the response I'm getting being something entirely different than the ones my exception handler generates is also really confusing.
Edit: I'm deploying my app using a separate Bitbucket repo, which only includes webapps/ROOT.war
in it. When I update the ROOT.war
file with my new build, Jetty automatically deploys the new build. I'm not using a web.config
file, and I'm not sure where I would put it in my context (a Java web app deployed as a .war file) as the tutorials I've seen do not mention this.
Also, one thing I've noticed when I connect to my server via FTP is that ROOT.war file lies under wwwroot/webapps/
directory, but I can't see the actual deployed app, which, I believe, should reside in wwwroot/webapps/ROOT/
.