Bug 812825 - nut-client package does not create /var/run/nut directory
Summary: nut-client package does not create /var/run/nut directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 16
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 10:59 UTC by Jaroslav Kysela
Modified: 2013-12-31 04:09 UTC (History)
3 users (show)

Fixed In Version: nut-2.6.3-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-26 20:13:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Kysela 2012-04-16 10:59:52 UTC
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

Comment 1 Fedora Update System 2012-04-16 12:33:09 UTC
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

Comment 2 Fedora Update System 2012-04-16 12:33:18 UTC
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

Comment 3 Fedora Update System 2012-04-16 21:56:24 UTC
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).

Comment 4 Fedora Update System 2012-04-26 20:13:02 UTC
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.

Comment 5 Fedora Update System 2012-04-27 05:48:42 UTC
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.

Comment 6 Dan Ziemba 2012-08-28 05:31:31 UTC
This is still a problem on Fedora 16 x86_64 with nut and nut-client 2.6.5

Comment 7 Michal Hlavinka 2012-09-05 11:44:11 UTC
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?

Comment 8 Dan Ziemba 2012-09-06 18:42:58 UTC
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.

Comment 9 Michal Hlavinka 2012-09-11 16:15:36 UTC
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.

Comment 10 Dan Ziemba 2012-09-12 14:52:48 UTC
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?

Comment 11 Michal Hlavinka 2012-09-12 15:32:41 UTC
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.

Comment 12 Bill McGonigle 2013-12-31 04:09:24 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.