Hello, I am presently upgrading my servers. The old ones are running Suse 10.1 and I am upgrading to the most recent Debian. Oh, and I am not an IT guy rather a hacker who loves Linux and seems to enjoy getting myself confused. Presently I am trying to get the Nut running and am having problems. I have the master server working but it does not inform the slave server to shut down. For the most part I borrowed the settings from my present servers (the ones running Suse 10.1). Below is the setup (all references are from the Nut perspective) and when I supply low batter/AC the master server shuts down but the client server does not. Keep in mind I copied the parameters from my existing server (master 192.168.0.3, clien 192.168.0.4) which has been running fine for years (although I remember many head banging times getting that to run at the time). My new server IP's are: 192.168.0.7 is the master 192.168.0.6 is the client Thank you for any help - Steve On the Master Server I have: nut.conf MODE=netserver ups.conf [sdrups] driver genericups port = /dev/ttyS1 desc = "For Server & Backup" upstype=9 upsd.conf ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/255.255.255.0 ACL server 192.168.0.6/255.255.255.0 ACCEPT localhost ACCEPT server REJECT all upsd.users [root] password autocadba2 upsmon master instcmds = ALL On the Client Server I have: nut.conf MODE=netserver ups.conf [sdrups] driver genericups port = /dev/ttyS1 desc = "For Server & Backup" upstype=9 upsd.conf ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/255.255.255.0 ACL backup 192.168.0.7/255.255.255.0 ACCEPT localhost ACCEPT backup REJECT all upsd.users [root] password autocadba2 upsmon master instcmds = ALL -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141106/0a8a1d56/attachment.html>
On Nov 6, 2014, at 12:48 PM, Steve Read <sd_read at hotmail.com> wrote:> I am presently upgrading my servers. The old ones are running Suse 10.1 and I am upgrading to the most recent Debian.What version of NUT on the new systems? There are a few changes to the configuration files, mostly related to the ACL lines. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141106/d9d4a322/attachment.html>
I don't see a upsmon.conf in the original post. Shouldn't the clients have upsmon running on them rather than upsd? Stan On Thu, Nov 6, 2014 at 9:19 PM, Charles Lepple <clepple at gmail.com> wrote:> On Nov 6, 2014, at 12:48 PM, Steve Read <sd_read at hotmail.com> wrote: > > I am presently upgrading my servers. The old ones are running Suse 10.1 > and I am upgrading to the most recent Debian. > > > What version of NUT on the new systems? > > There are a few changes to the configuration files, mostly related to the > ACL lines. > > -- > Charles Lepple > clepple at gmail > > > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141107/512897b3/attachment.html>
[Please use reply-all to keep the discussion on the list, thanks] On Nov 6, 2014, at 10:19 PM, Charles Lepple <clepple at gmail.com> wrote:> On Nov 6, 2014, at 12:48 PM, Steve Read <sd_read at hotmail.com> wrote: > >> I am presently upgrading my servers. The old ones are running Suse 10.1 and I am upgrading to the most recent Debian. > > What version of NUT on the new systems? > > There are a few changes to the configuration files, mostly related to the ACL lines.You mentioned you got "driver.version: 2.6.4" from upsc. So it seems like you have Debian wheezy. Is that the case for both servers? (What I was really interested in was the output of "dpkg -l nut", since it shows the Debian-specific version number as well, but wheezy hasn't changed much. There are a few things still being sorted out in Debian jessie.)> Now this may be a problem but I don't think it is the only one. I really feel this is a permissions issue. > > For example from the master, if I type: > root at backup2:~# sudo upsc sdrups at localhost ups.status > OL > > Which is the response I expect, but if I type (also from the master): > root at backup2:~# sudo upsc sdrups at 192.168.0.7 ups.status > Error: Connection failure: Connection refusedOne thing that has changed since NUT 2.4.x is that the ACL options were removed, and the defaults for the LISTEN directive were changed to only bind to localhost. So a "netstat -ta" (trimmed to just show NUT) would look like this: Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State ... tcp 0 0 localhost:nut *:* LISTEN Instead, you want to listen on the wildcard address, so you will want to add "LISTEN 0.0.0.0" to /etc/nut/upsd.conf. After restarting NUT, netstat should look like this: Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State ... tcp 0 0 *:nut *:* LISTEN And at that point, you can use the firewall rules to restrict access to just localhost and your local network. If you were able to get output from upsc, then it sounds like you got the driver working. Just in case, here is the UPGRADING document: https://github.com/networkupstools/nut/blob/master/UPGRADING Some drivers (apcsmart) have had under-the-hood changes that should be more beneficial than problematic. Also, Stan mentioned the following off-list, and it holds true:> upsmon.conf should have a line like this > > MONITOR apcusb at 192.168.1.235 1 upsmon pass slave > > upsd.users should have a matching statement like this > > [upsmon] > password = pass > # upsmon master > # or > upsmon slaveThe only configuration files that a slave needs are upsmon.conf, nut.conf to tell the init.system that it is a slave, and possibly an upssched.conf if you haven enabled that. The others are master-only. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141108/7bdc8b5e/attachment.html>