Network UPS Tools - Can't connect to UPS: Permission 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
OttoUsualConsumer
Level 1
Level 1
Posts: 3
Joined: Tue Jun 28, 2022 5:41 pm

Network UPS Tools - Can't connect to UPS: Permission Denied

Post by OttoUsualConsumer »

Hello guys,

I'm new with Linux Mint and I tried connecting my UPS with NUT.
I got everything configured but if I open

Code: Select all

 systemctl status nut-server 
it says:

Code: Select all

Can't connect to UPS [ups] (blazer_usb-ups): Permission denied
Complete output is:

Code: Select all

● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-06-28 23:25:28 CEST; 1min 13s ago
    Process: 3827 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 3828 (upsd)
      Tasks: 1 (limit: 38294)
     Memory: 524.0K
     CGroup: /system.slice/nut-server.service
             └─3828 /lib/nut/upsd

Jun 28 23:25:28 Rumhau-PC upsd[3827]: listening on 192.168.178.28 port 3493
Jun 28 23:25:28 Rumhau-PC upsd[3827]: listening on 127.0.0.1 port 3493
Jun 28 23:25:28 Rumhau-PC upsd[3827]: listening on 192.168.178.28 port 3493
Jun 28 23:25:28 Rumhau-PC upsd[3827]: listening on 127.0.0.1 port 3493
Jun 28 23:25:28 Rumhau-PC upsd[3827]: Can't connect to UPS [ups] (blazer_usb-ups): Permission denied
Jun 28 23:25:28 Rumhau-PC upsd[3827]: Can't connect to UPS [ups] (blazer_usb-ups): Permission denied
Jun 28 23:25:28 Rumhau-PC upsd[3827]: Can't open /etc/nut/upsd.users: Permission denied
Jun 28 23:25:28 Rumhau-PC upsd[3827]: Can't open /etc/nut/upsd.users: Permission denied
Jun 28 23:25:28 Rumhau-PC upsd[3828]: Startup successful
Jun 28 23:25:28 Rumhau-PC systemd[1]: Started Network UPS Tools - power devices information server.
I don't know why and dont understand why the permission is denied.
I already checked, if nut has permission to the files in /etc/nut, and it has.

Code: Select all

 journalctl -xe 
says:

Code: Select all

 
 Jun 29 00:01:23 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:28 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:33 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:34 Rumhau-PC kernel: [UFW BLOCK] IN=nordlynx.......
Jun 29 00:01:38 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:39 Rumhau-PC kernel: [UFW BLOCK] IN=nordlynx......
Jun 29 00:01:42 Rumhau-PC kernel: [UFW BLOCK] IN=nordlynx......
Jun 29 00:01:43 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:48 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:53 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:58 Rumhau-PC gnome-terminal-[3010]: g_menu_insert_item: assertion 'G_IS_MENU_ITEM (item)' failed
Jun 29 00:01:58 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:01:59 Rumhau-PC kernel: [UFW BLOCK] IN=nordlynx...... 
Jun 29 00:02:03 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:02:08 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:02:13 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:02:18 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:02:23 Rumhau-PC rtkit-daemon[1362]: Supervising 5 threads of 3 processes of 1 users.
Jun 29 00:02:23 Rumhau-PC rtkit-daemon[1362]: Supervising 5 threads of 3 processes of 1 users.
Jun 29 00:02:23 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
Jun 29 00:02:28 Rumhau-PC upsmon[1329]: Poll UPS [ups@127.0.0.1] failed - Driver not connected
  
(I'm using NordVPN, but disconnecting it also doesn't helped me)

If I start

Code: Select all

 sudo upsdrvctl start 
The output is:

Code: Select all

Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4)
Duplicate driver instance detected! Terminating other driver!
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)
so according to my understanding, in principle everything is ok.


Here my config files:

Code: Select all

ups.conf:
user = root
pollinterval = 1
maxretry = 5

[ups]
driver = "blazer_usb"
port = auto
desc="Upsilon 2000"
vendorid = "0001"
productid = "0000"

Code: Select all

upsd.conf
LISTEN 127.0.0.1 3493
LISTEN 192.168.178.28 3493
I'm using Linux Mint 20.3 if relevant.

Hope you can help me!

Thank you in advanced and sorry for my english :)
Last edited by LockBot on Sun Jan 01, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
antikythera
Level 15
Level 15
Posts: 5721
Joined: Thu Jul 02, 2020 12:52 pm
Location: Cymru

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by antikythera »

What make and model UPS is it? I only know how to configure APC units for linux but my current one doesn't even need services installing on any computer. It's managed remotely via a secure web portal in the browser. I don't know if your UPS offers a similar facility but it's worth investigating.

Also if you are trying to establish a network connection, what's with the USB references in the driver? Is it a USB to ethernet router connection from the UPS?
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11184
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by AZgl1800 »

Won't help the OP, but my UPS is a CyberPower and 15 years old, it only works with a Windows system, period.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
antikythera
Level 15
Level 15
Posts: 5721
Joined: Thu Jul 02, 2020 12:52 pm
Location: Cymru

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by antikythera »

I had two CyberPower UPS, they lasted 1 year in total and the 2nd was a warranty replacement for the 1st. Glad you have more luck with yours but that's why I ended up going back to APC even though the 1500VA one I needed was stupidly expensive in comparison. I have several other APC UPS, the oldest of which is from 2008 and still works with replacement batteries of course.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
OttoUsualConsumer
Level 1
Level 1
Posts: 3
Joined: Tue Jun 28, 2022 5:41 pm

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by OttoUsualConsumer »

antikythera wrote: Tue Jun 28, 2022 6:53 pm What make and model UPS is it? I only know how to configure APC units for linux but my current one doesn't even need services installing on any computer. It's managed remotely via a secure web portal in the browser. I don't know if your UPS offers a similar facility but it's worth investigating.

Also if you are trying to establish a network connection, what's with the USB references in the driver? Is it a USB to ethernet router connection from the UPS?
Thanks for your reply!
My UPS is a Greencell UPS01LCD.
I'm using it via USB and unfortunately there's no web interface...

The manufacturer delivered it with a Windows application, and it also works there via USB.
I wanted to switch from windows to linux and this is one of my last steps to complete the switch, so I hope we can make it :D
OttoUsualConsumer
Level 1
Level 1
Posts: 3
Joined: Tue Jun 28, 2022 5:41 pm

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by OttoUsualConsumer »

okay, I got it fixed now and its fully working.
I'm not sure what actually was the problem. i think some kind of rights that were not given, so nut was not able to read the files and folders.
I recommend looking at this thread and search for "chown" and you'll find the right permissions for these files:
https://wiki.ipfire.org/addons/nut

also you have to add a "ups" user to your system, (I think I read that over).

also I didn't understand there is a configuration for the slaves you don't have to do when you're using your ups only on one system (without slaves).
so I also recommend reading the whole documentation on the nuts site:
https://networkupstools.org/docs/user-m ... 01s02.html

without special uses it's not that long and you understand a bit more how it works, so this is really useful!

and sorry, I'm not sure how to close this thread, you can close it :D
User avatar
AZgl1800
Level 20
Level 20
Posts: 11184
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Network UPS Tools - Can't connect to UPS: Permission Denied

Post by AZgl1800 »

OttoUsualConsumer wrote: Tue Jul 12, 2022 1:16 pm okay, I got it fixed now and its fully working.
I'm not sure what actually was the problem. i think some kind of rights that were not given, so nut was not able to read the files and folders.
I recommend looking at this thread and search for "chown" and you'll find the right permissions for these files:
https://wiki.ipfire.org/addons/nut

also you have to add a "ups" user to your system, (I think I read that over).

also I didn't understand there is a configuration for the slaves you don't have to do when you're using your ups only on one system (without slaves).
so I also recommend reading the whole documentation on the nuts site:
https://networkupstools.org/docs/user-m ... 01s02.html

without special uses it's not that long and you understand a bit more how it works, so this is really useful!

and sorry, I'm not sure how to close this thread, you can close it :D
go to the very 1st post you made, and Edit the Title to show [ Solved ]
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Locked

Return to “Software & Applications”