I have a Dell 500w UPS and it works great with Ubuntu 12.04 LTS and Network UPS tools 2.6.3 via usb. This powers a standalone server for the purposes of clean shutdowns. This was installed using "sudo apt-get install nut" and there are no issues with the Server > nut > ups chain. I am using the usbhid-ups driver and haven't had any issues. I am trying to also add an NAS to the system as a slave, so that as soon as the server shuts down, the NAS will also shut down, but I can't get NUT to listen to anything. As far as I understand, the method I should be using is to: 1. Set MODE=netserver in /etc/nut/nut.conf 2. Add the server's IP address to LISTEN = [server ip] in /etc/nut/upsd.conf 3. Then restart nut (sudo service nut restart). This does not work. If I use the command sudo upsd I get the following output: "Network UPS Tools upsd 2.6.3 Not listening on [server ip] No listening interface available" If I use sudo service nut status I get the following output: "Checking status of Network UPS Tools * Upsd is not running * Upsmon is running" If I check the output of the default port for the service sudo netstat -altp|grep :3493 I then get the following: Tcp 0 0 [server address]:3493 0.0.0.0:* LISTEN 26648/upsd Tcp 0 0 127.0.0.1:3493 0.0.0.0:* LISTEN 23679/upsd Tcp 0 0 127.0.0.1:41385 127.0.0.1:3493 ESTABLISHED 27947/upsmon Tcp 0 0 127.0.0.1:3493 127.0.0.1:41385 ESTABLISHED 23679/upsd Tcp6 0 0 ::1:3493 :::* LISTEN 23679/upsd Which seems to show that upsd is running and it is listening or already connected, presumably via the usb cable. So is this working as intended? Is it impossible to set up a server + UPS via usb and then have another device (in this case an NAS) listen as a slave to the server? From the documentation it seems like this should be possible. Any help would be great. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140321/80981a9e/attachment.html>
On Mar 21, 2014, at 1:39 PM, Schauer, Peter wrote:> I have a Dell 500w UPS and it works great with Ubuntu 12.04 LTS and Network UPS tools 2.6.3 via usb. This powers a standalone server for the purposes of clean shutdowns. This was installed using ?sudo apt-get install nut? and there are no issues with the Server > nut > ups chain. I am using the usbhid-ups driver and haven?t had any issues.Sounds good. You mention that NUT was installed via apt-get. Just to confirm, has another version of NUT ever been installed on this box by hand (i.e. download and build from a source tarball)?> I am trying to also add an NAS to the system as a slave, so that as soon as the server shuts down, the NAS will also shut down, but I can?t get NUT to listen to anything. As far as I understand, the method I should be using is to: > > 1. Set MODE=netserver in /etc/nut/nut.conf > 2. Add the server?s IP address to LISTEN = [server ip] in /etc/nut/upsd.conf > 3. Then restart nut (sudo service nut restart). > > This does not work. If I use the command sudo upsd I get the following output: > ?Network UPS Tools upsd 2.6.3 > Not listening on [server ip] > No listening interface available? > > If I use sudo service nut status I get the following output: > ?Checking status of Network UPS Tools > ? Upsd is not running > ? Upsmon is running?What happens if you run 'sudo killall upsd' then 'sudo service nut restart'?> If I check the output of the default port for the service sudo netstat ?altp|grep :3493 I then get the following: > Tcp 0 0 [server address]:3493 0.0.0.0:* LISTEN 26648/upsd > Tcp 0 0 127.0.0.1:3493 0.0.0.0:* LISTEN 23679/upsd > Tcp 0 0 127.0.0.1:41385 127.0.0.1:3493 ESTABLISHED 27947/upsmon > Tcp 0 0 127.0.0.1:3493 127.0.0.1:41385 ESTABLISHED 23679/upsd > Tcp6 0 0 ::1:3493 :::* LISTEN 23679/upsd > > Which seems to show that upsd is running and it is listening or already connected, presumably via the usb cable. > > So is this working as intended? Is it impossible to set up a server + UPS via usb and then have another device (in this case an NAS) listen as a slave to the server? From the documentation it seems like this should be possible. >It sounds like there is a slight disconnect in the Ubuntu startup scripts, since the netstat output shows that an instance of upsd is listening on port 3493 (which is sufficient for the NAS to monitor). -- Charles Lepple clepple at gmail
> On Mar 21, 2014, at 1:39 PM, Schauer, Peter wrote: > > You mention that NUT was installed via apt-get. Just to confirm, has another > version of NUT ever been installed on this box by hand (i.e. download and > build from a source tarball)?No never - it's a very recent installation and nut has never been installed any other way.> > > If I use sudo service nut status I get the following output: > > "Checking status of Network UPS Tools > > * Upsd is not running > > * Upsmon is running" > > What happens if you run 'sudo killall upsd' then 'sudo service nut restart'?Very interesting - a couple things came from this: 1. This works - UPSD showed as up and running after this. 2. I made a syntax error in /etc/nut/upsd.conf. The server ip address should be LISTEN [ip address], *not* LISTEN=[ip address]. With "LISTEN =" upsd won't start. With LISTEN [ip] it starts and runs correctly. I got confused because in some config files the = is used, and in others it is not. Additional steps that were required (in case people find this thread searching in the future): - I had to add an additional line in upsd.conf for LISTEN 127.0.0.1, in addition to the external interface ip address, otherwise nut would not know that the ups is on usb, not the network interface. It is strange that I couldn't use LISTEN localhost here (properly defined in /etc/hosts). It responds correctly to sudo upsc upsname at localhost so not sure why this doesn't work in upsd.conf. Not important, just curious. - I also had to run sudo upsdrvctl start to force the changes to be recognised. Stopping and starting the service is not enough. After all this, it works, and both the usb and network devices are protected. Thanks for the assistance!
Maybe Matching Threads
- UPSD is not running
- SOLVED Re: kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
- kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
- upsd fails to start
- problem starting upsd