On Nov 8, 2014, at 1:52 PM, Steve Read <sd_read at hotmail.com> wrote:> I have made changes but it is still the same. That is when the server gets the lowbat/noAC signal it does shut down as expected but the slave does not. > > Perhaps it makes sense for me to list the present settings: > > On the Master: > > nut.conf > MODE=netserver > > ups.conf > [sdrups] > driver = genericups > port = /dev/ttyS1 > desc = "For Server & Backup" > upstype=9 > > upsd.conf > LISTEN 0.0.0.0 > > upsd.users > [root] > password = mypassword > upsmon master > instcmds = ALL > > upsmon.conf > MONITOR root at 192.168.0.7 1 sdrups autocadba2 masterThis looks good, except for the MONITOR line. Given the above settings, I think you need this: MONITOR sdrups at 192.168.0.7 1 root mypassword master> > On the Slave: > > nut.conf > MODE=netserverMODE=netclient for the slave.> upsmon.conf > MONITOR root at 192.168.0.7 1 sdrups autocadba2 slaveSame username/password change as above: MONITOR sdrups at 192.168.0.7 1 root mypassword slave> Master: 192.168.0.7 > Slave: 192.168.0.6 > > Dealing with the firewall I applied the following to both the master and slave: > > sudo iptables -A INPUT -p tcp --dport 3493 -j ACCEPT > > > I have looked in the log files but have not seen anything to suggest a problem.You should see something like this in /var/log/daemon.log: upsmon[1234]: Communications with UPS sdrups at 192.168.0.7 established And something like this from netstat on the slave: $ netstat -t |grep -w nut tcp 0 0 192.168.0.6:40925 192.168.0.7:nut ESTABLISHED -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141108/5a3b1024/attachment-0001.html>
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? Then the slave computer must have this port open and it listens on this port for the shut-down command. 2) Is this correct? 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? 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? Thank you for any help - Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141109/757ba53b/attachment.html>
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>