[arch-general] nut UPS driver (upsdrvctl) fails to start for usbhid devices due to node perms - howto fix?

Vladimir Lomov lomov.vl at gmail.com
Tue Dec 17 05:29:20 EST 2013


Hello,
** David C. Rankin [2013-12-16 21:33:33 -0600]:

> On 12/14/2013 03:16 PM, David C. Rankin wrote:

> Disregard the previous information in this thread. Here is the new information:

>   After upgrade to kernel 3.12.5-1 and glic 2.18-11, network-ups-tools (upsd)
> fails to start giving the error:

> getaddrinfo: Servname not supported for

>   I had spent the last couple of days working with nut, so I was very familiar
> with how it was starting on this box. Literally, nothing else changed, it looks
> the update killed it. Here is the journalctl log per/post reboot for kernel
> update when glibc was updated:

> Dec 14 14:02:00 phoinix systemd[1]: Starting Network UPS Tools - power devices
> information server...
> Dec 14 14:02:00 phoinix upsd[32616]: fopen /var/state/ups/upsd.pid: No such file
> or directory
> Dec 14 14:02:00 phoinix upsd[32616]: listening on 192.168.7.16 port 3493
> Dec 14 14:02:00 phoinix upsd[32616]: listening on ::1 port 3493
> Dec 14 14:02:00 phoinix upsd[32616]: listening on 127.0.0.1 port 3493
> Dec 14 14:02:00 phoinix upsd[32616]: listening on 192.168.7.16 port 3493
> Dec 14 14:02:00 phoinix upsd[32616]: listening on ::1 port 3493
> Dec 14 14:02:00 phoinix upsd[32616]: listening on 127.0.0.1 port 3493
> Dec 14 14:02:00 phoinix upsd[32617]: Startup successful
> Dec 14 14:02:00 phoinix systemd[1]: Started Network UPS Tools - power devices
> information server.
> Dec 16 14:05:26 phoinix systemd[1]: Stopping Network UPS Tools - power devices
> information server...
> Dec 16 14:05:26 phoinix upsd[21265]: Network UPS Tools upsd 2.7.1-signed-9-g6fb35b3
> Dec 16 14:05:26 phoinix systemd[1]: Stopped Network UPS Tools - power devices
> information server.
> -- Reboot --
> Dec 16 14:05:16 phoinix systemd[1]: Starting Network UPS Tools - power devices
> information server...
> Dec 16 14:05:16 phoinix upsd[369]: fopen /var/state/ups/upsd.pid: No such file
> or directory
> Dec 16 14:05:16 phoinix upsd[369]: getaddrinfo: Servname not supported for
> ai_socktype
> Dec 16 14:05:16 phoinix upsd[369]: Network UPS Tools upsd 2.7.1-signed-9-g6fb35b3
> Dec 16 14:05:16 phoinix systemd[1]: nut-server.service: control process exited,
> code=exited status=1
> Dec 16 14:05:16 phoinix systemd[1]: Failed to start Network UPS Tools - power
> devices information server.
> Dec 16 14:05:16 phoinix systemd[1]: Unit nut-server.service entered failed state.

>   Is this a glibc issue or a nut issue?

No, it seems that is your issue (a body between monitor and a chair). I
wouldn't do such brilliant suggestions without deep investigation with
doubtless facts. And about facts, network-ups-tools works fine on my
system:
---------------------- 8< ----------------------
Linux smoon 3.12.5-1-ARCH #1 SMP PREEMPT Thu Dec 12 12:57:31 CET 2013 x86_64 GNU/Linux
local/glibc 2.18-11 (base)
    GNU C Library
---------------------- 8< ----------------------
though it took time to build correctly the package. Just for
record, my custom PKGBUILD for the package:
https://github.com/vp1981/pkgbuild/tree/master/network-ups-tools
and some configuration files for the program:
https://github.com/vp1981/scripts/tree/master/network-ups-tools

Current status:
nut-server.service - Network UPS Tools - power devices information server
   Loaded: loaded (/usr/lib/systemd/system/nut-server.service; enabled)
   Active: active (running) since Пн 2013-12-16 20:03:24 IRKT; 23h ago
  Process: 616 ExecStart=/usr/bin/upsd (code=exited, status=0/SUCCESS)
 Main PID: 624 (upsd)
   CGroup: /system.slice/nut-server.service
           └─624 /usr/bin/upsd

nut-driver.service - Network UPS Tools - power device driver controller
   Loaded: loaded (/usr/lib/systemd/system/nut-driver.service; static)
   Active: active (running) since Пн 2013-12-16 20:03:24 IRKT; 23h ago
  Process: 530 ExecStart=/usr/bin/upsdrvctl start (code=exited, status=0/SUCCESS)
 Main PID: 615 (blazer_usb)
   CGroup: /system.slice/nut-driver.service
           └─615 /usr/bin/blazer_usb -a ippon

nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
   Loaded: loaded (/usr/lib/systemd/system/nut-monitor.service; enabled)
   Active: active (running) since Пн 2013-12-16 20:03:25 IRKT; 23h ago
  Process: 625 ExecStart=/usr/bin/upsmon (code=exited, status=0/SUCCESS)
 Main PID: 643 (upsmon)
   CGroup: /system.slice/nut-monitor.service
           ├─642 /usr/bin/upsmon
           └─643 /usr/bin/upsmon


So, try harder.

>   Sorry for continuing this in the same thread, but I could not create a new
> thread because:

> Posting of your message titled "nut UPS (upsd) fails to start after kernel
> upgrade (3.12.5-1) error: getaddinfo"

> has been rejected by the list moderator. The moderator gave the following reason
> for rejecting your request:

> "Stop creating brand new threads for discussing related issues. Cheers. --Gaetan"

> So if you think this should be in a new thread and not here -- talk to Gaetan.

W/o comments.

---
WBR, Vladimir Lomov


-- 
Any man who hates dogs and babies can't be all bad.
		-- Leo Rosten, on W.C. Fields


More information about the arch-general mailing list