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

S K inagar68 at yahoo.com
Wed Oct 11 04:25:50 BST 2023


 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 3493tcpdump: verbose output suppressed, use -v[v]... for full protocol decodelistening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes21: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 2821: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 2921: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 021: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 2821: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 2921: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 021: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 2821: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 2921: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 021: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 2821: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 2921: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 021: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 2821: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 databasebattery.charge: 100battery.charge.low: 10battery.charge.warning: 20battery.mfr.date: CPSbattery.runtime: 3270battery.runtime.low: 300battery.type: PbAcidbattery.voltage: 24.0battery.voltage.nominal: 24device.mfr: CPSdevice.model: CP1350PFCLCDdevice.serial: 000000000000device.type: upsdriver.name: usbhid-upsdriver.parameter.pollfreq: 30driver.parameter.pollinterval: 15driver.parameter.port: autodriver.parameter.synchronous: nodriver.version: 2.7.4driver.version.data: CyberPower HID 0.4driver.version.internal: 0.41input.transfer.high: 139input.transfer.low: 88input.voltage: 117.0input.voltage.nominal: 120output.voltage: 141.0ups.beeper.status: enabledups.delay.shutdown: 20ups.delay.start: 30ups.load: 12ups.mfr: CPSups.model: CP1350PFCLCDups.productid: 0501ups.realpower.nominal: 810ups.serial: 000000000000ups.status: OLups.test.result: No test initiatedups.timer.shutdown: -60ups.timer.start: -60ups.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/7cac9fc1/attachment.htm>


More information about the Nut-upsuser mailing list