UPS headaches

Status
Not open for further replies.

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
Trying to get FreeNAS talking to my UPS, but the service won't start. When I edit the settings for the service I get the following lines appearing in the console view in the footer

Sep 22 23:08:09 ChassNAS notifier: nut not running? (check /var/db/nut/upsd.pid).
Sep 22 23:08:09 ChassNAS notifier: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
Sep 22 23:08:09 ChassNAS ugen0.4: <INNO TECH> at usbus0 (disconnected)
Sep 22 23:08:09 ChassNAS notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
Sep 22 23:08:09 ChassNAS notifier: Will not 'restart' nut because nut_enable is NO.
Sep 22 23:08:09 ChassNAS notifier: Will not 'restart' nut_upsmon because nut_upsmon_enable is NO.
Sep 22 23:08:09 ChassNAS notifier: Will not 'restart' nut_upslog because nut_upslog_enable is NO.

I'm still new to this and would appreciate a little help in what I need to type to check the files mentioned and how to edit the enable flags to YES.

Thanks
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Is your UPS service enabled in the GUI?

upload_2015-9-22_19-10-35.png
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
Thanks, but no because it won't enable! I've tried to turn it with various different settings, with the UPS plugged into the USB and without. It gives a busy symbol and then goes back to being off. I noticed the lines in the console I posted before whenever I saved new settings in the UPS service setting window (the little wrench icon). The console gives the following when I actually try to turn on the service:

Sep 22 23:25:17 ChassNAS notifier: Fatal error: unusable configuration
Sep 22 23:25:17 ChassNAS notifier: Network UPS Tools - Generic Q* USB/Serial driver 0.17 (2.7.3)
Sep 22 23:25:17 ChassNAS notifier: USB communication driver 0.32
Sep 22 23:25:17 ChassNAS notifier:
Sep 22 23:25:17 ChassNAS notifier: Unable to open /dev/ugen0.4: No such file or directory
Sep 22 23:25:17 ChassNAS notifier:
Sep 22 23:25:17 ChassNAS notifier: Things to try:
Sep 22 23:25:17 ChassNAS notifier:
Sep 22 23:25:17 ChassNAS notifier: - Check 'port=' in ups.conf
Sep 22 23:25:17 ChassNAS notifier:
Sep 22 23:25:17 ChassNAS notifier: - Check owner/permissions of all parts of path
Sep 22 23:25:17 ChassNAS notifier:
Sep 22 23:25:17 ChassNAS notifier: Driver failed to start (exit status=1)
Sep 22 23:25:17 ChassNAS notifier: Network UPS Tools - UPS driver controller 2.7.3
Sep 22 23:25:17 ChassNAS root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Sep 22 23:25:17 ChassNAS notifier: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Sep 22 23:25:18 ChassNAS notifier: Starting nut_upsmon.
Sep 22 23:25:18 ChassNAS notifier: kill: No such process
Sep 22 23:25:18 ChassNAS notifier: UPS: ups (master) (power value 1)
Sep 22 23:25:18 ChassNAS notifier: Using power down flag file /etc/nokillpower
Sep 22 23:25:18 ChassNAS upsmon[49306]: UPS [ups]: connect failed: Connection failure: Connection refused
Sep 22 23:25:18 ChassNAS upsmon[49306]: Communications with UPS ups lost
Sep 22 23:25:18 ChassNAS notifier: Starting nut_upslog.
Sep 22 23:25:18 ChassNAS notifier: Warning: initial connect failed: Connection failure: Connection refused
Sep 22 23:25:18 ChassNAS ugen0.4: <INNO TECH> at usbus0
Sep 22 23:25:19 ChassNAS notifier: Stopping nut_upslog.
Sep 22 23:25:19 ChassNAS notifier: Waiting for PIDS: 49326.
Sep 22 23:25:20 ChassNAS notifier: Stopping nut_upsmon.

Thanks
 

Mega Man

Explorer
Joined
Jun 29, 2015
Messages
55
i just fixed this kind of issue on my freenas,
did it ever work or is this the first time you have tried to set it up ?
what i have found ---
verify you have the correct port

if you dont know goto system >advanced > Show console messages in the footer ( check it )

then unplug the usb ( assuming you are using it ) and plug it back in it should tell you the port at that point

are you using the correct driver ! very important !~

regardless to the answer to the first question i asked this is where i would start !~
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
The issue is, I can't even start the service!! So I can't even get as far as checking to see if I have the correct driver selected.

All the stuff in my previous posts is the output from the console, either after trying to change the configuration of the UPS service, or after trying to turn it on.

But to answer your questions Mega Man, it's the first time I've tried to set it up. I have the correct port, but surely this doesn't become relevant until I can actually get the service to start up.
Thanks
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You don't need to start the service to select the driver. Just click the wrench to make the config changes.

If you don't have everything configured correctly, the service won't necessarily start. I think you're trying to do it the other way around. Configure it correctly first, then try to start the service.
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
OK, I didn't realise that the service wouldn't even start with the wrong driver selected. I've also tried starting the service without a UPS connected just to see - but tis didn't work either. I have the best guess driver selected, it came with viewpoer software, so I had the various models for viewpower USB option selected which was suggested on the NUT compatibility page

I'll keep trying other driver options, see if that gets me anywhere.

Thanks for the help so far
 
D

dlavigne

Guest
Sep 22 23:25:17 ChassNAS notifier: Unable to open /dev/ugen0.4: No such file or directory

This line indicates that it's not seeing anything on that port.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I you watch the footer, when you plug in a USB device it will say what plug "a new device" was found on. That will tell you what port to choose.
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
Thanks, I have looked at the footer, and it says ugen0.4 when I plug something in. My mobo only has 3 USB ports, so I have two free. But messages in the console footer say ugen0.4 WHICHEVER port I plug it into!!!

Have tried all the other options in the drop down list, which are 0.1 through 0.6, but I get the same results, the service still won't start. Going starting to type in other numbers starting at 1.1 in the port selection. I don't know what else to try.

It seems strange that it reports 0.4 for both ports, one is directly on the mobo, the other is on a header.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
But messages in the console footer say ugen0.4 WHICHEVER port I plug it into!!!
OK, now that, is officially weird.

In fact, the mechanism by which this would happen, is hard to even fathom could be happening. This is nearly impossible.

Are you absolutely certain that it reports 0.4 no matter what port you plug it into? Nothing is virtualized, you haven't jacked around with any BIOS settings pertaining to the USB ports?

You could try a "service devd restart" from the GUI just to make sure there isn't some insanity going on.
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
I didn't think I'd changed anything, other than setting everything to Legacy when encountering the mountroot issue. Just went back in to BIOS and chose to reset to default settings, then changed boot settings to Legacy again.

No I DO get two different numbers for the available USB pots. Either ugen0.7 or ugen0.3.

So that's a result!

However, UPS service still wont start with either port connected. Would this still be the behaviour with the wrong driver?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Would this still be the behaviour with the wrong driver?
Yes. You must select the correct driver, or the service will not start. If you tell me the make/model of the UPS, I can tell you what driver is likely to work.
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
Great, I managed to get the service to start. I went through all the Various UPS options in the list, and it started up with "Various ups 2 Various Innova T (USB ID 06da:0201) (blazer_ser or blazer_usb)".

In fact it will start with any of the three options that have "(blazer_ser or blazer_usb)" as the driver selection. It wouldn't start up with any of the options that have "blazer_usb" as the driver type.

It's not working though. I am getting UPS report email every 5 mins saying NOCOMM - ups

My UPS is made by Power Inspired. It was supplied with the ViewPower drivers, - they worked on my Mac. Looking at the NUT compatibility list, the suggested driver to try first is the "nutdrv_qx" which is where I started, unsuccesfully. If you have a suggestion of what to try I'd really appreciate it, otherwise I guess it's the long process of trying every one in the list - could take weeks!

Thanks
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
the long process of trying every one in the list
NO. As far as I know, there are a small number of drivers, and if you click "UPS Brand X (drivername)" vs "UPS Brand Y (drivername)", then as long as drivername is the same, you are getting precisely the same protocol served out. So there is literally no purpose to trying all of them, just try >1 of each with each possible driver. The mega-list is probably prophylactic in the sense that if they don't do that, then every jackass in the world will be emailing them asking them which driver their UPS uses.
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
I've found the driver that will let me turn the service on but I'm not getting any luck with it. Console messages:

Sep 26 21:22:41 ChassNAS ugen0.3: <INNO TECH> at usbus0 (disconnected)
Sep 26 21:22:42 ChassNAS upsmon[39287]: Poll UPS [INNOTECH] failed - Driver not connected
Sep 26 21:22:43 ChassNAS ugen0.3: <INNO TECH> at usbus0
Sep 26 21:22:47 ChassNAS upsmon[39287]: Poll UPS [INNOTECH] failed - Driver not connected
Sep 26 21:22:52 ChassNAS upsmon[39287]: Poll UPS [INNOTECH] failed - Driver not connected

With the UPS service switched off I get console messages every 5sec or so saying connected, then disconnected at ugen0.3. I had assumed this was because the device was trying to communicate with a driver. This still happens with the service turned on, but withe the additional lines above about driver not connected. I can't run upsc - it reports driver not connected also.

What else is there I can do as the only settings seem to be port & driver selection.

Thanks
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
With the UPS service switched off, you shouldn't get a damn thing.

So something is up here.

So, please go to the command line at a time when you believe the service as off, and type this, and see if you get something similar to mine. Please post the results:

Code:
[root@giskard] ~# ps -auxg | grep ups
uucp  2538  0.0  0.0  18392  2408 ??  Ss  Wed09AM  0:29.66 /usr/local/libexec/nut/usbhid-ups -a ups
uucp  2540  0.0  0.0  30640  1792 ??  Ss  Wed09AM  0:06.61 /usr/local/sbin/upsd
uucp  2543  0.0  0.0  18356  1812 ??  Is  Wed09AM  0:00.62 /usr/local/bin/upslog -s ups -l /var/log/ups.log -i 300
root  2546  0.0  0.0  18360  1788 ??  Is  Wed09AM  0:00.00 /usr/local/sbin/upsmon localhost
uucp  2548  0.0  0.0  18360  1768 ??  S  Wed09AM  0:05.40 /usr/local/sbin/upsmon localhost
root  24555  0.0  0.0  16284  1972  0  S+  6:13PM  0:00.00 grep ups
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
Thanks,

I get nothing.

Code:
[root@ChassNAS] ~# ps -auxg | grep ups
[root@ChassNAS] ~#
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
OK, you're getting nothing, *AND*, you are, or are not, getting emails from the UPS service?
 

Limitedheadroom

Dabbler
Joined
Aug 21, 2015
Messages
34
I was getting emails from the service when it was on, until I disabled that option, it was too many.

I just tried the same command with the service switched on and still get nothing.
 
Status
Not open for further replies.
Top