<SOLVED> NUT Can't connect to UPS got [ERR ACCESS-DENIED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bananabob
Level 3
Level 3
Posts: 146
Joined: Tue Feb 07, 2012 11:05 pm

<SOLVED> NUT Can't connect to UPS got [ERR ACCESS-DENIED]

Post by bananabob »

I am trying to use NUT to control my UPS. When it starts up it gives the following errors.
Mar 17 15:24:34 thorium upsd[3386]: listening on 127.0.0.1 port 3493
Mar 17 15:24:34 thorium upsd[3386]: Can't connect to UPS [ups] (apcsmart-ups): No such file or directory
Mar 17 15:24:34 thorium upsd[3387]: Startup successful
Mar 17 15:24:34 thorium upsmon[3389]: Startup successful
Mar 17 15:24:34 thorium upsmon[3391]: Login on UPS [ups@localhost] failed - got [ERR ACCESS-DENIED]
Mar 17 15:24:39 thorium upsmon[3391]: Poll UPS [ups@localhost] failed - Driver not connected
Mar 17 15:24:39 thorium upsmon[3391]: Communications with UPS ups@localhost lost
Mar 17 15:24:44 thorium upsmon[3391]: Poll UPS [ups@localhost] failed - Driver not connected
Mar 17 15:24:44 thorium upsmon[3391]: UPS ups@localhost is unavailable
Mar 17 15:24:49 thorium upsmon[3391]: Poll UPS [ups@localhost] failed - Driver not connected
Here are my config files.
/etc/nut/nut.conf

Code: Select all

MODE=standalone
/etc/nut/ups.conf

Code: Select all

[ups]
	driver = apcsmart
	sdtype = 0
	cable = 940-0095B
	port = /dev/ttsy0
	desc = "UPS"
/etc/nut/upsd.conf

Code: Select all

LISTEN 127.0.0.1
/etc/nut/upsd.users

Code: Select all

[upsmon]
	password = xxxxxxxx
#	allowfrom = localhost
	actions = SET
	instcmds = ALL
/etc/nut/upsmon.conf

Code: Select all

 MONITOR ups@localhost 1 upsmon xxxxxxxx master
I have read and tried http://rogerprice.org/NUT.html#HOSTS.ALLOW and here is my /etc/hosts.allow

Code: Select all

upsd : localhost, LOCAL, 127.0.0.1,    [::1]               : ALLOW

 # And now the denials which previously appeared in /etc/hosts.deny
 #
 ALL :  ALL                                                 : DENY
That didn't help at all - I get the same error without the code in hosts.allow or with the code in hosts.allow.

Can anyone help me sort this out?
Last edited by bananabob on Sat Mar 24, 2012 7:48 pm, edited 1 time in total.
bananabob
Level 3
Level 3
Posts: 146
Joined: Tue Feb 07, 2012 11:05 pm

Re: NUT giving error message Can't connect to UPS [ups] (apc

Post by bananabob »

I have found one error and corrected it: /etc/ups.conf now reads

Code: Select all

[myups]
	driver = apcsmart
	sdtype = 0
	cable = 940-0095B
	port = /dev/ttyS0
	desc = "ups"

But I still get the nasty error message:
Mar 24 15:57:24 thorium apcsmart[7135]: Startup successful
Mar 24 15:57:24 thorium upsd[7136]: listening on 127.0.0.1 port 3493
Mar 24 15:57:24 thorium upsd[7136]: Connected to UPS [myups]: apcsmart-myups
Mar 24 15:57:24 thorium upsd[7137]: Startup successful
Mar 24 15:57:24 thorium upsmon[7139]: Startup successful
Mar 24 15:57:24 thorium upsmon[7141]: Login on UPS [myups@localhost] failed - got [ERR ACCESS-DENIED]
Is there someone with tcp wrappers knowledge out there that can help?
bananabob
Level 3
Level 3
Posts: 146
Joined: Tue Feb 07, 2012 11:05 pm

Re: <SOLVED> NUT Can't connect to UPS got [ERR ACCESS-DENIE

Post by bananabob »

I have solved this problem.
There is in fact no problem at all.
What happens is that NUT tries to LISTEN on both ipv4 and ipv6. It can only LISTEN on one of them so put out the error message for the one it can't LISTEN to.
Meanwhile UPSMON is working on the other with no problems.

Maybe they should change the message saying that connection can not be achieved because it is already connected.
tryfail

Re: <SOLVED> NUT Can't connect to UPS got [ERR ACCESS-DENIE

Post by tryfail »

bananabob wrote: Sat Mar 24, 2012 7:53 pm I have solved this problem.
There is in fact no problem at all.
What happens is that NUT tries to LISTEN on both ipv4 and ipv6. It can only LISTEN on one of them so put out the error message for the one it can't LISTEN to.
Meanwhile UPSMON is working on the other with no problems.

Maybe they should change the message saying that connection can not be achieved because it is already connected.
This can also happen when the 'upsmon' directive is missing from the user block in upsd.users
Locked

Return to “Software & Applications”