<div dir="ltr">Hi,<div><br></div><div>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.<div><br></div><div>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.</div><div><br></div><div>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?</div></div><div><br></div><div>The nscd is not running. Kernel is 3.11.0-13-generic so it's a "3" kernel.</div><div><br></div><div>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.</div><div><br></div><div>Any more ideas or questions?</div><div><br></div><div>Thanks again,</div><div>Ken</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 1, 2016 at 4:07 PM, Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Apr 26, 2016, at 11:56 AM, Ken Marsh <<a href="mailto:ken.marsh@sparkpost.com">ken.marsh@sparkpost.com</a>> wrote:<br>
><br>
><br>
> 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<br>
<br>
</span>Which release of Ubuntu, and which version of the NUT packages?<br>
<div><div class="h5"><br>
> , 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.<br>
><br>
> 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.<br>
><br>
> # lsusb:<br>
><br>
> Bus 007 Device 061: ID 0463:ffff MGE UPS Systems UPS<br>
><br>
> # cat 90-nut-ups.rules<br>
> # Eaton MGE 5S 1000LCD<br>
> ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0463", ATTR{idProduct}=="ffff", MODE="0660", GROUP="nut"<br>
><br>
> # ls -l /dev/bus/usb/007/061<br>
> crw-rw---- 1 root nut 189, 828 Apr 26 11:38 /dev/bus/usb/007/061<br>
><br>
><br>
> # cat ups.conf<br>
> [eaton]<br>
>  driver=usbhid-ups<br>
>  port=auto<br>
>  desc = "Eaton 5S"<br>
><br>
> # cat nut.conf<br>
> MODE=standalone<br>
><br>
><br>
> #Log for 2.7.4<br>
> Apr 25 16:37:21 myhost upsd[20089]: Connected to UPS [eaton]: usbhid-ups-eaton<br>
> Apr 25 16:37:21 myhost upsd[20089]: mainloop: polling 1 filedescriptors<br>
> Apr 25 16:37:23 myhost upsd[20089]: mainloop: no data available<br>
> Apr 25 16:37:23 myhost upsd[20089]: mainloop: polling 2 filedescriptors<br>
> Apr 25 16:37:23 myhost upsd[20089]: Connected to UPS [eaton]: usbhid-ups-eaton<br>
> Apr 25 16:37:23 myhost upsd[20089]: mainloop: polling 1 filedescriptors<br>
> Apr 25 16:37:25 myhost upsd[20089]: mainloop: no data available<br>
><br>
> # NUT build info<br>
> mkdir -p /var/state/ups<br>
> chmod 0775 /var/state/ups<br>
> chown root:nut /var/state/ups<br>
><br>
> apt-get install pkg-config<br>
> apt-get install libusb-1.0.0-dev<br>
><br>
> wget <a href="http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2" rel="noreferrer" target="_blank">http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2</a><br>
> bunzip2 libusb-comp*<br>
> cd libusb-compat-0.1.4/<br>
> ./configure<br>
> make<br>
> make install<br>
><br>
> wget <a href="http://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz" rel="noreferrer" target="_blank">http://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz</a><br>
> gunzip nut-*<br>
> cd nut*4<br>
><br>
> ./configure --with-user=ups --with-group=nut --with-usb<br>
> make<br>
> make install<br>
> cp -p /etc/nut/*.users /usr/local/ups/etc/<br>
> /usr/local/ups/sbin/upsdrvctl start<br>
><br>
> Network UPS Tools - UPS driver controller 2.7.4<br>
><br>
> Network UPS Tools - Generic HID driver 0.41 (2.7.4)<br>
><br>
> USB communication driver 0.33<br>
><br>
> getpwnam(ups): Operation now in progress<br>
<br>
</div></div>Hmm, EINPROGRESS is not called out specifically in the man page:<br>
<br>
"ERRORS<br>
       0 or ENOENT or ESRCH or EBADF or EPERM or ...<br>
              The given name or uid was not found."<br>
<br>
Do you have any other nsswitch.conf settings besides the flat files for /etc/passwd and friends? Is nscd running?<br>
<br>
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.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Charles Lepple<br>
clepple@gmail<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">







<p><span><b>KEN MARSH<br>
Sr. DevOps Engineer<br>
<a href="http://www.sparkpost.com" target="_blank">www.sparkpost.com</a><br>
<br>
tel 410-872-4910 x249<br>
mobile 443-857-3262<br>
email <a href="mailto:ken.marsh@sparkpost.com" target="_blank">ken.marsh@sparkpost.com</a></b></span></p></div></div>
</div>