On Nov 9, 2014, at 3:48 PM, Steve Read <sd_read at hotmail.com> wrote:> I would like to verify my understanding keeping in mind I have a one master and one slave computer. > > When the master gets the low batt/noAC signal it initiates a broadcast packet(s) on port 3493. > > 1) Is this correct?No, the slave computer's upsmon process connects to the master (via TCP, so point-to-point, not broadcast), and listens for the OB (on battery) and then "OB LB" (on battery; low battery) status. (Not to say that some other UPS shutdown software couldn't broadcast, but port 3493 is reserved for NUT.)> Then the slave computer must have this port open and it listens on this port for the shut-down command. > > 2) Is this correct?It's the other way around: the master (via upsd) listens on port 3493, and the slave connects to that port.> On the slave if I run the following: > > steve at MyDesktop:~$ nmap -p 3493 192.168.0.6 > > Starting Nmap 6.40 ( http://nmap.org ) at 2014-11-09 15:42 EST > Nmap scan report for 192.168.0.6 > Host is up (0.00013s latency). > PORT STATE SERVICE > 3493/tcp closed nut > > Nmap done: 1 IP address (1 host up) scanned in 11.06 seconds > > Which tells me this port is configured for nut but it is closed?As mentioned above, that is expected. But if you run it against the master (192.168.0.7, if I understand correctly) from the slave, you should see that it is open.> I have rebooting and starting and stopping the service using: > > sudo service ups-monitor stop > sudo service ups-monitor start > But it remains closed. > > 3) Assuming this should be open how do I fix this?You mentioned that you have a "LISTEN 0.0.0.0" line in upsd.conf on the master - has upsd been restarted since that change was made? Other than that, you should be set. Do things match the "netstat" output I mentioned in a previous email? -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141109/6f188ec2/attachment.html>
Boy, I guess I got that one wrong. When I run nmap on the master it does say that port 3493 is open which is expected. So then what you are telling me means the ports are open. In other words I don't have a firewall issue. Now I am stumped as to why the slave does not shut down? Subject: Re: [Nut-upsuser] Master Works, Slave Does Not From: clepple at gmail.com Date: Sun, 9 Nov 2014 16:31:22 -0500 CC: nut-upsuser at lists.alioth.debian.org To: sd_read at hotmail.com On Nov 9, 2014, at 3:48 PM, Steve Read <sd_read at hotmail.com> wrote: I would like to verify my understanding keeping in mind I have a one master and one slave computer. When the master gets the low batt/noAC signal it initiates a broadcast packet(s) on port 3493. 1) Is this correct? No, the slave computer's upsmon process connects to the master (via TCP, so point-to-point, not broadcast), and listens for the OB (on battery) and then "OB LB" (on battery; low battery) status. (Not to say that some other UPS shutdown software couldn't broadcast, but port 3493 is reserved for NUT.) Then the slave computer must have this port open and it listens on this port for the shut-down command. 2) Is this correct? It's the other way around: the master (via upsd) listens on port 3493, and the slave connects to that port. On the slave if I run the following: steve at MyDesktop:~$ nmap -p 3493 192.168.0.6 Starting Nmap 6.40 ( http://nmap.org ) at 2014-11-09 15:42 ESTNmap scan report for 192.168.0.6Host is up (0.00013s latency).PORT STATE SERVICE3493/tcp closed nut Nmap done: 1 IP address (1 host up) scanned in 11.06 seconds Which tells me this port is configured for nut but it is closed? As mentioned above, that is expected. But if you run it against the master (192.168.0.7, if I understand correctly) from the slave, you should see that it is open. I have rebooting and starting and stopping the service using: sudo service ups-monitor stop sudo service ups-monitor startBut it remains closed. 3) Assuming this should be open how do I fix this? You mentioned that you have a "LISTEN 0.0.0.0" line in upsd.conf on the master - has upsd been restarted since that change was made? Other than that, you should be set. Do things match the "netstat" output I mentioned in a previous email? -- Charles Leppleclepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141109/ac8d997f/attachment-0001.html>
On Nov 9, 2014, at 7:56 PM, Steve Read <sd_read at hotmail.com> wrote:> Boy, I guess I got that one wrong. > > When I run nmap on the master it does say that port 3493 is open which is expected. > > So then what you are telling me means the ports are open. > In other words I don't have a firewall issue.I know this sounds incredibly pedantic, but if you run nmap on the slave and scan the master, and it says the ports are open, then you don't have a firewall issue. The "netstat" output is independent of the firewall.> Now I am stumped as to why the slave does not shut down? >You should see something like this in /var/log/daemon.log on the slave (and on the master, but you said that was shutting down already): upsmon[1234]: Communications with UPS sdrups at 192.168.0.7 established Once that connection is up, you can run "sudo upsmon -c fsd" on the master to simulate a power failure (to avoid running down the batteries too much). Note that this will shut down the master system, too. Details are in the upsmon man page. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141110/007a56fd/attachment.html>