[Nut-upsuser] upsd not starting sometimes (Porteus 3.1, nut 2.7.2)
Charles Lepple
clepple at gmail.com
Wed Jul 8 00:25:24 UTC 2015
On Jul 7, 2015, at 4:12 PM, Rob Groner <rgroner at RTD.com> wrote:
> It does that MOST of the time. However, a significant part of the time, the system comes up, and then doesn’t respond to loss of power. Doing some checking, I find that the reason is because upsd never started. Capturing its output, I see that it says :
>
> Fatal error: A previous upsd instance is already running!
> Either stop the previous instance first, or use the 'reload' command.
What might be happening is that the PID file is left over from the last test, and another process got that PID instead.
Due to history and conflicting requirements, the path selection is not as simple as it could be. From ./configure --help:
--with-statepath=PATH path for ups state files (/var/state/ups)
--with-altpidpath=PATH path for driver/upsd .pid files (<statepath>)
[...]
--with-pidpath=PATH path for .pid files (/var/run)
You might not want to use the default for --with-altpidpath: /var/state/* is not generally cleared at boot time, whereas /var/run is either wiped or mounted on a RAM filesystem.
However, you might want the statepath protected - Debian uses the following:
$ ls -ld /var/run/nut
drwxrwx--- 2 root nut 60 Jun 24 17:13 /var/run/nut
--
Charles Lepple
clepple at gmail
More information about the Nut-upsuser
mailing list