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

My log file is inside:

kamil@localhost tomcat$ grep "logs/" ./*
./log4j.properties:log4j.appender.R.File=${catalina.home}/logs/tomcat.log

my CATALINA_HOME is

kamil@localhost tomcat$ sudo grep "CATALINA" ./*
...
./tomcat.conf:CATALINA_HOME="/usr/share/tomcat"

that above suggests that my log file is hare, and there it's:

kamil@localhost tomcat$ sudo ls /usr/share/tomcat/logs/ | grep .out
catalina.out

So why can't I start server:

kamil@localhost tomcat$ sudo tomcat start
/usr/sbin/tomcat: line 30: /logs/catalina.out: No such file or directory
share|improve this question
    
How do you start your Tomcat-instance? My immediate guess is that the CATALINA_HOME-variable is never read and set. –  pkhamre Apr 17 '12 at 12:39
    
Have you tried catalina.base - something like /var/lib/tomcat - instead of catalina.home? Isn't there a logs folder under catalina.base? –  Markus Jun 10 '13 at 15:36

2 Answers 2

Your problem is that $CATALINA_HOME in tomcat.conf is not read by the tomcat-process. And when you start Tomcat it sets its logpath to $CATALINA_HOME/logs/catalina.out which translates to /logs/catalina.out when $CATALINA_HOME is not set.

The Tomcat startup-script is configured to read environment variables from a file called setenv.sh in the bin/ directory.

Make sure that $CATALINA_HOME is set in this file and you should be fine.

share|improve this answer

You searched within /usr/SHARE/tomcat/logs, its looking for the file in /usr/SBIN/tomcat/logs. Those are two different locations. I'm not an expert on tomcat, but I think you can specify CATALINA_HOME within your catalina.sh file.

share|improve this answer
    
Note that /logs/catalina.out is an absolute path and not a relative path and it does not search for the file in /usr/sbin/tomcat/logs. –  pkhamre Apr 17 '12 at 12:57

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.