[Nut-upsuser] NUT fails on openSUSE 11.3 if IPv6 turned off
Roger Price
roger at rogerprice.org
Wed Nov 10 10:23:39 UTC 2010
On Sun, 7 Nov 2010, Arjen de Korte wrote:
>> The fix for this problem is to turn IPv6 on again, but I wondered
>> if there was a way of specifying to NUT "no IPv6".
> Yes .... Alternatively, you can enter the sockets it should listen
> to with the LISTEN directive in 'upsd.conf'. This will then
> override the build in defaults (which is a good idea anyway).
Thanks for the explanation. The most convenient way in openSUSE 11.3
of specifying "NUT without IPv6" is
1) Make file upsd.conf "active" by providing an explicit
"LISTEN 127.0.0.1 3493" directive
2) Exclude the implied "LISTEN ::1 3493"
But it seems to me that the logic of file upsd.conf is subtle.
If both IPv4 and IPv6 LISTEN directives are commented out
# /etc/ups/upsd.conf
# LISTEN <address> [<port>]
# LISTEN 127.0.0.1 3493
# LISTEN ::1 3493
then NUT listens to 127.0.0.1 and ::1 as shown by /var/log/messages (openSUSE 11.2)
Nov 10 09:52:41 glacon2 usbhid-ups[15911]: Startup successful
Nov 10 09:52:41 glacon2 upsd[15914]: listening on 127.0.0.1 port 3493
Nov 10 09:52:41 glacon2 upsd[15914]: listening on ::1 port 3493
Nov 10 09:52:41 glacon2 upsd[15914]: Connected to UPS [Eaton-66781]: usbhid-ups-Eaton-66781
Nov 10 09:52:41 glacon2 upsd[15915]: Startup successful
Nov 10 09:52:41 glacon2 upsmon[15918]: Startup successful
Nov 10 09:52:41 glacon2 upsd[15915]: User upsmaster@::1 logged into UPS [Eaton-66781]
But if only ::1 is commented out
# /etc/ups/upsd.conf
# LISTEN <address> [<port>]
LISTEN 127.0.0.1 3493
# LISTEN ::1 3493
then NUT only listens to 127.0.0.1 (openSUSE 11.3)
Nov 10 09:34:24 glacon usbhid-ups[4282]: Startup successful
Nov 10 09:34:24 glacon upsd[4285]: listening on 127.0.0.1 port 3493
Nov 10 09:34:24 glacon upsd[4285]: Connected to UPS [Eaton-66781]: usbhid-ups-Eaton-66781
Nov 10 09:34:24 glacon upsd[4286]: Startup successful
Nov 10 09:34:24 glacon upsmon[4289]: Startup successful
Nov 10 09:34:24 glacon upsd[4286]: User upsmaster at 127.0.0.1 logged into UPS [Eaton-66781]
This fixes my problem with openSUSE 11.3. Is this how it should work?
Roger
More information about the Nut-upsuser
mailing list