I don't have netcat available under that name. I do have nc however. Below
is the output.

I did some additional testing too. Fedora 23 works fine with the same
config. There was talk about making some DNS changes to Fedora 24 but from
what I could tell this has not been enabled at least for the server spins.
The odd part is that DNS works fine after boot and NUT is the only service
that seems to get stuck unable to resolve names.

I also tried adding an entry to /etc/hosts after the system boots and NUT
fails. The moment that is done NUT is able to resolve the name and connects
correctly. I don't have to touch the nut-monitor service in any way for
this.

Any way here is the output:

$ echo "GET VAR ups01 battery.charge" | nc ups.server.lan 3493
VAR ups01 battery.charge "100"
$ echo "GET VAR ups01 battery.charge" | nc 11.22.33.44 3493
VAR ups01 battery.charge "100"
$ upsc ups01.server.lan
#brings complete UPS output.

$ dig ups.server.lan

; <<>> DiG 9.10.4-P2-RedHat-9.10.4-1.P2.fc24 <<>> ups.server.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 395
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ups.server.lan. IN A

;; ANSWER SECTION:
ups.server.lan. 3600 IN A 11.22.33.44

;; Query time: 0 msec
;; SERVER: 11.22.33.45#53(11.22.33.45)
;; WHEN: Sat Sep 17 15:19:32 CDT 2016
;; MSG SIZE  rcvd: 60

I will do some more digging in Fedora 24 to see if I can find anything. I
am not completely sure if this is a NUT issue at this point but I don't
understand why it can't resolve names after DNS becomes properly available.

Any additional suggestions are welcome. Thank you again.

On Sat, Sep 17, 2016 at 7:20 AM Roger Price <ro...@rogerprice.org> wrote:

> On Sat, 17 Sep 2016, Yevgeniy Kuksenko wrote:
>
> > 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.
> >
> > If I use an ip instead of a DNS name this config works correctly on boot.
>
> Do commands on the client such as:
>
>   echo "GET VAR ups01 battery.charge" | netcat ups.server.lan 3493
>   echo "GET VAR ups01 battery.charge" | netcat 11.22.33.44 3493
>
> reproduce the problem?  If so, the problem may be with the DNS rather than
> NUT.  What does command dig ups.server.lan on the client report?
>
> Roger
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
>
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to