8.0.4 Release: UPS service does not start

Status
Not open for further replies.

xRaider

Cadet
Joined
Mar 2, 2012
Messages
4
FreeNAS-8.0.4-RELEASE-x64. UPS service does not start:
Code:
Mar  3 10:05:35 freenas freenas[1755]: Executing: /usr/sbin/service ix-ups quietstart
Mar  3 10:05:36 freenas freenas[1755]: Executing: /usr/sbin/service nut restart
Mar  3 10:05:36 freenas freenas: nut not running? (check /var/db/nut/upsd.pid).
Mar  3 10:05:36 freenas freenas: UPS type: APC Back-UPS (940-0020B/C cable)
Mar  3 10:05:36 freenas freenas: 
Mar  3 10:05:36 freenas freenas: Can't uu_lock cuau0: creat error: Permission denied
Mar  3 10:05:36 freenas freenas: Network UPS Tools - Generic contact-closure UPS driver 1.36 (2.6.2)
Mar  3 10:05:36 freenas freenas: Driver failed to start (exit status=1)
Mar  3 10:05:36 freenas freenas: Network UPS Tools - UPS driver controller 2.6.2
Mar  3 10:05:36 freenas root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Mar  3 10:05:36 freenas freenas: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Mar  3 10:05:36 freenas freenas[1755]: Executing: /usr/sbin/service nut_upsmon restart
Mar  3 10:05:36 freenas freenas: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Mar  3 10:05:36 freenas freenas: Starting nut_upsmon.
Mar  3 10:05:36 freenas freenas: UPS: ups (master) (power value 1)
Mar  3 10:05:36 freenas freenas[1755]: Executing: /usr/sbin/service nut_upslog restart
Mar  3 10:05:36 freenas upsmon[2774]: UPS [ups]: connect failed: Connection failure: Connection refused
Mar  3 10:05:36 freenas upsmon[2774]: Communications with UPS ups lost
Mar  3 10:05:36 freenas freenas: nut_upslog not running? (check /var/db/nut/upslog.pid).
Mar  3 10:05:36 freenas freenas: Starting nut_upslog.
Mar  3 10:05:36 freenas freenas: Warning: initial connect failed: Connection failure: Connection refused
Mar  3 10:05:36 freenas freenas[1755]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
Mar  3 10:05:41 freenas upsmon[2774]: UPS [ups]: connect failed: Connection failure: Connection refused
Mar  3 10:05:41 freenas upsmon[2774]: UPS ups is unavailable
Mar  3 10:05:46 freenas upsmon[2774]: UPS [ups]: connect failed: Connection failure: Connection refused
Mar  3 10:06:17 freenas last message repeated 6 times

But previous relise FreeNAS-8.0.3-RELEASE-p1-x64 works perfect:
Code:
Mar  3 09:46:33 freenas freenas[1682]: Executing: /usr/sbin/service ix-ups quietstart
Mar  3 09:46:33 freenas freenas[1682]: Executing: /usr/sbin/service nut restart
Mar  3 09:46:33 freenas freenas: nut not running? (check /var/db/nut/upsd.pid).
Mar  3 09:46:33 freenas freenas: UPS type: APC Back-UPS (940-0020B/C cable)
Mar  3 09:46:33 freenas freenas: 
Mar  3 09:46:33 freenas freenas: Network UPS Tools - UPS driver controller 2.6.2
Mar  3 09:46:33 freenas freenas: Starting nut.
Mar  3 09:46:33 freenas freenas: listening on 127.0.0.1 port 3493
Mar  3 09:46:33 freenas freenas: Connected to UPS [ups]: genericups-ups
Mar  3 09:46:33 freenas freenas[1682]: Executing: /usr/sbin/service nut_upsmon restart
Mar  3 09:46:33 freenas freenas: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Mar  3 09:46:33 freenas freenas: Starting nut_upsmon.
Mar  3 09:46:33 freenas freenas: UPS: ups (master) (power value 1)
Mar  3 09:46:33 freenas freenas[1682]: Executing: /usr/sbin/service nut_upslog restart
Mar  3 09:46:33 freenas freenas: nut_upslog not running? (check /var/db/nut/upslog.pid).
Mar  3 09:46:33 freenas freenas: Starting nut_upslog.
Mar  3 09:46:34 freenas freenas[1682]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
Mar  3 09:46:54 freenas upsmon[7490]: UPS ups on battery
Mar  3 09:46:59 freenas upsmon[7490]: UPS ups on line power

Hardware is the same.
 

Letni

Explorer
Joined
Jan 22, 2012
Messages
63
I had this trouble as well after upgrade.. Ended up completly shutting down my FreeNAS box and powered back on.. UPS service started afterwards..
Take that back.. After looking at the LOGs it appears that i too am having issues with UPS service on 8.0.4.. Using APC 350 USB.. No Love here with 8.0.4... Come' on guys.. fix these stupid bugs!
 

HAL 9000

Dabbler
Joined
Jan 27, 2012
Messages
42
I had this trouble as well after upgrade.. Ended up completly shutting down my FreeNAS box and powered back on.. UPS service started afterwards..


Maybe your UPS is connected via USB? Serial connection doesn't work in 8.0.4 due to some device permission problems.
 

xRaider

Cadet
Joined
Mar 2, 2012
Messages
4
My UPS is connected via serial cable:
Code:
Mar  3 10:05:36 freenas freenas: UPS type: APC Back-UPS (940-0020B/C cable)
 

elpatron

Cadet
Joined
May 3, 2012
Messages
2
Hi,

maybe there is a workaround for this problem to get the service running with FN 8.0.4? Any hints?

Bye,
Markus
 

Hi-Liter

Explorer
Joined
Oct 6, 2011
Messages
83
Are you sure the problem just occurs when connected via serial cable?
I have an APC Back-UPS 350 connected via USB and get the following messages when trying to start the ups service:

Output when disconnecting and reconnecting the UPS:
Code:
kernel: ugen2.2: <American Power Conversion> at usbus2 (disconnected)
kernel: ugen2.2: <American Power Conversion> at usbus2


Output when trying to setup and afterwards start ups service (Settings: Identifier: "ups" - Driver: "APC ups 2 Back-UPS Pro USB USB (usbhid-ups)" - Port: "/dev/ugen2.2")
Code:
root: Unknown USB device: vendor 0x051d product 0x0002 bus uhub2
freenas[1898]: Executing: /usr/sbin/service ix-ups quietstart
freenas[1898]: Executing: /usr/sbin/service nut restart
freenas: Will not 'restart' nut because nut_enable is NO.
freenas[1898]: Executing: /usr/sbin/service nut_upsmon restart
freenas: Will not 'restart' nut_upsmon because nut_upsmon_enable is NO.
freenas[1898]: Executing: /usr/sbin/service nut_upslog restart
freenas: Will not 'restart' nut_upslog because nut_upslog_enable is NO.
freenas[1898]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
freenas[1898]: Executing: /usr/sbin/service ix-ups quietstart
freenas[1898]: Executing: /usr/sbin/service nut restart
freenas: nut not running? (check /var/db/nut/upsd.pid).
root: Unknown USB device: vendor 0x051d product 0x0002 bus uhub2
freenas: Using subdriver: APC HID 0.95
freenas: Network UPS Tools - Generic HID driver 0.35 (2.6.2)
freenas: USB communication driver 0.31
freenas: libusb_get_report: Unknown error
freenas: Can't initialize data from HID UPS
freenas: Driver failed to start (exit status=1)
freenas: Network UPS Tools - UPS driver controller 2.6.2
root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
freenas: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
freenas[1898]: Executing: /usr/sbin/service nut_upsmon restart
freenas: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
freenas: Starting nut_upsmon.
freenas: UPS: ups (master) (power value 1)
freenas[1898]: Executing: /usr/sbin/service nut_upslog restart
upsmon[2925]: UPS [ups]: connect failed: Connection failure: Connection refused
upsmon[2925]: Communications with UPS ups lost
freenas: nut_upslog not running? (check /var/db/nut/upslog.pid).
freenas: Starting nut_upslog.
freenas: Warning: initial connect failed: Connection failure: Connection refused
freenas[1898]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
upsmon[2925]: UPS [ups]: connect failed: Connection failure: Connection refused
upsmon[2925]: UPS ups is unavailable
upsmon[2925]: UPS [ups]: connect failed: Connection failure: Connection refused


Is this the same issue?
 

sanddrag

Cadet
Joined
May 31, 2012
Messages
3
I found ticket #1292 that seems to resolve the issue for me, but it doesn't last through a reboot.

This:
Code:
chmod 777 /var/spool/lock
ls -ld /var/spool/lock
works for me, however still three issues:

1. When the shutdown mode is set to "UPS goes on battery" it does not actually initiate shut down until the UPS reaches low battery.
2. No e-mail is sent.
3. How can I make the above permissions fix permanent?

UPS is an APC SmartUPS on a serial connection.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
3. How can I make the above permissions fix permanent?
You can't it's on /var. However I suppose you could write a sh script that runs on start-up.
 

shipkiller

Cadet
Joined
Jun 28, 2012
Messages
1
I found ticket #1292 that seems to resolve the issue for me, but it doesn't last through a reboot.

This:
Code:
chmod 777 /var/spool/lock
ls -ld /var/spool/lock
works for me, however still three issues:

1. When the shutdown mode is set to "UPS goes on battery" it does not actually initiate shut down until the UPS reaches low battery.
2. No e-mail is sent.
3. How can I make the above permissions fix permanent?

UPS is an APC SmartUPS on a serial connection.

sanddrag, I know this is several months since you posted, but did you fix this?

I was able to fix the permissions issue this way and it survives a reboot:

Login as root

MOUNT FILESYSTEM READ/WRITE
mount -uw /

CHANGE THE PERMISSIONS OF THE BASELINE LOCK DIRECTORY
chmod 777 /conf/base/var/spool/lock

MOUNT FILESYSTEM READONLY
mount -wr /

If you already fix your issue, then please disregard..
 
Status
Not open for further replies.
Top