[Nut-upsuser] New UPS Support: Eaton 5S 1000

Ken Marsh ken.marsh at sparkpost.com
Mon May 2 14:40:59 UTC 2016


Hi,

Thank you for taking a look at this. This is 13.10. I realize Saucy is no
longer supported. This system is slated for replacement, but in the
meantime I'm responsible for it.

The repo version of nut was 2.6.4-2.3ubuntu2. Installing it was useful as
it gave me the nut user and group. The compiled version errors out whether
or not the repo version is installed.

I just did strace. EINPROGRESS seems to be part of some socket connect code
either doing with ldap or DNS. I have no idea why it is doing this as the
upsmon process user "nut" is local, nsswitch.conf has files before ldap,
and the UPS is on USB and in standalone mode. Maybe just boilerplate
library initialization?

The nscd is not running. Kernel is 3.11.0-13-generic so it's a "3" kernel.

The getpwnam is for (ups) not sure if that's a variable or string literal.
If it's a literal, I have nothing named "ups" in the setup, the UPS is
[eaton] and the user within NUT is monuser.

Any more ideas or questions?

Thanks again,
Ken




On Sun, May 1, 2016 at 4:07 PM, Charles Lepple <clepple at gmail.com> wrote:

> On Apr 26, 2016, at 11:56 AM, Ken Marsh <ken.marsh at sparkpost.com> wrote:
> >
> >
> > I've used NUT successfully for monitoring many different brands of UPS,
> but this one has me stumped. It has the same manufacturer ID and Product ID
> as older supported MGE-type Eaton UPS's, but has trouble talking. I tried
> Ubuntu's repo NUT
>
> Which release of Ubuntu, and which version of the NUT packages?
>
> > , and it logs a Connecting to UPS message every few seconds forever, but
> never really succeeds (or says it fails). Different failure mode after
> building latest NUT d/l, as shown below. I have a udev rule in place,
> restarted udev and have removed/replaced the USB cable.
> >
> > I'll try to lay out all the info here up front. If this requires more
> data for development, I'll do my best to provide it.
> >
> > # lsusb:
> >
> > Bus 007 Device 061: ID 0463:ffff MGE UPS Systems UPS
> >
> > # cat 90-nut-ups.rules
> > # Eaton MGE 5S 1000LCD
> > ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0463",
> ATTR{idProduct}=="ffff", MODE="0660", GROUP="nut"
> >
> > # ls -l /dev/bus/usb/007/061
> > crw-rw---- 1 root nut 189, 828 Apr 26 11:38 /dev/bus/usb/007/061
> >
> >
> > # cat ups.conf
> > [eaton]
> >  driver=usbhid-ups
> >  port=auto
> >  desc = "Eaton 5S"
> >
> > # cat nut.conf
> > MODE=standalone
> >
> >
> > #Log for 2.7.4
> > Apr 25 16:37:21 myhost upsd[20089]: Connected to UPS [eaton]:
> usbhid-ups-eaton
> > Apr 25 16:37:21 myhost upsd[20089]: mainloop: polling 1 filedescriptors
> > Apr 25 16:37:23 myhost upsd[20089]: mainloop: no data available
> > Apr 25 16:37:23 myhost upsd[20089]: mainloop: polling 2 filedescriptors
> > Apr 25 16:37:23 myhost upsd[20089]: Connected to UPS [eaton]:
> usbhid-ups-eaton
> > Apr 25 16:37:23 myhost upsd[20089]: mainloop: polling 1 filedescriptors
> > Apr 25 16:37:25 myhost upsd[20089]: mainloop: no data available
> >
> > # NUT build info
> > mkdir -p /var/state/ups
> > chmod 0775 /var/state/ups
> > chown root:nut /var/state/ups
> >
> > apt-get install pkg-config
> > apt-get install libusb-1.0.0-dev
> >
> > wget
> http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2
> > bunzip2 libusb-comp*
> > cd libusb-compat-0.1.4/
> > ./configure
> > make
> > make install
> >
> > wget http://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz
> > gunzip nut-*
> > cd nut*4
> >
> > ./configure --with-user=ups --with-group=nut --with-usb
> > make
> > make install
> > cp -p /etc/nut/*.users /usr/local/ups/etc/
> > /usr/local/ups/sbin/upsdrvctl start
> >
> > Network UPS Tools - UPS driver controller 2.7.4
> >
> > Network UPS Tools - Generic HID driver 0.41 (2.7.4)
> >
> > USB communication driver 0.33
> >
> > getpwnam(ups): Operation now in progress
>
> Hmm, EINPROGRESS is not called out specifically in the man page:
>
> "ERRORS
>        0 or ENOENT or ESRCH or EBADF or EPERM or ...
>               The given name or uid was not found."
>
> Do you have any other nsswitch.conf settings besides the flat files for
> /etc/passwd and friends? Is nscd running?
>
> Did you uninstall the Ubuntu version of NUT before building from scratch?
> If not, you might need to run strace to find out why getpwnam() is not
> returning a user structure.
>
> --
> Charles Lepple
> clepple at gmail
>
>
>
>


-- 







*KEN MARSH Sr. DevOps Engineer www.sparkpost.com <http://www.sparkpost.com>
tel 410-872-4910 x249 mobile 443-857-3262 email ken.marsh at sparkpost.com
<ken.marsh at sparkpost.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20160502/a4db6582/attachment.html>


More information about the Nut-upsuser mailing list