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.
I just upgraded my suse 9.0 box to 9.1. Apparently this upgrade takes the kernel from 2.4 to 2.6... which has caused some problems.
this is one of them... anytime I try to start or stop apcupsd from the command line:
apcupsd FATAL ERROR in apcdevice.c at line 105
APCUPSD - Unable to create UPS lock file
Now I have the LOCKFILE variable in the config file pointing to a valid directory with read write execute permission for everyone. I even tried just commenting the lockfile entry out. same error?
the program is sucessfully creating the following file "LCKhiddev[0-15]" in the proper directory with -rw-r--r-- (644) permissions owned by root.
Anyone got any ideas?
Thanks
Last edited by sirpimpsalot; 06-22-2004 at 12:43 PM.
Hello imark!
Think you found the answer already, but for the others:
This error usually occurs if you start the apcupsd twice. If "/etc/init.d/apcupsd stop" doesn't delete the Lockfile, then "joe /var/lock/LCK*" (or what ever the name of the Lockfile is)schows you the PID of the previous apcupsd-process. With "ps -p PID" you look up if it's really a apcupsd running. Then "kill PID"(the one you found out above) schould do the trick. Then "/etc/init.d/apcupsd start" schould be able to create the Lockfile.
Have fun!
I'm having the same problem, and there's no instance of apcupsd running. It never gets off the ground--during boot when the process would start, I get the same message "unable to create USP lock file."
OK, I figured out how to make apcupsd work again. I found various references via Google and it seems there's a bug in the apcupsd software that makes it not release a lock file after a power failure. I had tested it by pulling the power plug (=power failure) and the system shut down properly via apcupsd, very nice. But upon rebooting apcupsd would not start again because of this error--the lockfile still existing.
I deleted the file named /var/lock/apcupsd and then I was able to restart apcupsd.
Now if I only knew how to make that happen automatically next time the power goes out or I test the thing!
But at least that is one way to get it running again.
All right, here's how I got this situation fixed on my Mandrake 9.2 system.
I edited /etc/rc.d/init.d/apcupsd by inserting the line:
rm -f /var/lock/apcupsd
right after
case "$1" in
start)
where there are two pre-existing lines with rm commands.
That worked. I tested it by pulling the plug from the wall. After the five-minute interval I'd set in the configuration file, the system shut down correctly; I then powered off the USP as the program instructs you to, and restored the mains power, powered on the USP, the computer rebooted and USP monitoring is in place again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.