UPS in slave mode and NUT

Printers, HDDs, USB/eSATA drives, 3rd-party programs
cosmik
Starting out
Posts: 21
Joined: Wed Jun 13, 2012 4:07 am

UPS in slave mode and NUT

Post 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...
cosmik
Starting out
Posts: 21
Joined: Wed Jun 13, 2012 4:07 am

Re: UPS in slave mode and NUT

Post by cosmik »

(bump) Anyone?
cosmik
Starting out
Posts: 21
Joined: Wed Jun 13, 2012 4:07 am

Re: UPS in slave mode and NUT

Post 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.
ppo
Starting out
Posts: 27
Joined: Wed Oct 24, 2012 8:06 pm

Re: UPS in slave mode and NUT

Post by ppo »

You should edit /etc/configs/ups/upsmon.conf and write same user/password as on Master.
fantomas
Experience counts
Posts: 1560
Joined: Mon Feb 07, 2011 5:40 am
Location: Bratislava, Slovakia
Contact:

Re: UPS in slave mode and NUT

Post 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
experience with administration of UN*X (mostly linux) and applications on internet servers since 1994...
cosmik
Starting out
Posts: 21
Joined: Wed Jun 13, 2012 4:07 am

Re: UPS in slave mode and NUT

Post 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.
ppo
Starting out
Posts: 27
Joined: Wed Oct 24, 2012 8:06 pm

Re: UPS in slave mode and NUT

Post by ppo »

but upsmon doesn't start on qnap...isn't is?
cosmik
Starting out
Posts: 21
Joined: Wed Jun 13, 2012 4:07 am

Re: UPS in slave mode and NUT

Post by cosmik »

I believe that it starts, when qnap is configured to run in a slave ups fashion...
User avatar
MrFixit
Easy as a breeze
Posts: 274
Joined: Wed Aug 27, 2008 4:53 pm

Re: UPS in slave mode and NUT

Post 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.
NAS: TS-509 Pro (replaced MB)
Firmware: QTS 4.1.1 Build 1101
Drives: 5 x Hitachi 5K3000 2TB drives (RAID 5)
Memory: 4GB
Processor: E7600 (awaiting installation :-))
User avatar
doktornotor
Ask me anything
Posts: 7472
Joined: Tue Apr 24, 2012 5:44 am

Re: UPS in slave mode and NUT

Post 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:
I'm gone from this forum till QNAP stop wasting volunteers' time. Get help from QNAP helpdesk instead.
Warning: offensive signature and materials damaging QNAP reputation follow:
QNAP's FW security issues
QNAP's hardware compatibility list madness
QNAP's new logo competition
Dear QNAP, kindly fire your clueless incompetent forum "admin" And while at it, don't forget the webmaster!
User avatar
MrFixit
Easy as a breeze
Posts: 274
Joined: Wed Aug 27, 2008 4:53 pm

Re: UPS in slave mode and NUT

Post 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.
NAS: TS-509 Pro (replaced MB)
Firmware: QTS 4.1.1 Build 1101
Drives: 5 x Hitachi 5K3000 2TB drives (RAID 5)
Memory: 4GB
Processor: E7600 (awaiting installation :-))
User avatar
doktornotor
Ask me anything
Posts: 7472
Joined: Tue Apr 24, 2012 5:44 am

Re: UPS in slave mode and NUT

Post 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.)
I'm gone from this forum till QNAP stop wasting volunteers' time. Get help from QNAP helpdesk instead.
Warning: offensive signature and materials damaging QNAP reputation follow:
QNAP's FW security issues
QNAP's hardware compatibility list madness
QNAP's new logo competition
Dear QNAP, kindly fire your clueless incompetent forum "admin" And while at it, don't forget the webmaster!
User avatar
MrFixit
Easy as a breeze
Posts: 274
Joined: Wed Aug 27, 2008 4:53 pm

Re: UPS in slave mode and NUT

Post by MrFixit »

OK, but with the same password? I don't know the root one - that's the point. It's a hidden account.
NAS: TS-509 Pro (replaced MB)
Firmware: QTS 4.1.1 Build 1101
Drives: 5 x Hitachi 5K3000 2TB drives (RAID 5)
Memory: 4GB
Processor: E7600 (awaiting installation :-))
User avatar
MrFixit
Easy as a breeze
Posts: 274
Joined: Wed Aug 27, 2008 4:53 pm

Re: UPS in slave mode and NUT

Post by MrFixit »

Yep, that worked! Thanks doktornotor :-)
NAS: TS-509 Pro (replaced MB)
Firmware: QTS 4.1.1 Build 1101
Drives: 5 x Hitachi 5K3000 2TB drives (RAID 5)
Memory: 4GB
Processor: E7600 (awaiting installation :-))
rocktheroad
New here
Posts: 8
Joined: Mon Sep 09, 2013 7:42 pm

Re: UPS in slave mode and NUT

Post 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
Locked

Return to “Hardware & Software Compatibility”