Cannot setup TrueNAS as a NUT Server

SDimou

Cadet
Joined
Sep 16, 2020
Messages
8
Hello everyone! I am pretty new at the TrueNAS world so I have a noobie question. I have attached a UPS to my HP Proliant Microserver and I am trying to setup the NUT Server but I cannot seem to make it work... I followed this guide to the letter but nothing works so I guess I'm missing some key steps.

1) At first, when I run the "nut-scanner -U" command it doesn't recognize the "-U" parameter and when I run the command without it I get the "USB search disabled" error.

nut-scanner.jpg

2) After I finish the setup of the UPS service, when I run the "upsc ups@localhost" command I get the "Connection failure: Connection refused" error.

upsc ups.jpg

3) After some search on the connection error message some people said that it might be the file permissions of the "/etc/nut" folder but I don't seem to have folder either... So I am definitely missing something important...

cd nut.jpg

So I need your help. Is there a more complete guide the the one I used? How do I enable the USB device search? Do I have to create a jail before? How is the nut folder created? Because I am sure I have enabled the UPS service.

ups service.jpg
Thank you in advance for your help!!
 

SDimou

Cadet
Joined
Sep 16, 2020
Messages
8
Update on my problem. I opened my console and it's flooded with "Connection refused" messages...

console.jpg

Still no "nut" folder though... If it's a permissions problem I don't know where to look...
 

SDimou

Cadet
Joined
Sep 16, 2020
Messages
8
That is the name I gave my NAS Server when I set it up. Is there a problem with the name? Is it reserved? Is there a conflict somewhere?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
What is the make/model of your UPS?

Have you tested the USB cable?

Have you tested the USB port on your HP Proliant Microserver?

Did you look in the tabulation at https://networkupstools.org/stable-hcl.html, find your ups or one similar by the same manufacturer, use the identified driver name in the input when configuring the ups service?

Did you find the usb port: look on the console menu at the bottom of the GUI, and then plug in the USB to the UPS and then unplug it, etc. Immediately, you should see devd throw a notice up on the console that a device has been plugged in, together with this port identifier (e.g., ugen0.4 or whatever) ?

Have you done anything to try to diagnose the problem? If so, please describe in detail?

EDIT: You mention a folder: Such folder should be at /etc/local/nut:

1674220759382.png


EDIT2: What version of TrueNAS are you using? Please advise that also.
 
Last edited:

SDimou

Cadet
Joined
Sep 16, 2020
Messages
8

What is the make/model of your UPS?

Have you tested the USB cable?

Have you tested the USB port on your HP Proliant Microserver?

Did you look in the tabulation at https://networkupstools.org/stable-hcl.html, find your ups or one similar by the same manufacturer, use the identified driver name in the input when configuring the ups service?

Did you find the usb port: look on the console menu at the bottom of the GUI, and then plug in the USB to the UPS and then unplug it, etc. Immediately, you should see devd throw a notice up on the console that a device has been plugged in, together with this port identifier (e.g., ugen0.4 or whatever) ?

Have you done anything to try to diagnose the problem? If so, please describe in detail?

EDIT: You mention a folder: Such folder should be at /etc/local/nut:

View attachment 62685

EDIT2: What version of TrueNAS are you using? Please advise that also.
I have the Powerwalker (Line Interactive) Basic VI 800 STL. The STL model is not specifically mentioned at the NUT site but I'm guessing that the "blazer_ser" or the " blazer_usb" driver should work.

When I unplug and plug back the usb cable I get the message in the following picture
 

SDimou

Cadet
Joined
Sep 16, 2020
Messages
8
UPS USB.png
Which means I have usb connection.

I have found the nut folder but the owner group is "uucp"
Nut Folder.jpg
who should be the owner?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I'm confused.. according to the how-to you said you followed you are using the usbhid-ups driver, but now you say you use
"blazer_ser" or the " blazer_usb" driver
.. so can you pretty please show us the configuration page for UPS in TrueNAS (I'm assuming you're machine hostnamed FreeNAS is some flavor of TrueNAS)

Looking at https://networkupstools.org/stable-hcl.html, your UPS do not have stellar support..
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
i have a powerwalker vi 2200 and the driver specified in the list was the blazer_ser or blazer_usb and that did not work, i was successful with the usbhid-usb driver
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
I was also stuck for quiet a while, but since i was on scale and not core i had no problems to use nut-scanner -U to identify which driver my ups required. The whole process took like 5-10 mins max after finding the correct driver.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
on scale and not core i had no problems to use nut-scanner -U
Ah - I wondered where "nut-scanner" came from in connection with TrueNAS - thanks for that!
 
Last edited:
Joined
Mar 16, 2017
Messages
7
Hello everyone! I am pretty new at the TrueNAS world so I have a noobie question. I have attached a UPS to my HP Proliant Microserver and I am trying to setup the NUT Server but I cannot seem to make it work... I followed this guide to the letter but nothing works so I guess I'm missing some key steps.

1) At first, when I run the "nut-scanner -U" command it doesn't recognize the "-U" parameter and when I run the command without it I get the "USB search disabled" error.

Hi,

nut-scanner complains about missing USB library.I suspect this is the root cause of your issue.

I face the same missing USB issue at my installation: TrueNAS CORE 13-U3.1, UPS Legrand Keor. The USB gets properly detected:

Code:
nas# usbconfig
ugen0.1: <Intel XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <ASRock ASM107x> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.3: <vendor 0x05e3 USB2.0 Hub> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.4: <Legrand KEOR PDU 800> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.5: <ASRock ASM107x> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (2mA)
ugen0.6: <SanDisk Ultra Fit> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA)


Yet nut-scanner fails to load USB library:

Code:
nas# nut-scanner -U
USB library not found. USB search disabled.
nut-scanner : detecting available power devices.


This is my /usr/local/etc/nut/ups.conf:
Code:
[ups]
    #driver = nutdrv_qx
    driver = usbhid-ups
    port = auto
    desc = 


This error seems to come from tools/nut-scanner/scan_usb.c.

Any idea how to fix this?

Thanks in advance for any suggestions or help.
 

sozotech

Dabbler
Joined
Apr 8, 2020
Messages
10
I am running TrueNAS core 13.0-U3.1 and I am getting the same error.

nut-scanner
USB library not found. USB search disabled.
No start IP, skipping SNMP

But when I run "upsc ups@localhost" it shows the UPS data.

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2022/10/22
battery.runtime: 6828
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS RS 1500MS2
device.serial: 0B2243N11111
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ugen0.2
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: medium
input.transfer.high: 144
input.transfer.low: 88
input.voltage: 120.0
input.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 969.e3 .D
ups.firmware.aux: e3
ups.load: 6
ups.mfr: American Power Conversion
ups.mfr.date: 2022/10/22
ups.model: Back-UPS RS 1500MS2
ups.productid: 0002
ups.realpower.nomina

I have the proper driver and port selected in the UPS service configuration. Curious what I might be missing?
 

lknite

Cadet
Joined
Jun 19, 2022
Messages
8
Similar error. Updated to TrueNAS-13.0-U3.1 because nut-scanner didn't exist and no matter what changes I made to the NUT service, it wouldn't let me save the changes.

After updating to 13 I now have the nut-scanner utility, but as above it doesn't find the USB device:
Code:
root@truenas[~]# nut-scanner
USB library not found. USB search disabled.
No start IP, skipping SNMP
No start IP, skipping NUT bus (old connect method)
root@truenas[~]# usbconfig
ugen0.1: <Intel XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <American Power Conversion Back-UPS NS 1500M2 FW:957.e4 .D USB FW:e4> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (2mA)


and, still unable to modify the NUT configuration ...

As this is the master, I'll need to do some configurations to safely shutdown clients before shutting down this server. I've got about 20 minutes on my backup power supply, so the whole 15 seconds is a bit extreme. Very odd this inability to edit the ups service configuration has persisted between 12 and 13.

--- Update ---
I hadn't selected a driver on the UPS configuration page, cause I didn't see a good match, but after selecting an entry that looked close, I then got a list of usb devices and selected the one from the list that I saw back when I ran 'usbconfig' via the shell. After this I was able to now use the 'Save' button on the UPS config page.

Seems the gui could have somehow let me know that a 'driver' and 'port or hostname' was required to use the 'Save' button... oh well. In anycase, Things are looking good now!
 
Last edited:
Top