Raed's Journey Blog

towards certs. 
Filed under

Redhat

 

Tomcat and "lock file found but no process running for pid XXX"

Three days ago, I faced a tomcat problem with Red Hat Network Satellite Server. The problem was that whenever I tried to start the Red Hat Satellite Server service it said

[root@RHS run]# service rhn-satellite start
Starting rhn-satellite...
Starting Jabber services                                   [  OK  ]
Starting osa-dispatcher:                                   [  OK  ]
Starting RHN Taskomatic...
Starting tomcat5:                                          [  OK  ]
Starting satellite-httpd:                                  [  OK  ]
Starting rhn-search...
Done.

So, everything should work perfectly. Not really.

[root@RHS run]# service rhn-satellite status
jabberd router (pid 3002) is running...
osa-dispatcher (pid  3074) is running...
RHN Taskomatic is running (3433).
lock file found but no process running for pid 3888
httpd (pid 3956 3955 3954 3953 3952 3951 3950 3949 3922) is running...
rhn-search is running (3947).

I tried several solutions in the Internet just to solve the problem but I could not find a solution that really solved it. I had to compare our two Red Hat Network Satellite to "detect" the main cause.

First, I needed to get my tomcat packages. I ran

rpm -qa | grep tomcat | grep -v rhn-oracle-jdbc-tomcat5-1.0-13.el5 | xargs rpm -ql > /tmp/tomcatfiles

which gave me all tomcat files I have. Then I executed

for file in `cat /tmp/tomcatfiles`; do ll $file; done > /tmp/tomcatFilesPermission

 

to see all my files with their permissions (I did not want to miss anything :)). When I compared the results from my two Red Hat Network Satellite, the one with "lock file" was missing some jar files under /var/lib/tomcat5/common/lib. When I copied them

scp -r /var/lib/tomcat5/common/lib NewRedHatSatelliteServer:/var/lib/tomcat5/common/lib

I went to the Satellite Server with the problem and started the service

[root@RHS common]# service rhn-satellite start
Starting rhn-satellite...
Starting Jabber services                                   [  OK  ]
Starting osa-dispatcher:                                   [  OK  ]
Starting RHN Taskomatic...
Starting tomcat5:                                          [  OK  ]
Starting satellite-httpd:                                  [  OK  ]
Starting rhn-search...
Done.
[root@RHS common]# service rhn-satellite status
jabberd router (pid 11539) is running...
osa-dispatcher (pid  11563) is running...
RHN Taskomatic is running (11588).
/etc/init.d/tomcat5 is already running (12141)
httpd (pid 12200 12199 12198 12197 12196 12195 12194 12193 12166) is running...
rhn-search is running (12192).

everything worked just fine :)

Filed under  //   Java   Redhat   Satellite   tomcat  

Comments [0]