Kin Fat SZE
asked on
tomcat can't start up or stop often
Hi,
I follow installation document
http://tomcat.apache.org/tomcat-6.0-doc/setup.html
and success and nothing change on this system
I don't know why tomcat can't start up or stop often
the error log file $CATALINA_HOME\logs\catali na.err
System : Fedora 13, apache, tomcat
Anybody help?
I follow installation document
http://tomcat.apache.org/tomcat-6.0-doc/setup.html
and success and nothing change on this system
I don't know why tomcat can't start up or stop often
the error log file $CATALINA_HOME\logs\catali
System : Fedora 13, apache, tomcat
Anybody help?
02/07/2010 18:19:40 2582 jsvc.exec error: Cannot open PID file /var/run/jsvc.pid, PID is 2582
02/07/2010 18:19:40 2581 jsvc.exec error: Service exit with a return value of 255
ASKER
Yes, I using
./bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startu p.Bootst
to startup tomcat manually
and
place $CATALINA_HOME/bin/jsvc/na tive/tomca t.sh into /etc/rc.local to auto start
the file PID /var/run/jsvc.pid is missed often
./bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startu
to startup tomcat manually
and
place $CATALINA_HOME/bin/jsvc/na
the file PID /var/run/jsvc.pid is missed often
On the surface, it sounds like a permissions problem. Can you look int he config file and relocate the PID to something like your home directory to test? maybe change /var/run/jsvc.pid to ~/jsvc.pid so that it writes the file into your home directory. If that seems to work, then we can figure out what user is starting tomcat and what permissions are on /var/run to see if maybe the user cannot write files to that directory.
ASKER
the file /var/run/jsvc.pid is missed
That would make sense if you don't have permission to write to that directory. That would mean the file could not be created and without the pid file, it sounds like tomcat is crashing.
from a terminal window, type "touch /var/run/jsvc.pid" and see if you get an error. That will tell you if your user account has permissions to create the needed pid file.
On my LInux computer (Fedora 9), /var/run is owned by root and running the command fails for me. If you could write the pid file to a place where you have permissions, I think your problem would go away.
from a terminal window, type "touch /var/run/jsvc.pid" and see if you get an error. That will tell you if your user account has permissions to create the needed pid file.
On my LInux computer (Fedora 9), /var/run is owned by root and running the command fails for me. If you could write the pid file to a place where you have permissions, I think your problem would go away.
ASKER
It seem that file is existing and the owner is su..... please have a look code snippet
could I just chmod 777 jsvc.pid by su and try it again?
could I just chmod 777 jsvc.pid by su and try it again?
[fsze88@fsze88-linux ~]$ touch /var/run/jsvc.pid
touch: cannot touch `/var/run/jsvc.pid': Permission denied
[fsze88@fsze88-linux ~]$ su
Password:
[root@fsze88-linux fsze88]# touch /var/run/jsvc.pid
[root@fsze88-linux fsze88]# cd /var/run
[root@fsze88-linux run]# ls
abrt gdm.pid ppp
abrt.lock hald pptp
abrt.pid haldaemon.pid saslauthd
acpid.pid httpd sendmail.pid
acpid.socket irqbalance.pid sepermit
atd.pid jsvc.pid setrans
auditd.pid libgpod setroubleshoot
avahi-daemon mdadm sm-client.pid
console messagebus.pid sudo
ConsoleKit mysqld syslogd.pid
console-kit-daemon.pid netreport udev-configure-printer
crond.pid NetworkManager udisks
cron.reboot nm-dhclient-eth0.conf utmp
cups nscd vpnc
cupsd.pid openvpn wpa_supplicant
dbus plymouth wpa_supplicant.pid
dhclient-eth0.pid pm-utils
gdm portreserve
ASKER
no still having error on log file $CATALINA_HOME\logs\catali na.err
02/07/2010 18:19:40 2582 jsvc.exec error: Cannot open PID file /var/run/jsvc.pid, PID is 2582
02/07/2010 18:19:40 2581 jsvc.exec error: Service exit with a return value of 255
02/07/2010 21:11:13 5878 jsvc.exec error: syscall failed in set_caps
02/07/2010 21:11:13 5878 jsvc.exec error: set_caps(CAPS) failed
02/07/2010 21:11:13 5877 jsvc.exec error: Service exit with a return value of 4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
too complex.
meeting same problem, are you?
Is there a simpler way to solve this issue?
Thank YOU
Francis SZE
meeting same problem, are you?
Is there a simpler way to solve this issue?
Thank YOU
Francis SZE
ASKER
I fixed by
yum install tomcat6
yum install tomcat6-webapps tomcat6-admin-webapps
everything fine now, but I assist your comment to be assist okey?
yum install tomcat6
yum install tomcat6-webapps tomcat6-admin-webapps
everything fine now, but I assist your comment to be assist okey?
ASKER
not finished from his comment
Also, have you tried starting and stopping Tomcat without using jsvc? Does it still have errors? That might help us chase down the issue as well. You could use scripts to start and stop tomcat without having to use jsvc if it turns out to be the only issue.