[Nut-upsuser] URL upsstats.cgi DOES not show UPS

Jim Klimov jimklimov+nut at gmail.com
Wed Oct 11 09:06:35 BST 2023


Glad it worked out!

> I have not made ANY changes to hosts.conf in my server.

So was this in the end a wrong assumption on your side, or was some error
in the file shipped by packaging (or even NUT upstream sources)?

Jim

On Wed, Oct 11, 2023 at 5:25 AM S K <inagar68 at yahoo.com> wrote:

> Can close the thread! Had a typo in hosts.conf
>
> On Tuesday, October 10, 2023 at 10:07:12 PM EDT, S K via Nut-upsuser <
> nut-upsuser at alioth-lists.debian.net> wrote:
>
>
>
> sudo tcpdump --interface=eth0 -n host 192.168.0.20 and port 3493
> tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144
> bytes
> 21:55:26.538305 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [P.], seq
> 3333110794:3333110822, ack 3026019235, win 1004, options [nop,nop,TS val
> 2185119584 ecr 4073717875], length 28
> 21:55:26.539061 IP 192.168.0.20.3493 > 192.168.0.29.36942: Flags [P.], seq
> 1:30, ack 28, win 509, options [nop,nop,TS val 4073722923 ecr 2185119584],
> length 29
> 21:55:26.539249 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [.], ack
> 30, win 1004, options [nop,nop,TS val 2185119585 ecr 4073722923], length 0
> 21:55:31.551433 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [P.], seq
> 28:56, ack 30, win 1004, options [nop,nop,TS val 2185124597 ecr
> 4073722923], length 28
> 21:55:31.552211 IP 192.168.0.20.3493 > 192.168.0.29.36942: Flags [P.], seq
> 30:59, ack 56, win 509, options [nop,nop,TS val 4073727937 ecr 2185124597],
> length 29
> 21:55:31.552406 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [.], ack
> 59, win 1004, options [nop,nop,TS val 2185124598 ecr 4073727937], length 0
> 21:55:36.567843 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [P.], seq
> 56:84, ack 59, win 1004, options [nop,nop,TS val 2185129614 ecr
> 4073727937], length 28
> 21:55:36.568645 IP 192.168.0.20.3493 > 192.168.0.29.36942: Flags [P.], seq
> 59:88, ack 84, win 509, options [nop,nop,TS val 4073732954 ecr 2185129614],
> length 29
> 21:55:36.568827 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [.], ack
> 88, win 1004, options [nop,nop,TS val 2185129615 ecr 4073732954], length 0
> 21:55:41.600681 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [P.], seq
> 84:112, ack 88, win 1004, options [nop,nop,TS val 2185134647 ecr
> 4073732954], length 28
> 21:55:41.601481 IP 192.168.0.20.3493 > 192.168.0.29.36942: Flags [P.], seq
> 88:117, ack 112, win 509, options [nop,nop,TS val 4073737988 ecr
> 2185134647], length 29
> 21:55:41.601764 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [.], ack
> 117, win 1004, options [nop,nop,TS val 2185134647 ecr 4073737988], length 0
> 21:55:46.621153 IP 192.168.0.29.36942 > 192.168.0.20.3493: Flags [P.], seq
> 112:140, ack 117, win 1004, options [nop,nop,TS val 2185139667 ecr
> 4073737988], length 28
> 21:55:46.621968 IP 192.168.0.20.3493 > 192.168.0.29.36942: Flags [P.], seq
> 117:146, ack 140, win 509, options [nop,nop,TS val 4073743009 ecr
> 2185139667], length 29
>
>
> On Tuesday, October 10, 2023 at 05:22:28 PM EDT, Jim Klimov <
> jimklimov+nut at gmail.com> wrote:
>
>
> Well... one troubleshooting idea is to use a sniffer (ngrep, tcpdump,
> etc.) to see the dialogue between the web server and upsd data server (
> 192.168.0.20:3493), to check if anything looks fishy there. Maybe some
> firewalls, SELinux after an update, etc. tempered up and there is no
> network chatter from http context to outside unless allowed (`setenforce 0`
> can help quickly confirm or rule out involvement of SELinux).
>
> Another idea is to hack around `drivers/upsstatus.c` to add debug messages
> around connections (at least `fprintf(stderr...)` but if this matures to
> become a PR - then ideally `upsdebugx` and some way to pass debug verbosity
> into the program - e.g. config file).
>
> On Tue, Oct 10, 2023 at 9:03 PM S K via Nut-upsuser <
> nut-upsuser at alioth-lists.debian.net> wrote:
>
> Hey the NUT sever (http://192.168.0.29/) was working fine and the URL
> http://192.168.0.29/cgi-bin/nut/upsstats.cgi did show me all the UPS
> slaves - but all of a sudden one particular slave is not showing up.....The
> one that is not showing up IP is 192.168.0.20 and the following command
> in NUT server
>
> upsc upshpomv at 192.168.0.20
>
> Does respond with
>
> Init SSL without certificate database
> battery.charge: 100
> battery.charge.low: 10
> battery.charge.warning: 20
> battery.mfr.date: CPS
> battery.runtime: 3270
> battery.runtime.low: 300
> battery.type: PbAcid
> battery.voltage: 24.0
> battery.voltage.nominal: 24
> device.mfr: CPS
> device.model: CP1350PFCLCD
> device.serial: 000000000000
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 15
> driver.parameter.port: auto
> driver.parameter.synchronous: no
> driver.version: 2.7.4
> driver.version.data: CyberPower HID 0.4
> driver.version.internal: 0.41
> input.transfer.high: 139
> input.transfer.low: 88
> input.voltage: 117.0
> input.voltage.nominal: 120
> output.voltage: 141.0
> ups.beeper.status: enabled
> ups.delay.shutdown: 20
> ups.delay.start: 30
> ups.load: 12
> ups.mfr: CPS
> ups.model: CP1350PFCLCD
> ups.productid: 0501
> ups.realpower.nominal: 810
> ups.serial: 000000000000
> ups.status: OL
> ups.test.result: No test initiated
> ups.timer.shutdown: -60
> ups.timer.start: -60
> ups.vendorid: 0764
>
>
> Hence I know the slave does respond to server but why is it now showing in
> the http://192.168.0.29/cgi-bin/nut/upsstats.cgi  - BTW I have not made
> ANY changes to hosts.conf in my server. Any idea how to troubleshoot?
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20231011/af5798ca/attachment-0001.htm>


More information about the Nut-upsuser mailing list