1

I am using Apache Tomcat-8, Whenever I start the server it is running but in the console I am getting "Failed to open access log file" How do I recover this error? Here is the part of console which shows the error details:

 Dec 16, 2016 7:29:43 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2628 ms
    Dec 16, 2016 7:29:43 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Dec 16, 2016 7:29:43 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/8.0.30
    Dec 16, 2016 7:29:43 PM org.apache.catalina.valves.AccessLogValve open
    SEVERE: Failed to open access log file [C:\Program Files\apache-tomcat-8.0.30\logs\localhost_access_log.2016-12-16.txt]
    java.io.FileNotFoundException: C:\Program Files\apache-tomcat-8.0.30\logs\localhost_access_log.2016-12-16.txt (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java:579)
        at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValve.java:609)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:170)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:930)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Swapnil P.
  • 21
  • 1
  • 2
  • 6
  • 1
    Hopefully you will find your answer [here](http://stackoverflow.com/questions/25579459/got-apache-tomcat-error-that-access-denied-on-this-file-localhost-access-log-201) or may be [here](http://stackoverflow.com/questions/11462080/java-io-filenotfoundexception-c-program-files-apache-software-foundation-tomca). – StackUseR Dec 16 '16 at 14:27
  • Great that I could help.:) I wanted to post as answer but wasn't sure about your case so gave the link. – StackUseR Dec 16 '16 at 14:48
  • Thank you very much @AshishSrivastava.... solved it by giving rights to the logged in user on the tomcat folder. For this case : "C:\Program Files\Apache Software Foundation\Tomcat 7.0" folder Right Click>>Properties>>security Tab" provide required rights to currently logged in user. Thanks :) – Swapnil P. Dec 16 '16 at 14:49

0 Answers0