Install nut-client package, configure /etc/ups/upsmon.conf and run 'nut-monitor' service: upsmon[26616]: writepid: fopen /var/run/nut/upsmon.pid: No such file or directory The /var/run/nut directory is missing
nut-2.6.3-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/nut-2.6.3-2.fc16
nut-2.6.3-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/nut-2.6.3-2.fc17
Package nut-2.6.3-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing nut-2.6.3-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-5987/nut-2.6.3-2.fc17 then log in and leave karma (feedback).
nut-2.6.3-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
nut-2.6.3-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
This is still a problem on Fedora 16 x86_64 with nut and nut-client 2.6.5
what do you mean by "still"? It was fixed in nut 2.6.3-2 and I just verified all parts of the fix are still in place. So, what's the behavior you see? It (=systemd) should create this directory when you start nut-monitor.service in ExecStartPre section. Do you see any error messages in logs?
I said still because the report was closed a while ago, but this was the first time I have tried the package on fedora and I experienced the same problem. When I started the nut-monitor service, I got the same error message as the original report. After creating the directory manually, the service started fine. /etc/tmpfiles.d/nut-client.conf exists, so I don't know why the directory wasn't created.
and do you see: upsmon[26616]: writepid: fopen /var/run/nut/upsmon.pid: No such file or directory or upsmon[13983]: fopen /var/run/nut/upsmon.pid: No such file or directory The first one was this bug - /var/run/nut was missing. The second one is debug output - it checks whether there is running instance. If it is not already running (usual case), upsmon.pid does not exist and it logs this message.
Yes, I believe the fact that directory is missing is the bug. /etc/tmpfiles.d/nut-client.conf should cause systemd to create the directory on first run of the service but for some reason does not. Perhaps this is actually a systemd bug?
so you see the "writepid" error message (not the "fopen" one) and you verified that after systemctl start nut-monitor.service, there is no /var/run/nut directory. Is that correct? If so, please try to reproduce again and attach your /var/log/messages.
nut-2.6.5-12.fc19.x86_64 (yum install nut): Dec 30 23:02:45 ivorytower systemd[1]: Starting Network UPS Tools - power device driver controller... Dec 30 23:02:45 ivorytower systemd[1]: Service nut-driver.service is not needed anymore. Stopping. Dec 30 23:02:45 ivorytower systemd[1]: Requested transaction contradicts existing jobs: File exists Dec 30 23:02:45 ivorytower upsdrvctl[6972]: Can't chdir to /var/run/nut: No such file or directory Dec 30 23:02:45 ivorytower upsdrvctl[6972]: Network UPS Tools - Generic HID driver 0.37 (2.6.5) Dec 30 23:02:45 ivorytower upsdrvctl[6972]: USB communication driver 0.31 Dec 30 23:02:45 ivorytower upsdrvctl[6972]: Driver failed to start (exit status=1) Dec 30 23:02:45 ivorytower upsdrvctl[6972]: Network UPS Tools - UPS driver controller 2.6.5 Dec 30 23:02:45 ivorytower systemd[1]: nut-driver.service: control process exited, code=exited status=1 Dec 30 23:02:45 ivorytower systemd[1]: Failed to start Network UPS Tools - power device driver controller. Dec 30 23:02:45 ivorytower systemd[1]: Unit nut-driver.service entered failed state. I did: mkdir /var/run/nut chown nut:nut /var/run/nut and that seems to be good enough for it to work.