Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<service-name> dead but pid file exists

A service has crashed on my server and when I do

service <service-name> status

I get dead but pid file exists, then if I try to stop the service I get

Shutdown <service-name>: bash: line 0: kill: (5018) - No such process
ERROR: could not stop <service-name>:  <service-name> dead but pid file exists

Then I delete the files in /var/run//.pid and var/lock/subsys/ but it does not help. What should I do in order to really restart the service?

like image 495
cloudy_weather Avatar asked Apr 24 '15 08:04

cloudy_weather


1 Answers

have you tried :

kill -9 pid
ps -eaf|grep pid

If pid gone now, try : service service-name restart (stop will fail, but should success when starting)

like image 88
Deepak Avatar answered Oct 21 '22 14:10

Deepak