Azure App Services – Java App not starting

After working with a customer deploying Java apps to Azure ASEs, I thought I’d share some simple wisdom. These are not comprehensive troubleshooting steps by any means, there are always connectivity items to troubleshoot, IE DNS resolution, firewall/nsg ports to look at, etc… these are just a few of the simpler things to try before you spend hours troubleshooting something that may not be complex.
If you are running a Java App in Azure App Services or in an App Service Environment. The best idea is to run in a Linux-based environment. This is GA, now and is a better more native way to run Java apps in Azure vs running them on a Windows based VM with an IIS Wrapper. That being said, some of you, maybe because you deployed before Linux App Services were GA’d, or for whatever reason, may still be running Java apps under the IIS/Windows version of the ASE. If your Java App stops running, or does not kick off, here are some things to check:
1) Make sure you enabled Java/Tomcat – in the App Settings for the Web App. – I have spent hours troubleshooting because I assumed someone had turned this on based on their explanation of “cloning” their app from one environment to the next. Don’t Assume, check.
2) Always On -> turn this on, as it will ensure that when you upload a new jar/war file that it is unpacked and deployed immediately. If you do not turn this on, your updated code is not unpacked/deployed immediately. Also, in order to conserve resources, by default your app will be unloaded if it is not run within a certain timeframe, so turning on Always On will prevent this conservation measure from shutting down your app.
3) if you have recently deployed or restarted your web app, and you are looking at process explorer in the KUDU console, and it doesn’t show a java process. Try hitting the URL to your app service. Remember this is wrapped with IIS, and IIS may not be forking the java process until a request for the site actually comes in.

Happy Azuring!

About the Author

Matt Canty

Matt is a CSA at Microsoft on the US National Team. As a former PFE, Matt has been working in the Azure space since 2014. Hobbies include: music (multiple instruments), Xbox gaming, auto enthusiast, soccer. Note: Matt's political opinions are solely the opinions of Matt, and are not necessarily a reflection of the political opinions of the company he works for.

Leave a Reply

%d bloggers like this: