0

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
2
  • How do you start your Tomcat-instance? My immediate guess is that the CATALINA_HOME-variable is never read and set.
    – pkhamre
    Apr 17, 2012 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? Jun 10, 2013 at 15:36

2 Answers 2

0

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.

0
-1

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.

1
  • 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, 2012 at 12:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .