Page 1 of 2

UPS in slave mode and NUT

Posted: Wed Jun 13, 2012 4:17 am
by cosmik
Hello all,

I have a server with Network UPS Tools installed. NUT on this server is operating in netserver mode. I have succesfully added a second machine in NUT slave mode and wanted to have a TS 219P-II operating in slave mode too. Although I initially installed qpkg/nut, I then found out that some basic NUT functionality is present.

So from web config I enabled UPS support and then select "Network UPS slave" as the protocol, specifying the IP address of my server in the lan. After doing so, on the server system I can see that the qnap box indeed tries to connect, but fails establishing a connection:

Code: Select all

Jun 12 22:55:29 server upsd[2605]: Client on 192.168.1.99 logged out
Jun 12 22:55:29 server upsd[2605]: Client on 192.168.1.99 logged out
Jun 12 22:55:32 server upsd[2605]: Connection from 192.168.1.99
Jun 12 22:55:32 server upsd[2605]: Client on 192.168.1.99 logged out
Jun 12 22:55:32 server upsd[2605]: Connection from 192.168.1.99
Jun 12 22:55:32 server upsd[2605]: Client on 192.168.1.99 logged out

From the looks of it, the qnap nut upsmon can not authenticate to the server upsmon (master). My server is on .1.100 and the qnap box is on .1.99. Now, on the server I have configured a user/password in upsd.users. I can't figure out where these should be configured on the qnap box, any ideas?

Again, please note that I am using the embedded NUT client and not the qpkg one...

Re: UPS in slave mode and NUT

Posted: Thu Jun 14, 2012 3:07 pm
by cosmik
(bump) Anyone?

Re: UPS in slave mode and NUT

Posted: Thu Jun 21, 2012 7:31 pm
by cosmik
I was informed that this feature works only when the master is also a qnap, operating in (you guessed it) server mode... So no go here for me.

Re: UPS in slave mode and NUT

Posted: Wed Jul 31, 2013 8:04 pm
by ppo
You should edit /etc/configs/ups/upsmon.conf and write same user/password as on Master.

Re: UPS in slave mode and NUT

Posted: Thu Aug 01, 2013 3:06 am
by fantomas
your upsname must be named qnapups, and user "admin" with password "123456" must be allowed to connect.
The user/password pair can be changed manually on the QNAP. The UPS name can not be changed (at least I was not able to find way how to change it) but you can change the username/password manually in /etc/config/ups/upsmon.conf

Re: UPS in slave mode and NUT

Posted: Thu Aug 01, 2013 1:13 pm
by cosmik
fantomas wrote:your upsname must be named qnapups, and user "admin" with password "123456" must be allowed to connect.
The user/password pair can be changed manually on the QNAP. The UPS name can not be changed (at least I was not able to find way how to change it) but you can change the username/password manually in /etc/config/ups/upsmon.conf

That's awesome, just what I was looking for. Plus, no extra qnap packages are needed! Thanks a zillion mate.

Re: UPS in slave mode and NUT

Posted: Thu Aug 01, 2013 2:25 pm
by ppo
but upsmon doesn't start on qnap...isn't is?

Re: UPS in slave mode and NUT

Posted: Fri Aug 02, 2013 12:19 pm
by cosmik
I believe that it starts, when qnap is configured to run in a slave ups fashion...

Re: UPS in slave mode and NUT

Posted: Wed Sep 04, 2013 6:54 pm
by MrFixit
cosmik,

Please can you confirm if you got this working? I am looking to do something similar (Synology NAS as the master, QNAP as the slave). If this works it will save me buying another UPS :-0

P.S. I can't configure it the other way around as the upsmon.conf on the Synology is owned by root and writable to only by root and not admin - the root account is hidden and I so have no permissions to edit the file.

Re: UPS in slave mode and NUT

Posted: Wed Sep 04, 2013 8:47 pm
by doktornotor
MrFixit wrote:P.S. I can't configure it the other way around as the upsmon.conf on the Synology is owned by root and writable to only by root and not admin - the root account is hidden and I so have no permissions to edit the file.


Uhm... root and admin is the exact same UID=0. Not hidden in any way. As for the rest... takes about one minute to try?! :roll:

Re: UPS in slave mode and NUT

Posted: Wed Sep 04, 2013 10:41 pm
by MrFixit
doktornotor wrote:Uhm... root and admin is the exact same UID=0. Not hidden in any way. As for the rest... takes about one minute to try?! :roll:


Well, I SSH'd in as admin on my Synology NAS but could not edit / change this file. Checking the permission for this file only root has write access.

Re: UPS in slave mode and NUT

Posted: Thu Sep 05, 2013 1:25 am
by doktornotor
MrFixit wrote:Well, I SSH'd in as admin on my Synology NAS but could not edit / change this file


So SSH in as root. (Yes, it does work.)

Re: UPS in slave mode and NUT

Posted: Thu Sep 05, 2013 2:28 am
by MrFixit
OK, but with the same password? I don't know the root one - that's the point. It's a hidden account.

Re: UPS in slave mode and NUT

Posted: Thu Sep 05, 2013 2:30 am
by MrFixit
Yep, that worked! Thanks doktornotor :-)

Re: UPS in slave mode and NUT

Posted: Thu Oct 03, 2013 7:43 am
by rocktheroad
fantomas wrote:your upsname must be named qnapups, and user "admin" with password "123456" must be allowed to connect.
The user/password pair can be changed manually on the QNAP. The UPS name can not be changed (at least I was not able to find way how to change it) but you can change the username/password manually in /etc/config/ups/upsmon.conf


Thanks for this tip... upsname indeed must be qnapups, even if you manually edit in something else, like I was trying....

But now I am ended with problem because Netgear ReadyNAS wont connect to qnapups, just to one named ups... I really need to figure out how to change name back to ups and to work with QNAP