Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So, a long time ago I noticed that some if not most of my services were not running, I just read a book on scripts in bash and learned a little. Well here is what I have figured out and what I have not had so much fortune in. I do a service --status-all and I get
-----------------------
anacron dead but subsys locked
apmd dead but subsys locked
arpwatch is stopped
atd dead but subsys locked
Configured Mount Points:
------------------------
Active Mount Points:
--------------------
cannaserver is stopped
cpqarrayd is stopped
crond dead but subsys locked
oh shit
cupsd is stopped
gpm is stopped
httpd is stopped
irattach is stopped
irqbalance is stopped
No status available for this package
lisa is stopped
etc/init.d/microcode_ctl: reading microcode status is not yet supported
Configured devices:
lo ppp0 ppp1
Currently active devices:
lo ppp0
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
rpc.statd is stopped
nscd is stopped
ntpd is stopped
cardmgr (pid 1342) is running...
portmap (pid 1292) is running...
The random data source exists
saslauthd is stopped
sendmail dead but subsys locked
smartd is stopped
snmpd is stopped
snmptrapd is stopped
sshd dead but subsys locked
syslogd (pid 1270) is running...
klogd (pid 1274) is running...
vsftpd is stopped
winbindd is stopped
xfs (pid 1539) is running...
xinetd (pid 1483) is running...
ypbind is stopped
------------------------------------------------------------------
notice all the dead but subsys locked.
well it turns out that the scripts in /etc/init.d are running the start routines just fine and touching those files for lock. but there is not accompanying file for pid in /var/run
this is aproblem as that means they are not running. And hence when the /etc/init.d/functions killproc() procedure is ran it can not find a pid to kill and therefor issues an error message back to init.d script which called and then you get the shutdown failed for each respective service. Now the question that I have is what do all these processes have in common that would not allow them to start?
To let you know /var/log/messages says shutdown failed on these processes and each processes logs has no idea it is not running. This is very perplexing. How can a program say it is running back to the init.d script when it most certainly is not?
I looked at all previous problems in LQ and redhat, and googled it, yet to no avail. It seems that this problem comes close to being solved but then it is lost. One thread actually made it 24 posts in to only die because of Christmas break. <= how disappointing. If anyone has a shot in the dark or the answer I would greatly like to solve this little problem.
This post is over six months old, but I found a fix... I have just come accross this problem myself... So this is also for any other newbies out there that are having this problem:
If you get [service name] dead but subsyslocked when you check the status (in my case it was vsftpd), simply open your favorite text editor and punch in four numbers (i.e. 1234) and save the file as [service name].pid
Go to your terminal and type
>service [service name] restart
Or if your are using the GNOME GUI, open the Services GUI and click RESTART. You will see a brand new pid for whatever service you are dealing with.
Just be sure to NOT RESAVE when you close the text editor, as this will overwrite the pid that the OS created...
Hope this helps!!!
Last edited by ApachePadowan; 04-24-2005 at 11:57 PM.
Wow... been over a year since I posted this and people are still having the problem...
Avatar,
I hope you're issue has been resolved by now... if not, keep reading:
Did you save the file upon exit? If you did, then don't. It's been a while since I did this, and ever since I haven't had the problem... Actually, I haven't had the problem since I went from Redhat 9.0 to Fedora Core 4.
Also, what Linux are you running and what program in particular is giving you the headache?
Here is the other problem I think, Avatar: You deleted the file in /var/lock/subsys... I don't remember actually deleting anything, I just overwrote the pid file in /var/run...
Avatar,
Since you deleted the lock file (the file in /var/lock/subsys), but not the actual pid file, the OS now thinks the process is dead, but since there is still a PID file available, it gives you the error message you mentioned.
Don't delete the file(s) in /var/lock/subsys, since this keeps a list of the processes that are running. It's the PID files in /var/run that are confusing your OS. If you deleted the files in /var/lock/subsys, make sure to also delete the corresponding PID file in /var/run. Then try running
>service <process> start
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.