UPS is not configurable on FreeNAS 11.3 (solved!)

D'Rain

Dabbler
Joined
Feb 15, 2020
Messages
13
Hi, appeal to the community because I did not find information in Google.

Recently installed FreeNAS 11.3-RELEASE-p5 I decided to connect the UPS.
I have an APC BackUPS es700. When I try to configure over GUI i have error "This field is required" , in system messages
Code:
freenas upsmon[1165]: UPS [ups@localhost:3493]: connect failed: Connection failure: Connection refused
. If configure "ups.conf"
Code:
[ups]
        driver = usbhid-ups
        port = auto
        desc = apc_es700

then it working, but until the first reboot, after which the config becomes empty.

Questions:
Why does not work configure in GUI?
If it’s impossible to configure in GUI, how to make the config not clear?
Thanks!
 
Last edited:

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
I believe I may have experienced this also. In frustration I gave up, installed NUT on my pfsense box and slaved the FreeNAS installation from it. If I get the opportunity I will make some testing with your finding in mind.
 

D'Rain

Dabbler
Joined
Feb 15, 2020
Messages
13
web_conf.PNG


This error does not allow to save the config via the WEB, in any logs I could not find the details of this error. And in the system log the errors are the same if you enable the UPS service without configuring the config.
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
in any logs I could not find the details of this error

ummm...strange.
you should check debug.log and middlewared.log

debug:
Feb 14 10:47:44 bestia uwsgi: [api.utils:12] middlewared.client.client.ValidationErrors: [EINVAL] ups_update.driver: This field is required Feb 14 10:49:28 bestia uwsgi: [api.utils:12] middlewared.client.client.ValidationErrors: [EINVAL] ups_update.driver: This field is required

middlewared:
[2020/02/13 20:13:17] (DEBUG) middlewared.render_body():33 - UPSMON: monpwd field empty, upsmon will fail to start.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
View attachment 35895

This error does not allow to save the config via the WEB, in any logs I could not find the details of this error. And in the system log the errors are the same if you enable the UPS service without configuring the config.
Put in a real device name not auto? Didn't change how it works.
 

3nm1

Cadet
Joined
Jul 11, 2019
Messages
7
Which browser are you using? i tried first with safari on a iMac, and got the same error, but it worked in firefox on my linux machine.
 

D'Rain

Dabbler
Joined
Feb 15, 2020
Messages
13
Which browser are you using? i tried first with safari on a iMac, and got the same error, but it worked in firefox on my linux machine.
Oh, I'm stupid. How many tried to solve the problem, but did not think of changing the browser! In IE and firefox, everything works fine. The problem was in chrome on Win10.
Thanks! The problem is solved, now everything works!
 

digitalo_

Cadet
Joined
Feb 23, 2020
Messages
4
Switching browsers did not work for me, tried with chrome and firefox.
Running 11.3 as well and impossible to get the ups setting saved.
 

3nm1

Cadet
Joined
Jul 11, 2019
Messages
7

digitalo_

Cadet
Joined
Feb 23, 2020
Messages
4
That doesn't work either unfortunately. I even tried IE out of total desperation but I can't get it to save.
Is there a workaround? Like editing a config file?
 

digitalo_

Cadet
Joined
Feb 23, 2020
Messages
4
Just did the update, still the same problem.
1583346527564.png

On system where is was already configured before the update there is no issue.
 

zamana

Contributor
Joined
Jun 4, 2017
Messages
163
Just did the update, still the same problem.
View attachment 36256
On system where is was already configured before the update there is no issue.

My system was configured and working before this latest update, but now nothing seems to get it back.

Unfortunately I have that crappy "APC ups 2 Back-UPS 1200BR (Microsol) (solis)" that doesn't help too.

Before the latest update, the working USB port was /dev/cuaU0, but now it seems to be /dev/ugen0.2 (at least that's what I got from dmesg...).

Regards.
 

Mugga

Dabbler
Joined
Feb 19, 2020
Messages
25
Got the same issue. Tried firefox, chrome and edge and also incognito mode. This 11.3 build is (sry to say) shit!

First the domain join issue, then the timestamp issue for samba shares and now this! Should have better sticked to 11.2, I got so much wasted time this week, with installing our new freenas system.
 

zamana

Contributor
Joined
Jun 4, 2017
Messages
163
After choosing the UPS driver and coming back to the configuration page, there's a "$" at the driver's description:

1584473484024.png


Is this an issue?

Thanks.
Regards.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
After choosing the UPS driver and coming back to the configuration page, there's a "$" at the driver's description:

View attachment 36579

Is this an issue?

Thanks.
Regards.
You should check to see what's in the database. Use sqlite3 /data/freenas-v1.db or something like that I forget the filename. Then list the tables but you probably want one called services_ups. You should be able to select * from services_ups;

This will show you the value that's actually stored. I bet there is some kind of encoding error some place that deserves a bug.
 

zamana

Contributor
Joined
Jun 4, 2017
Messages
163
You should check to see what's in the database. Use sqlite3 /data/freenas-v1.db or something like that I forget the filename. Then list the tables but you probably want one called services_ups. You should be able to select * from services_ups;

This will show you the value that's actually stored. I bet there is some kind of encoding error some place that deserves a bug.

Hi!

Thanks for the precise and detailed instructions. Here is the output of the select command (personal info redacted):

Code:
sqlite> select * from services_ups;
1|master|ups||3493|solis$Back-UPS 1200BR (Microsol)|auto||||lowbatt|30|upsmon|<HASHED PASSWORD>||1|1|e-mail@provider.com|UPS report generated by %h|0||15|


The "$" is there...

Anyway, the config files seems fine:

ups.conf
Code:
root@freenas[/usr/local/etc/nut]# cat ups.conf
[ups]
    driver = solis
    port = auto
    desc =


upsd.conf
Code:
root@freenas[/usr/local/etc/nut]# cat upsd.conf
LISTEN 0.0.0.0 3493
LISTEN ::0 3493
 
Top