On Apr 26, 2016, at 11:56 AM, Ken Marsh <[email protected]> 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@gmail




_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to