Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have been seeing this for literally years as part of tomcat apps, and now that I have gone through the steps to investigate it, I can't find the cause. Here's what I see whenever I start tomcat on CentOS servers running various applications:

May 1, 2014 8:50:29 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jv    m/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x8    6_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
May 1, 2014 8:50:29 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 1, 2014 8:50:29 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1382 ms
May 1, 2014 8:50:29 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 1, 2014 8:50:29 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
May 1, 2014 8:50:29 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: ../logs/dc.log (No such file or directory)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:210)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
        at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:285)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:171)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:184)
        at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:502)
        at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:415)
        at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:919)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:790)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:696)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
        at org.apache.log4j.Logger.getLogger(Logger.java:105)
        at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
        at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at org.springframework.util.PropertyPlaceholderHelper.<clinit>(PropertyPlaceholderHelper.java:40)
        at org.springframework.util.SystemPropertyUtils.<clinit>(SystemPropertyUtils.java:49)
        at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:66)
        at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:151)
        at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:622)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

It never causes a problem, but I cannot find "dc.log" in any configuration file anywhere on the server, much less tomcat, so I don't know what is causing this error. Google searches have come back with no results which I find hard to believe. How can I hunt this down?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The hint is in the exception: log4j is complaining. Assuming that the configuration files you've checked were all in $TOMCAT_HOME/conf, you're going to need to dig in to the properties files deployed by ROOT.war.

grep -r dc.log webapps is the laziest way to get what you're looking for.

(In other words, blame your developers.)

share|improve this answer
    
My first thought is always to blame developers. :) I did a grep -R dc.log * in $TOMCAT_HOME and got no hits. That's what is confusing me. –  DrStrangepork May 1 at 22:43
    
It will be in there somewhere for sure. The next logical step is to assume that this filename is constructed by smashing strings together...so you're going to have to deal with the spam of a search for .log or dc. :( –  Andrew B May 1 at 22:58
1  
Found it. It was within one of the jar files in webapps/<WAR>/WEB-INF/lib, so grep wouldn't have found it. Needed zipgrep. So while in the webapps directory, this revealed the culprit: for i in ``find . -name "*.jar"``; do echo $i ; zipgrep "dc.log" $i; done. In the end, developer's fault. –  DrStrangepork May 1 at 23:10
    
There also seems to be no way to escape a backtick in a comment, so those double-backticks above were really just single backticks... –  DrStrangepork May 1 at 23:14
    
Nicely done. Glad you were able to find it, chasing those can be a real pain sometimes. –  Andrew B May 1 at 23:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.