[Solved] Apcupsd won't start, unable to create lock file.

Started by FullyBorked, March 05, 2025, 07:10:59 PM

Previous topic - Next topic
March 05, 2025, 07:10:59 PM Last Edit: March 06, 2025, 03:01:36 PM by FullyBorked Reason: marking as solved
Took my firewall down to clean it up some.  Hooked everything back up and now the Apcupsd service won't start, I found a similar issue here, but I don't see anything in the lock folder so not sure what to delete.  Thoughts on how to get this service up and going again?

2025-03-05T12:58:31-05:00    Error    apcupsd    apcupsd error shutdown completed   
2025-03-05T12:58:31-05:00    Error    apcupsd    Lock file data error:   
               please stop it and run this program again.   
               If apcupsd or apctest is already running,   
               Unable to create UPS lock file.   
2025-03-05T12:58:31-05:00    Error    apcupsd    apcupsd FATAL ERROR in apcupsd.c at line 221   
2025-03-05T12:58:31-05:00    Error    apcupsd    Lock file data error: ␈

Figured out my own solution, not sure if it's correct or not.  Tried everything even uninstalling/reinstalling the addon to no avail. Everything I read said to remove the lock file in the /var/spool/lock folder, but in my case there was nothing in the folder.  So, I finally got frustrated and deleted the entire folder so
rm -r /var/spool/lock then recreated it
mkdir /var/spool/lock then started the service and it fired right up.