tomcat can't start up or stop often

Kin Fat SZE
Kin Fat SZE used Ask the Experts™

I follow installation document
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\catalina.err
System : Fedora 13, apache, tomcat

Anybody help?
02/07/2010 18:19:40 2582 jsvc.exec error: Cannot open PID file /var/run/, PID is 2582
02/07/2010 18:19:40 2581 jsvc.exec error: Service exit with a return value of 255

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You might take a look at this link:

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.
Yes, I using
    ./bin/jsvc -cp ./bin/bootstrap.jar \
        -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
to startup tomcat manually
place $CATALINA_HOME/bin/jsvc/native/ into /etc/rc.local to auto start

the file PID   /var/run/ 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/ to ~/ 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.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

the file /var/run/ 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/" 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.
It seem that file is existing and the owner is su..... please have a look code snippet
could I just chmod 777 by su and try it again?
[fsze88@fsze88-linux ~]$ touch /var/run/
touch: cannot touch `/var/run/': Permission denied
[fsze88@fsze88-linux ~]$ su
[root@fsze88-linux fsze88]# touch /var/run/
[root@fsze88-linux fsze88]# cd /var/run
[root@fsze88-linux run]# ls
abrt                          ppp
abrt.lock               hald                   pptp                saslauthd               httpd        
acpid.socket           sepermit                      setrans              libgpod                setroubleshoot
avahi-daemon            mdadm        
console                sudo
ConsoleKit              mysqld         netreport              udev-configure-printer               NetworkManager         udisks
cron.reboot             nm-dhclient-eth0.conf  utmp
cups                    nscd                   vpnc               openvpn                wpa_supplicant
dbus                    plymouth            pm-utils
gdm                     portreserve

Open in new window

no still having error on log file $CATALINA_HOME\logs\catalina.err
02/07/2010 18:19:40 2582 jsvc.exec error: Cannot open PID file /var/run/, 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

Open in new window

right. likely the problem is that even changing the pid file to 777 will only let the process delete the pid file successfully when the server shuts down. When you start back up, you will have the same problem like you are seeing.
Starting the file in rc.local may be what is causing you some problems. You might be able to get some extra info here for how to start with various run levels with elevated permissions instead of using rc.local: 
too complex.
meeting same problem, are you?
Is there a simpler way to solve this issue?

Thank YOU

Francis SZE
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?
not finished from his comment

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial