how to setup configure UPS password

Status
Not open for further replies.

human

Dabbler
Joined
May 25, 2014
Messages
10
Hello,
this is my first post
I searched for previous topics first, didn't find any that answered these questions:

I'm running FreeNAS-9.2.1.5 on a current generation computer. I would like to ask if anyone can provide information on how to configure or setup a UPS in Freenas. I did find the user guide to be helpful in that it provided a procedure for determining the correct Port. Hopefully in the future this information can be provided in the GUI directly. Most everything else seems obvious or is explained in the user guide or is not explained but doesn't seem like something that I would need to achieve basic functionality. The one question that has me stuck:

It's got a "Monitor User:" of upsmon
and it's got a "Monitor Password:" of fixmepass

Do I need to create a user with this username and password? If so, how should the various "Add User" options be configured? It just seems odd and counter-intuitive that I should have to create a user for a function that many people would be expected to use. I'm worried that due to not knowing what I'm doing I'll create a super-user that someone can use to hack into my system.

Thanks,
-Elliot
 

human

Dabbler
Joined
May 25, 2014
Messages
10
jibber jabber

May 25 17:19:01 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).
May 25 17:19:01 freenas notifier: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
May 25 17:19:01 freenas notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
May 25 17:19:01 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).
May 25 17:19:26 freenas notifier: Network UPS Tools - Generic HID driver 0.38 (2.7.1)
May 25 17:19:26 freenas notifier: USB communication driver 0.32
May 25 17:19:26 freenas notifier: No matching HID UPS found
May 25 17:19:26 freenas notifier: Driver failed to start (exit status=1)
May 25 17:19:26 freenas notifier: Network UPS Tools - UPS driver controller 2.7.1
May 25 17:19:26 freenas root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
May 25 17:19:26 freenas notifier: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
May 25 17:19:26 freenas notifier: nut_upsmon not running? (check /var/db/nut/upsmon.pid).
May 25 17:19:26 freenas notifier: Starting nut_upsmon.
May 25 17:19:26 freenas notifier: kill: No such process
May 25 17:19:26 freenas notifier: UPS: ups (master) (power value 1)
May 25 17:19:26 freenas upsmon[9625]: UPS [ups]: connect failed: Connection failure: Connection refused
May 25 17:19:26 freenas upsmon[9625]: Communications with UPS ups lost
May 25 17:19:26 freenas notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
May 25 17:19:26 freenas notifier: Starting nut_upslog.
May 25 17:19:26 freenas notifier: Warning: initial connect failed: Connection failure: Connection refused
May 25 17:19:27 freenas notifier: Stopping nut_upslog.
May 25 17:19:27 freenas notifier: Waiting for PIDS: 9653.
May 25 17:19:27 freenas notifier: Stopping nut_upsmon.
May 25 17:19:51 freenas upsmon[9624]: upsmon parent: read
May 25 17:19:51 freenas notifier: Waiting for PIDS: 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625, 9625.
May 25 17:19:51 freenas notifier: nut not running? (check /var/db/nut/upsd.pid).
 

human

Dabbler
Joined
May 25, 2014
Messages
10
Warning: initial connect failed: Connection failure: Connection refused
.. so.. something is trying to connect to something else... it's not clear from this log who or what is unable to connect to who or what..
 

FloridaDan

Dabbler
Joined
Apr 4, 2014
Messages
21
So in my admittedly very limited experience, but having just seen something similar, the short answer is "no, you don't have to create a upsmon user in FreeNAS".

I followed this bit of the manual: http://doc.freenas.org/index.php/UPS

And did a bit of reading about NUT in FreeBSD. Apparently, NUT does it's own "authentication". It will work with the default password, but such things should always be changed.

Why I recognize your output is that I "fat moused" my own setup and chose the wrong port. When I tried to start the UPS service, it complained in the same way about not finding a matching UPS and refusing to connect. When I chose the right port, the service started right up with no complaints or issues.

Assuming you're using a UPS with a way of communicating with the OS (you didn't give details, but I mean USB connectivity, though I think serial is also supposed to work), it sounds like at least one of the following:

  • The wrong port is configured.
  • The wrong driver is configured.
  • Something isn't plugged in.
Lastly, FWIW, when I tried this in my sandbox VM, I never could get the UPS to pass through to the VM right, so I wound up having to do it "for real" on my actual server.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
1. When using USB or usbhid-ups drivers the port doesn't matter. I fill it in with 'auto'.
2. VMware USB pass through works you need to go to the VM settings and connect the USB device.
3. Upsmon pass is used if you are doing remote monitoring of an ups connected to a different server.
 

123Alpha

Dabbler
Joined
Mar 6, 2015
Messages
12
My problem is a little different. I have the UPS service configured in FreeNAS as master, and that is OK, but I cannot connect to it from another computer running Ubuntu with NUT Monitor. I enter the IP of my FreeNAS system in host and port 3493, upsmon and its password, but get errorno 111 Connection refused. I also tried {identifier}@{FreeNAS ISP} and "{UPS Driver}"@{UPS ISP} with same results. Since the UPS is connected OK to the FreeNAS box by USB, and it seems to be working OK, and plugged in, the driver must be OK. The only things I can think of are that the port is wrong (but what should it be?} or that I am entering host incorrectly. I have been unable to find anything to tell me what I am doing wrong. I find lots of postings about how problems connecting to the ups by usb, or connecting the FreeNAS to another computer to which the UPS is connected, but not problems connecting to the FreeNAS UPS Service running as Master from another computer using NUT client. Thanks for any help.[/QUOTE]
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Did you check the remote box in the UPS setup page?
 

123Alpha

Dabbler
Joined
Mar 6, 2015
Messages
12
No it was not checked. After checking it and restarting NUT Monitor, I can now see the status of the UPS. I cannot find any documentation that tells me how to use the GUI "NUT Monitor" (nut-monitor) to shutdown my computer in the event of a power failure, or even if this is possible with it. I would prefer to do this using a GUI rather than editing the various nut related files if possible.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Nut just does that. In the gui there are settings that describe when to shut down. Have you tried reading the freenas docs or even looked at the gui settings?
 

123Alpha

Dabbler
Joined
Mar 6, 2015
Messages
12
Yes, I have read the FreeNAS documents which tell me how to set up the UPS Service (I originally
misunderstood the Remote Monitor box -- I interpreted it to mean FreeNAS would be able to monitor UPS on a remote machine, not that it should be checked if I wanted to monitor the UPS connected to FreeNAS from a remote computer). It is set up to shutdown the FreeNAS system a few minutes after the UPS goes to battery power.
I now have installed NUT on my LINUX computer, including nut-monitor, which is a GUI that appears to be able to monitor and control the UPS connected to my FreeNAS box. In the NUT Monitor GUI, there are two main tabs: Device Status and Device Vars. Device Status just shows me the basic information about the UPS (that it is online, the make and model, the level of battery charge, the load and the remaining time if the power failed with the current load; Device Vars shows me what I would see if I run uspc from a terminal. At the bottom of the Device Status is a pull-down menu of a bunch of Device Commands -- these all appear to be commands which I could issue to the UPS, nothing to tell my Ubuntu computer when to shut down. In Windows, there is a GUI of sorts: for setting what happens, it really just brings up Notepad with the upsmon.conf file in which you can change the various items to control the Windows computer. In LINUX, I when NUT is installed, a dummy /etc/nut/upsmon.conf file is created. As superuser or root, I can edit this using vi, gedit or any other text editor to set up the variables. I have not been able to find a GUI like the one in FreeNAS for LINUX that would be a little easier and possibly safer to use.
 
Last edited:

123Alpha

Dabbler
Joined
Mar 6, 2015
Messages
12
Yes, I have read the FreeNAS documents which tell me how to set up the UPS Service (I originally
misunderstood the Remote Monitor box -- I interpreted it to mean FreeNAS would be able to monitor UPS on a remote machine, not that it should be checked if I wanted to monitor the UPS connected to FreeNAS from a remote computer). It is set up to shutdown the FreeNAS system a few minutes after the UPS goes to battery power.

OOPS! It just dawned upon me that once my misunderstanding of the purpose of "Remote Monitor" was cleared up, and I checked that box, the rest of my issues have nothing to do with FreeNAS, which is working perfectly!
I have left the rest of my previous post there in case someone can point me in the right direction, even though I now realize that getting things set up on my other computers to have them shut down upon a power failure really has nothing at all to do with FreeNAS. I apologize for any confusion.
 
Status
Not open for further replies.
Top