tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tejas Dhedia" <tejas.dhe...@gmail.com>
Subject Tomcat logging problem
Date Tue, 03 Oct 2006 22:59:56 GMT
Hi,
I am running tomcat 5.5.17 under opensuse 10.1 and my JVM version is
1.5.0_06. I am running my tomcat as a seperate tomcat user and starting it
at boot time using the following script in /etc/init.d.

#!/bin/sh
#
# Startup script for Tomcat

JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
start_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/startup.sh
stop_tomcat=/home/tomcat/apache-tomcat-5.5.17/bin/shutdown.sh

start() {
        echo -n "Starting tomcat: "
        su -c ${start_tomcat} - tomcat
        echo "done."
}
stop() {
        echo -n "Shutting down tomcat: "
        ${stop_tomcat}
        echo "done."
}

# See how we were called
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 10
        start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
esac



 I get following error output in my catalina.out file

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17
/logs/localhost.2006-10-02.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at java.io.FileWriter.<init>(FileWriter.java:61)
        at org.apache.juli.FileHandler.open(FileHandler.java:256)
        at org.apache.juli.FileHandler.<init>(FileHandler.java:50)
........


java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17
/logs/admin.2006-10-02.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
 .................


java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /home/tomcat/apache-tomcat-5.5.17/logs/host-
manager.2006-10-02.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
................


As a result nothing is being logged.
On checking I found that the log files were being created with owner as root
instead of tomcat.
Can someone please help me find where am i going wrong.

Thanks
Tejas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message