Need help with UPS...

Status
Not open for further replies.
Joined
Nov 4, 2013
Messages
9
Hello,

I am trying to switch ON UPS service without success. The UPS I have is APC Back-UPS ES 700Y-IN.

During the bootup process, I am able to see the following statement:
ugen0.3: <American Power Conversion> at usbus0

When I run specific commands, i get the following information:
[root@freenas] ~# uname -mrs
FreeBSD 9.2-RELEASE-p3 amd64

[root@freenas] ~# /usr/local/libexec/nut/upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.5
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
Using subdriver: APC HID 0.95
libusb_get_report: Unknown error
Can't initialize data from HID UPS
Driver failed to start (exit status=1)

[root@freenas] ~# /usr/local/libexec/nut/upsdrvctl -t -D -u root start
Network UPS Tools - UPS driver controller 2.6.5
*** Testing mode: not calling exec/kill
0.000000
If you're not a NUT core developer, chances are that you're told to enable debugging
to see why a driver isn't working for you. We're sorry for the confusion, but this is
the 'upsdrvctl' wrapper, not the driver you're interested in.

Below you'll find one or more lines starting with 'exec:' followed by an absolute
path to the driver binary and some command line option. This is what the driver
starts and you need to copy and paste that line and append the debug flags to that
line (less the 'exec:' prefix).

0.000074 Starting UPS: ups
0.000087 exec: /usr/local/libexec/nut/usbhid-ups -a ups -u root

[root@freenas] ~# /usr/local/libexec/nut/usbhid-ups -a ups -u root -DDDD | more
0.000000 debug level is '4'
0.000379 upsdrv_initups...
0.000841 Checking device (051D/0002) (/dev/usb//dev/ugen0.3)
0.091400 - VendorID: 051d
0.091416 - ProductID: 0002
0.091419 - Manufacturer: American Power Conversion
0.091422 - Product: Back-UPS ES 700Y-IN FW:895.m1.I USB FW:m1
0.091424 - Serial Number: E21313001088
0.091426 - Bus: /dev/usb
0.091428 Trying to match device
0.091435 Device matches
0.586393 HID descriptor, method 1: (9 bytes) => 09 21 10 01 21 01 22 7d 04
0.586405 i=0, extra=09, extra[i+1]=21
0.586411 HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 7d 04
0.586413 HID descriptor length 1149
0.829410 Report Descriptor size = 1149
0.829432 Report Descriptor: (1149 bytes) => 05 84 09 04 a1 01 09 24 a1 02 85 01 09

[root@freenas] ~# usbconfig|grep ugen0\.3
ugen0.3: <Back-UPS ES 700Y-IN FW895.m1.I USB FWm1 American Power Conversion> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (2mA)
[root@freenas] ~# ls -l /dev/ugen0.3
lrwxr-xr-x 1 root wheel 9 Mar 15 17:02 /dev/ugen0.3@ -> /dev/usb/0.3.0
[root@freenas] /dev/usb# ls -l 0.3.0
crw-rw---- 1 root uucp 0xb4 Mar 15 17:02 0.3.0

However when i start the service I get the following:
Mar 17 02:24:42 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).
Mar 17 02:24:42 freenas notifier: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Mar 17 02:24:42 freenas notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
Mar 17 02:24:42 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).
Mar 17 02:24:43 freenas root: Unknown USB device: vendor 0x051d product 0x0002 bus uhub0
Mar 17 02:24:43 freenas notifier: Using subdriver: APC HID 0.95
Mar 17 02:24:43 freenas notifier: Network UPS Tools - Generic HID driver 0.37 (2.6.5)
Mar 17 02:24:43 freenas notifier: USB communication driver 0.31
Mar 17 02:24:43 freenas notifier: libusb_get_report: Unknown error
Mar 17 02:24:43 freenas notifier: Can't initialize data from HID UPS
Mar 17 02:24:43 freenas notifier: Driver failed to start (exit status=1)
Mar 17 02:24:43 freenas notifier: Network UPS Tools - UPS driver controller 2.6.5
Mar 17 02:24:43 freenas root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Mar 17 02:24:43 freenas notifier: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Mar 17 02:24:43 freenas notifier: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Mar 17 02:24:43 freenas notifier: Starting nut_upsmon.
Mar 17 02:24:43 freenas notifier: fopen /var/db/nut/upsmon.pid: No such file or directory
Mar 17 02:24:43 freenas notifier: UPS: ups (master) (power value 1)
Mar 17 02:24:43 freenas notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
Mar 17 02:24:43 freenas notifier: Starting nut_upslog.
Mar 17 02:24:43 freenas notifier: Warning: initial connect failed: Connection failure: Connection refused
Mar 17 02:24:45 freenas notifier: Stopping nut_upslog.
Mar 17 02:24:45 freenas notifier: Stopping nut_upsmon.
Mar 17 02:25:08 freenas upsmon[6595]: upsmon parent: read
Mar 17 02:25:08 freenas notifier: Waiting for PIDS: 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596,
6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596, 6596.
Mar 17 02:25:08 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).

Requesting your help/guidance to fix the NUT service. I am open for apcupsd option as well as i have tested it with one of my Ubuntu install, requesting guidance on how to install the same.

Regards,
Vivek
 
Joined
Nov 4, 2013
Messages
9
Dear All,

Was not able to fix the UPS problem using NUT.

Installed APCUPSD and its working wonderfully, following are the step to install APCUPSD:
========================
[root@freenas] /# mount -uw /
[root@freenas] ~# pkg_add -r -v usbutils
[root@freenas] /# pkg_add -r -v apcupsd

# chect port and make a note of it
[root@freenas] /# /usr/local/sbin/lsusb

# add apcupsd in /etc/rc.conf to allow apcupsd to start:
apcupsd_enable="YES"

[root@freenas] /# cd /usr/local/etc/apcupsd
[root@freenas] /# cp apcupsd.conf.sample apcupsd.conf

# edit apcupsd.conf change values for UPSNAME, UPSCABLE, UPSTYPE and DEVICE
[root@freenas] /# vi apcupsd.conf

# since install is in temp file system, copy to be available after a reboot
[root@freenas] /# mkdir /conf/base/etc/local/apcupsd
[root@freenas] /# cp /usr/local/etc/apcupsd/* /conf/base/etc/local/apcupsd/
[root@freenas] /# cp /usr/local/etc/rc.d/apcupsd /conf/base/etc/local/rc.d

[root@freenas] /# /etc/local/rc.d/apcupsd start
Starting apcupsd.
[root@freenas] /# /etc/local/rc.d/apcupsd status
apcupsd is running as pid 4423.

# check event log for error/warning
[root@freenas] /# cat /var/log/apcupsd.events

========================
Hope this helps.

Regards.
 
Status
Not open for further replies.
Top