Directory /var/run/nut is not created

Bug #1763760 reported by sm8ps
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 16.04.4 LTS, Nut 2.7.2-4ubuntu1.2

I am following the Network UPS Tools User Manual, section 6. Configuration notes
(http://networkupstools.org/docs/user-manual.chunked/index.html).
According to 6.2. Basic configuration, I set up a device stanza in /etc/nut/ups.conf:
[upsEE12a]
        driver = usbhid-ups
        port = auto
        bus = 005

The next step consists in issuing "/sbin/upsdrvctl start" which results in the following:
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
USB communication driver 0.32
Can't chdir to /var/run/nut: No such file or directory
Driver failed to start (exit status=1)

Creating the directory with permissions 0770 and ownership root:nut does resolve this issue.

I would expect Nut to create the directory upon installation.

Revision history for this message
sm8ps (sm8ps) wrote :

Now this is strange! I had performed the very same installation simultaneously (!) on three servers. Two of them are absolutely identical and do have the directory /var/run/nut while the third one -- which is pretty much identical to the others -- does not. So this bug report seems moot, at least to two thirds of what it is worth.

This makes me doubt my mental state (which should be fine in principle) or the state of the Ubuntu installations. All three are pretty virgin and do not contain anything more than some very basic system installation. I would be grateful if somebody could point me to the cause of this difference.

Here is the relevant output from sudo apt install nut on the machine which did not have /var/run/nut:
The following NEW packages will be installed:
  libnspr4 libnss3 libnss3-nssdb libupsclient4 nut nut-client nut-server
(...)
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up libnspr4:amd64 (2:4.13.1-0ubuntu0.16.04.1) ...
Setting up libnss3-nssdb (2:3.28.4-0ubuntu0.16.04.3) ...
Setting up libnss3:amd64 (2:3.28.4-0ubuntu0.16.04.3) ...
Setting up libupsclient4:amd64 (2.7.2-4ubuntu1.2) ...
Setting up nut-client (2.7.2-4ubuntu1.2) ...
insserv: warning: script 'S02hpessad' missing LSB tags and overrides
insserv: warning: script 'hpessad' missing LSB tags and overrides
Setting up nut-server (2.7.2-4ubuntu1.2) ...
Adding user nut to group dialout
insserv: warning: script 'S02hpessad' missing LSB tags and overrides
insserv: warning: script 'hpessad' missing LSB tags and overrides
Setting up nut (2.7.2-4ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...

The only difference to the other two machines consists in the insserv warnings but nothing points to the non-creation of directory in question.

Revision history for this message
sm8ps (sm8ps) wrote :

It is even getting confusing! I did apt remove nut && apt autoremove and killed all processes related to nut and removed /var/run/nut. After apt install nut again, the directory was present. I do not know how to explain this difference in behavior.

Revision history for this message
sm8ps (sm8ps) wrote :

After some more error messages I realized that /var/run is linked to /run which in turn is a tmpfs. So it all makes perfect sense and this but is none. I apologize for the noise!

Changed in nut (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.