1

We have recently upgraded our spring boot dependency from 1.3.5 to 1.5.8; on deployment to the Azure hosted Tomcat container, we noticed that the deployments don't start up correctly. Upon further examination of the catalina logs:

org.apache.catalina.startup.ExpandWar.deleteDir could not be completely deleted. The presence of the remaining files may cause problems.

We are aware that the issue can be corrected by adding antiResourceLocking="true" to the context.xml, however since we want to keep our platform as a service, we do not have access to modify this configuration.

Is there a way of setting this configuration in web.config or in some other manner on azure, while maintaining the tomcat container as a service?

  • Is there anyway you can not deploy to their Tomcat container, and just deploy a fat jar with embedded Tomcat instead ? What's the reason for creating a WAR and deploying to Tomcat, rather than running with embedded (which doesn't tie you to whatever Azure supports, or doesn't) ? – PaulNUK Dec 11 '17 at 16:10
  • Any updates now? – Jay Gong Dec 13 '17 at 02:01
  • Not entirely sure, as I haven't had the time to look at the web.config template in detail, perhaps there is a way of setting this there. As far as the market place version goes, we do not want to do that, because then we will have to manage the container. Deploying the app with Tomcat embedded is something I also want to look at, however our wars are quite large, so it is something I will have to investigate. – Mirko Petrovic Dec 13 '17 at 15:00

2 Answers2

1

So the solution to this problem is to place a context.xml into src/main/webapp/META-INF, as explained here.

The solution is detailed in the Context Container section of Apache Tomcat Configuration reference.

Since we have read access to D:/, I just coppied the context.xml from the Tomcat installation there and modified it by changing <Context antiResourceLocking="true">.

This way, we did not need to install Tomcat from the marketplace or pack it into the war.

Community
  • 1
  • 1
0

As I known, we have no permission for operating anything under the path D:\, besides the path D:\home when we use Azure Webapps Service.

If using Tomcat which not from marketplace, the Tomcat path is D:\Program Files (x86)\apache-tomcat-X.0.X which can't be operated by user role and get the administrator permission.

However, creating App with Tomcat from marketplace, Tomcat will exists at the path D:\home\site\wwwroot\bin which you have the configuration permission.

Or , you could publish your own Tomcat instance with your app, then you can edit the config files.

Please refer to web.config setup and tomcat template from here.

Hope it helps you.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32