[Nut-upsuser] NUT unable to resolve host despite DNS working.

Yevgeniy Kuksenko ykuksenko at gmail.com
Sat Sep 17 00:07:19 UTC 2016


Hello all, I have been having a problem with upsmon on Fedora 24 on boot.
NUT is configured as a netclient to a Raspbian NUT server. After boot up
upsmon repeatedly says "connect failed: No such host". It is not able to
connect at all until the service is bounced. This seems to indicate a name
resolution problem but shouldn't this auto correct once name resolution is
working properly regardless? upsmon on the Raspbian NUT server works fine
and is attached to localhost:3493.

I have tried tweaking the systemd file to require upsmon to come up after
network-online.target. This doesn't help.
After boot I am always able to resolve the name from the client correctly
but upsmon continues to fail with no such host.
If I use an ip instead of a DNS name this config works correctly on boot.

*Detailed Info*:
*Client OS*: Fedora 24
*Client NUT*: Network UPS Tools upsmon 2.7.4
*Install method*: OS package

*Server OS: *Raspbian 8
*Server NUT*: Network UPS Tools upsd 2.7.2
*Install Method*: OS Package

*Problem:*
*# systemctl status nut-monitor.service*
*----------------------------------------------*
● nut-monitor.service - Network UPS Tools - power device monitor and
shutdown controller
   Loaded: loaded (/usr/lib/systemd/system/nut-monitor.service; enabled;
vendor preset: disabled)
   Active: active (running) since Fri 2016-09-16 18:44:05 CDT; 7min ago
  Process: 822 ExecStartPre=/usr/bin/systemd-tmpfiles --create
/etc/tmpfiles.d/nut-client.conf (code=exited, status=0/SUCCESS)
 Main PID: 831 (upsmon)
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/nut-monitor.service
           ├─831 /usr/sbin/upsmon -F -DD
           └─902 /usr/sbin/upsmon -F -DD

Sep 16 18:51:35 client upsmon[831]:  450.063107        Trying to connect to
UPS [ups01 at ups.server.lan:3493]
Sep 16 18:51:35 client upsmon[831]:  450.063321        UPS
[ups01 at ups.server.lan:3493]: connect failed: No such host
Sep 16 18:51:40 client upsmon[831]:  455.063402        Trying to connect to
UPS [ups01 at ups.server.lan:3493]
Sep 16 18:51:40 client upsmon[831]:  455.063587        UPS
[ups01 at ups.server.lan:3493]: connect failed: No such host
Sep 16 18:51:45 client upsmon[831]:  460.063664        Trying to connect to
UPS [ups01 at ups.server.lan:3493]
Sep 16 18:51:45 client upsmon[831]:  460.063862        UPS
[ups01 at ups.server.lan:3493]: connect failed: No such host
Sep 16 18:51:50 client upsmon[831]:  465.063943        Trying to connect to
UPS [ups01 at ups.server.lan:3493]
Sep 16 18:51:50 client upsmon[831]:  465.064204        UPS
[ups01 at ups.server.lan:3493]: connect failed: No such host
Sep 16 18:51:55 client upsmon[831]:  470.064287        Trying to connect to
UPS [ups01 at ups.server.lan:3493]
Sep 16 18:51:55 client upsmon[831]:  470.064471        UPS
[ups01 at ups.server.lan:3493]: connect failed: No such host
*----------------------------------------------*

*nut.conf:*
*----------------------------------------------*
UPSMON_OPTIONS=""
MODE=netclient
UPSD_OPTIONS=""
*----------------------------------------------*

*upsmon.conf*
*----------------------------------------------*
RBWARNTIME 43200
MONITOR ups01 at ups.server.lan:3493 1 monitor password slave
POLLFREQALERT 5
POWERDOWNFLAG /etc/killpower
POLLFREQ 5
DEADTIME 15
MINSUPPLIES 1
FINALDELAY 5
NOCOMMWARNTIME 300
HOSTSYNC 15
SHUTDOWNCMD "/sbin/shutdown -h +0"
RUN_AS_USER nut
*----------------------------------------------*

After two days of searching I turn to this mailing list. Any suggestions
would be appreciated.

I wrote an ansible role to replicate this setup. It should be available on
github shortly at https://github.com/ykuksenko/ansible.nut if that helps.

Thank you,
Yevgeniy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20160917/3d48a845/attachment-0001.html>


More information about the Nut-upsuser mailing list