OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: FullyBorked on March 05, 2025, 07:10:59 PM

Title: [Solved] Apcupsd won't start, unable to create lock file.
Post by: FullyBorked on March 05, 2025, 07:10:59 PM
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 (https://forum.opnsense.org/index.php?topic=34819.0), 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: ␈
Title: Re: Apcupsd won't start, unable to create lock file.
Post by: FullyBorked on March 06, 2025, 03:00:42 PM
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.