UPS Service authentication issue in 8.0.4 ?

Status
Not open for further replies.

mikedeissler

Dabbler
Joined
Aug 26, 2011
Messages
19
The UPS service will not start for me. Is this a bug or do I need to setup service credentials somewhere?

APC SMartUPS-750 via USB when UPS USB is plugged in gets this:

Jul 16 17:48:21 DDData kernel: ugen1.2: <American Power Conversion> at usbus1
Jul 16 17:48:21 DDData root: Unknown USB device: vendor 0x051d product 0x0002 bus uhub1

My UPS Settings are (not listed = no entry):

Identifier: ups
Driver: APC ups Smart-UPS (apcsmart)
Port: /dev/ugen1.2
Shutdown mode: UPS goes on battery
Shutdown timer: 60
UPS Master User Password: fixmepass

Starting the UPS service gets:

Jul 16 17:49:01 DDData last message repeated 7 times
Jul 16 17:50:01 DDData last message repeated 12 times
Jul 16 17:50:01 DDData freenas[7209]: Popen()ing: mount|grep "/dev/ufs/DDData"
Jul 16 17:50:06 DDData upsmon[7050]: UPS [ups]: connect failed: Connection failure: Connection refused
Jul 16 17:50:41 DDData last message repeated 7 times
Jul 16 17:52:07 DDData last message repeated 17 times
Jul 16 17:52:07 DDData upsmon[7050]: UPS ups is unavailable
Jul 16 17:52:12 DDData upsmon[7050]: UPS [ups]: connect failed: Connection failure: Connection refused
Jul 16 17:52:42 DDData last message repeated 6 times
Jul 16 17:52:45 DDData freenas[1793]: Executing: /usr/sbin/service ix-ups quietstart
Jul 16 17:52:46 DDData freenas[1793]: Executing: /usr/sbin/service nut restart
Jul 16 17:52:46 DDData freenas: Will not 'restart' nut because nut_enable is NO.
Jul 16 17:52:46 DDData freenas[1793]: Executing: /usr/sbin/service nut_upsmon restart
Jul 16 17:52:46 DDData freenas: Stopping nut_upsmon.
Jul 16 17:52:46 DDData upsmon[7049]: upsmon parent: read
Jul 16 17:52:46 DDData freenas: Will not 'start' nut_upsmon because nut_upsmon_enable is NO.
Jul 16 17:52:46 DDData freenas[1793]: Executing: /usr/sbin/service nut_upslog restart
Jul 16 17:52:46 DDData freenas: Stopping nut_upslog.
Jul 16 17:52:46 DDData freenas: Will not 'start' nut_upslog because nut_upslog_enable is NO.
Jul 16 17:52:47 DDData freenas[1793]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
Jul 16 17:52:51 DDData freenas[1793]: Executing: /usr/sbin/service ix-ups quietstart
Jul 16 17:52:52 DDData freenas[1793]: Executing: /usr/sbin/service nut restart
Jul 16 17:52:52 DDData freenas: nut not running? (check /var/db/nut/upsd.pid).
Jul 16 17:52:52 DDData freenas: Can't uu_lock ugen1.2: creat error: Permission denied
Jul 16 17:52:52 DDData freenas: Network UPS Tools - APC Smart protocol driver 3.0 (2.6.2)
Jul 16 17:52:52 DDData freenas: APC command table version 3.0
Jul 16 17:52:52 DDData freenas: Driver failed to start (exit status=1)
Jul 16 17:52:52 DDData freenas: Network UPS Tools - UPS driver controller 2.6.2
Jul 16 17:52:52 DDData root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Jul 16 17:52:52 DDData freenas: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Jul 16 17:52:52 DDData freenas[1793]: Executing: /usr/sbin/service nut_upsmon restart
Jul 16 17:52:52 DDData freenas: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Jul 16 17:52:52 DDData freenas: Starting nut_upsmon.
Jul 16 17:52:52 DDData freenas: UPS: ups (master) (power value 1)
Jul 16 17:52:52 DDData freenas[1793]: Executing: /usr/sbin/service nut_upslog restart
Jul 16 17:52:52 DDData upsmon[7726]: UPS [ups]: connect failed: Connection failure: Connection refused
Jul 16 17:52:52 DDData upsmon[7726]: Communications with UPS ups lost
Jul 16 17:52:52 DDData freenas: nut_upslog not running? (check /var/db/nut/upslog.pid).
Jul 16 17:52:52 DDData freenas: Starting nut_upslog.
Jul 16 17:52:52 DDData freenas: Warning: initial connect failed: Connection failure: Connection refused
Jul 16 17:52:52 DDData freenas[1793]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
Jul 16 17:52:57 DDData upsmon[7726]: UPS [ups]: connect failed: Connection failure: Connection refused
Jul 16 17:52:57 DDData upsmon[7726]: UPS ups is unavailable
Jul 16 17:53:02 DDData upsmon[7726]: UPS [ups]: connect failed: Connection failure: Connection refused

Thanks for Your Help, m
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
UPS service has always been "iffy". It's hit and miss since FreeBSD only supports certain UPSes. Typically, it's the really expensive (read $400+ commercial grade) models that it supports directly. However some of the "home" models work with the same driver as the more expensive models. You'll just have to experiment to figure out if any work for you. If not, consider buying one that is supported. :(
 

mikedeissler

Dabbler
Joined
Aug 26, 2011
Messages
19
Driver issue resolved but no shutdown

Thanks noobsauce80. Your post made me look at the other drivers and further down the list was one that worked, the APC ups 2 Back-UPS Pro USB USB (usbhid-ups), even though mine is a Smart-UPS. Service started right away after that.

I had to revise this post. I tested the shutdown and, although the upsmon logs the UPS on battery power event, it doesn't shutdown in 60 seconds. I waited 10 minutes without a shutdown and put the UPS back on line power. upsmon logs the UPS on line power event.

I read a post yesterday here somewhere that said the "on battery power setting" shutdown doesn't work; but if you do use that setting, the system will shut down when upsmon logs the battery power critical event. My UPS will run for about an hour; so, I'd rather not prove this myself unless absolutely necessary.

Anyone have any experience with this ?

Thanks Again, Mike
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I'm not sure if this is related, but there was a regression and things stopped working, like email notifications. It was related to database permissions. I don't think it's been fixed in 8.0.4, but there is another thread *somewhere* recently where I helped someone with a workaround. It's possible it's preventing shutdowns also.
 

mikedeissler

Dabbler
Joined
Aug 26, 2011
Messages
19
Adding Operator Group to Wheel does the trick !

Thanks to all who helped me with this. Silly me not reading to the end of a post ... Both the more involved fix and the simple one discussed above work. Adding the operator group to the wheel group being the easiest, if you're a lazy slug like me. Just remember to reboot after the change.

You All Rock ! m
 
Status
Not open for further replies.
Top