0

We deployed a java web application (WAR file) onto an Azure App Service with newest Tomcat (8.5). The WAR file is detected by Azure but on startup we are seeing the following in the catalina.date.log

06-Feb-2018 07:57:24.494 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
06-Feb-2018 07:57:24.512 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.20
06-Feb-2018 07:57:27.697 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [D:\home\site\wwwroot\webapps\myapp.war]
06-Feb-2018 07:59:16.570 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
06-Feb-2018 07:59:16.570 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/myapp] startup failed due to previous errors
06-Feb-2018 07:59:16.629 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [D:\home\site\wwwroot\webapps\myapp.war] has finished in [108,932] ms

We cannot find this log file anywhere. We have set all possible logging settings to verbose. Should this be a separate file or are some logging settings missing?

We also see the follwing row

06-Feb-2018 12:00:43.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\Program Files (x86)\apache-tomcat-8.5.20\conf\logging.properties

It is not possible for us to change this file.

Mathias Rönnlund
  • 4,078
  • 7
  • 43
  • 96

1 Answers1

0

Azure Web services are deployed to a Windows Server 2016.

You can access the log files and change the location of the log files using

  • Open the url https://<app service name>.scm.azurewebsites.net/DebugConsole {or choose Menu > Debug Console > CMD)
  • Type the dir command to go the location of the tomcat install. For example dir D:\Program Files (x86)\apache-tomcat-8.5.6\conf
  • Alternatively you can also click on the folder name dispalyed above the command/terminal
  • In your case, to enable detailed logging, open logging.properties under \Program Files (x86)\apache-tomcat-8.5.6\conf and set 1catalina.org.apache.juli.FileHandler.level = FINE. You can read more info at Documentation on Apache Tomcat 8.5 Logging

Sample screen from my Tomcat setup as a webservice:

Console to view tomcat webservice

Select edit option to update file contents

Suren Konathala
  • 3,497
  • 5
  • 43
  • 73
  • Thanks for the suggestion. Unfortunately I get "Access denied" when trying to save the logging.properties file. In the file I already had the logging row 1catalina.org.apache.juli.AsyncFileHandler.level = FINE. This is AsyncFileHandler and not FileHandler. Is that ok? – Mathias Rönnlund Feb 06 '18 at 20:14
  • Should be ok. I have not seen a difference. But have to see why you are not able to edit the file. – Suren Konathala Feb 08 '18 at 16:39