You are not logged in.
Pages: 1
Good day,
I’ve spent most a day trying to configure network-ups-tools on my mediaserver to connect to my new UPS, a Powerwalker VI 1000 T/HID, its specification can be found here. I’ve followed the official guide when installing nuts from AUR:
1. Download tarball
2. Extract with “tar –xvf ..”
3. makepkg –si
There is something in this process which is unclear to me, but I’ll return to that later.
According to the hardware compatibility list, the driver for my UPS is blazer_ser, which might seem weird, but it may just related to an inconsistent naming convention. Or rather, the driver might have found extended use after receiving its name, I don’t know. Anyhow, I’ve tried both blazer_ser and blazer_usb and thus far they’ve only given me different errors in the journal. Don’t know which one is more appealing..
This is with blazer_usb:
Jul 16 00:57:43 mediaserver systemd[1]: Starting Network UPS Tools - power devices information server...
Jul 16 00:57:43 mediaserver upsd[29012]: Can't connect to UPS [powerwalker] (blazer_usb-powerwalker): No such file or directory
Jul 16 00:57:43 mediaserver systemd[1]: Started Network UPS Tools - power devices information server.
Jul 16 00:57:43 mediaserver upsd[29012]: fopen /var/state/ups/upsd.pid: No such file or directory
Jul 16 00:57:43 mediaserver upsd[29012]: listening on 127.0.0.1 port 3493
Jul 16 00:57:43 mediaserver upsd[29013]: Startup successful
Jul 16 00:57:43 mediaserver upsd[29012]: Can't connect to UPS [powerwalker] (blazer_usb-powerwalker): No such file or directory
Jul 16 00:57:43 mediaserver polkitd[449]: Unregistered Authentication Agent for unix-process:29006:391726 (system bus name :1.90,
Jul 16 00:57:46 mediaserver upsmon[28960]: Poll UPS [powerwalker@mediaserver] failed - Write error: Broken pipe
Jul 16 00:57:46 mediaserver polkitd[449]: Registered Authentication Agent for unix-process:29015:392034 (system bus name :1.91 [/u
Jul 16 00:57:46 mediaserver polkitd[449]: Unregistered Authentication Agent for unix-process:29015:392034 (system bus name :1.91,
Jul 16 00:57:49 mediaserver polkitd[449]: Registered Authentication Agent for unix-process:29020:392315 (system bus name :1.92 [/u
Jul 16 00:57:49 mediaserver systemd[1]: Stopping Network UPS Tools - power device monitor and shutdown controller...
Jul 16 00:57:49 mediaserver systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Jul 16 00:57:49 mediaserver upsmon[29025]: fopen /var/run/upsmon.pid: No such file or directory
Jul 16 00:57:49 mediaserver upsmon[29025]: UPS: powerwalker@mediaserver (master) (power value 1)
Jul 16 00:57:49 mediaserver upsmon[29025]: Using power down flag file /etc/killpower
Jul 16 00:57:49 mediaserver upsmon[29027]: Startup successful
Jul 16 00:57:49 mediaserver systemd[1]: nut-monitor.service: Supervising process 29028 which is not our child. We'll most likely n
Jul 16 00:57:49 mediaserver systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
Jul 16 00:57:49 mediaserver upsd[29013]: User upsmon@127.0.0.1 logged into UPS [powerwalker]
Jul 16 00:57:49 mediaserver upsmon[29028]: Poll UPS [powerwalker@mediaserver] failed - Driver not connected
Jul 16 00:57:49 mediaserver upsmon[29028]: Communications with UPS powerwalker@mediaserver lost
And this is with blazer_ser:
Jul 16 00:43:14 mediaserver systemd[1]: Starting Network UPS Tools - power devices information server...
Jul 16 00:43:14 mediaserver upsd[28950]: listening on 127.0.0.1 port 3493
Jul 16 00:43:14 mediaserver systemd[1]: Started Network UPS Tools - power devices information server.
Jul 16 00:43:14 mediaserver upsd[28950]: Can't connect to UPS [powerwalker] (blazer_ser-powerwalker): No such file or directory
Jul 16 00:43:14 mediaserver upsd[28951]: Startup successful
Jul 16 00:43:14 mediaserver upsd[28950]: fopen /var/state/ups/upsd.pid: No such file or directory
Jul 16 00:43:14 mediaserver upsd[28950]: listening on 127.0.0.1 port 3493
Jul 16 00:43:14 mediaserver upsd[28950]: Can't connect to UPS [powerwalker] (blazer_ser-powerwalker): No such file or directory
Jul 16 00:43:14 mediaserver polkitd[449]: Unregistered Authentication Agent for unix-process:28944:304821 (system bus name :1.88,
Jul 16 00:43:15 mediaserver polkitd[449]: Registered Authentication Agent for unix-process:28953:304973 (system bus name :1.89 [/u
Jul 16 00:43:15 mediaserver systemd[1]: Stopping Network UPS Tools - power device monitor and shutdown controller...
Jul 16 00:43:15 mediaserver systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Jul 16 00:43:16 mediaserver upsmon[28958]: fopen /var/run/upsmon.pid: No such file or directory
Jul 16 00:43:16 mediaserver upsmon[28958]: UPS: powerwalker@mediaserver (master) (power value 1)
Jul 16 00:43:16 mediaserver upsmon[28958]: Using power down flag file /etc/killpower
Jul 16 00:43:16 mediaserver systemd[1]: nut-monitor.service: PID file /var/run/upsmon.pid not readable (yet?) after start: No such
Jul 16 00:43:16 mediaserver upsmon[28959]: Startup successful
Jul 16 00:43:16 mediaserver systemd[1]: nut-monitor.service: Supervising process 28960 which is not our child. We'll most likely n
Jul 16 00:43:16 mediaserver systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
Jul 16 00:43:16 mediaserver upsd[28951]: User upsmon@127.0.0.1 logged into UPS [powerwalker]
Jul 16 00:43:16 mediaserver upsmon[28960]: Poll UPS [powerwalker@mediaserver] failed - Driver not connected
Jul 16 00:43:16 mediaserver upsmon[28960]: Communications with UPS powerwalker@mediaserver lost
Here are my configs:
/etc/ups/ups.conf
[powerwalker]
# driver = blazer_ser
driver = blazer_usb
port = auto
desc = "Shenanigans"
/etc/ups/upsmon.conf
RUN_AS_USER upsmon
MONITOR powerwalker@mediaserver 1 upsmon ****** master
MINSUPPLIES 1
#SHUTDOWNCMD "/sbin/shutdown -h +0"
SHUTDOWNCMD "systemctl poweroff"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
/etc/ups/upsd.conf
LISTEN 127.0.0.1 3493
/etc/ups/upsd.users
[upsmon]
password = ******
upsmon master
actions = SET
instcmds = ALL
Here’s /etc/udev/rules.d/52-nut-usbups.rules:
SYSFS{idVendor}=="06da", SYSFS{idProduct}=="ffff", MODE="664", GROUP="nut"
And lsusb shows:
Bus 008 Device 006: ID 045e:0719 Microsoft Corp. Xbox 360 Wireless Adapter
Bus 008 Device 005: ID 0040:073d
Bus 008 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 008 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 06da:ffff Phoenixtec Power Co., Ltd
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
For the record, I’ve created the user “upsmon” and attached it to the group “nut” which owns the folder /etc/ups and all its files.
Now, regarding the installation. I mentioned earlier there was something about the installation I was unsure about. From nuts installation document:
Configure the source tree for your system. Add the --with-user and --with-group switch to set the user name and group that you created above.
./configure --with-user=ups --with-group=nut
…
to build and install USB drivers, add --with-usb (note that you need to install libusb development package or files).
How do I do that when installing from AUR? Because when reading the logs I get the feeling the drivers aren’t even installed:
“Can't connect to UPS [powerwalker] (blazer_ser-powerwalker): No such file or directory”
Or am I misinterpreting this? I don’t want to point any help I can get in the wrong direction, but I believe the issue lies here.
I hope I’ve supplied you with all the information you need to push me in the right direction
Thanks in advance
Best regards, Marc
Offline
Those options are all enabled in the PKGBUILD.
Are the blazer_* modules loaded?
Offline
Those options are all enabled in the PKGBUILD.
Are the blazer_* modules loaded?
Ok, thanks for clearing that up!
Yeah, forgot to mention that. I didn't know if they were supposed to show using lsmod, that is if they were installed and behaved like ordinary modules. Anyhow, they don't show and I can't find them using "find" tool either. Haven't tried installing mlocate and using that instead, but it should yield the same results..
Offline
Just use modprobe (I am assuming they are kernel modules)...
Offline
Just use modprobe (I am assuming they are kernel modules)...
I used modprobe for both blazer_ser and blazer_usb, no luck. As I mentioned, could not find either of them compiled using "find / -name "blazer_*"".
modprobe: FATAL: Module blazer_ser not found.
As expected, their source is available in the unpacked directory. Not sure why they weren't compiled and installed when nuts was though.
[root@mediaserver media]# find / -name "blazer_*"
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/docs/man/blazer_ser.txt
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/docs/man/blazer_usb.txt
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/docs/man/blazer_ser.8
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/docs/man/blazer_usb.8
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_ser.c
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_usb.c
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_usb
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_ser.o
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/.deps/blazer_usb.Po
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/.deps/blazer_ser.Po
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_ser
/home/media/Downloads/nuts/network-ups-tools/src/nut-2.7.3/drivers/blazer_usb.o
/home/media/Downloads/nuts/network-ups-tools/pkg/network-ups-tools/usr/share/man/man8/blazer_ser.8.gz
/home/media/Downloads/nuts/network-ups-tools/pkg/network-ups-tools/usr/share/man/man8/blazer_usb.8.gz
/home/media/Downloads/nuts/network-ups-tools/pkg/network-ups-tools/usr/bin/blazer_usb
/home/media/Downloads/nuts/network-ups-tools/pkg/network-ups-tools/usr/bin/blazer_ser
/usr/share/man/man8/blazer_usb.8.gz
/usr/share/man/man8/blazer_ser.8.gz
/usr/bin/blazer_usb
/usr/bin/blazer_ser
Offline
Been searching some on the topic of compiling modules without compiling the entire kernel, but I am at a loss on how to proceed. I simply cannot just compile the drivers from their folder, it doesn't work at least.
Any thoughts on this?
Best regards, Marc
Offline
My bad: they aren't kernel modules...
Does this work?
[PowerWalker]
driver = blazer_usb
port = auto
desc = "Shenanigans"
Offline
My bad: they aren't kernel modules...
Does this work?
[PowerWalker] driver = blazer_usb port = auto desc = "Shenanigans"
Sadly, no. Tried both blazer_ser and blazer_usb. If you look at my first post you can see the different errors they gave in the logs.
When polling, blazer_ser gave "Driver not connected" while blazer_usb gave "Broken pipe" on first poll and "Driver not connected" on subsequent entries.
Offline
what about the 4'th step ?
ezik
Offline
I was referring to the camel case [PowerWalker] (cluctching at straws, but it's all I've got...)
Offline
This[1] might be of some help (or not). Just remember seeing someone on the mailing list having trouble to get NUT working. Double check udev rules and group memberships, the problem might be something related to that.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I was referring to the camel case [PowerWalker] (cluctching at straws, but it's all I've got...)
Ah, yes, I see. According to the documentation it shouldn't matter, as long as I am consequent in using the name I've chosen.
# The section header ([upsname]) can be just about anything as long as
# it is a single word inside brackets. upsd uses this to uniquely
# identify a UPS on this system.
But I've now tried it and the logs show the same: "Poll UPS [PowerWalker@mediaserver] failed - Driver not connected"
what about the 4'th step ?
Which fourth step? Acknowledging the installation of dependencies when installing AUR packages?
Offline
pacman -U
ezik
Offline
This[1] might be of some help (or not). Just remember seeing someone on the mailing list having trouble to get NUT working. Double check udev rules and group memberships, the problem might be something related to that.
It seems I somehow missed using chmod recursively. But it's odd, even now when supposedly rectified it fails even earlier. Now upsmon has completely lost the permissions needed, even though they are in place.
After I changed the permissions on the files and the /etc/ups directory I rebooted the server as well to make sure everything was up to date.
[root@mediaserver media]# id upsmon
uid=1001(upsmon) gid=1002(upsmon) groups=1002(upsmon),10(wheel),55(nut)
[root@mediaserver media]# ls -gl /etc/ups/
total 84
-rw-r----- 1 nut 1538 Jul 15 10:56 nut.conf.sample
-rw-r----- 1 nut 4711 Jul 18 11:43 ups.conf
-rw-r----- 1 nut 4618 Jul 15 10:56 ups.conf.sample
-rw-r----- 1 nut 4575 Jul 15 19:22 upsd.conf
-rw-r----- 1 nut 4578 Jul 15 10:56 upsd.conf.sample
-rw-r----- 1 nut 2205 Jul 16 00:15 upsd.users
-rw-r----- 1 nut 2131 Jul 15 10:56 upsd.users.sample
-rw-r----- 1 nut 15402 Jul 18 11:43 upsmon.conf
-rw-r----- 1 nut 15312 Jul 15 10:56 upsmon.conf.sample
-rw-r----- 1 nut 3895 Jul 15 10:56 upssched.conf
-rw-r----- 1 nut 3895 Jul 15 10:56 upssched.conf.sample
[root@mediaserver media]# ls -gdl /etc/ups/
drw-r----- 2 nut 4096 Jul 15 10:56 /etc/ups/
[root@mediaserver media]# su upsmon
[upsmon@mediaserver media]$ cat /etc/ups/ups.conf
cat: /etc/ups/ups.conf: Permission denied
[upsmon@mediaserver media]$ ls -ld /etc/ups
drw-r----- 2 root nut 4096 Jul 15 10:56 /etc/ups
[upsmon@mediaserver media]$ ls -l /etc/ups
ls: cannot access /etc/ups/nut.conf.sample: Permission denied
ls: cannot access /etc/ups/upsd.conf: Permission denied
ls: cannot access /etc/ups/upsd.users.sample: Permission denied
ls: cannot access /etc/ups/ups.conf.sample: Permission denied
ls: cannot access /etc/ups/upsmon.conf.sample: Permission denied
ls: cannot access /etc/ups/upsd.users: Permission denied
ls: cannot access /etc/ups/ups.conf: Permission denied
ls: cannot access /etc/ups/upssched.conf.sample: Permission denied
ls: cannot access /etc/ups/upsd.conf.sample: Permission denied
ls: cannot access /etc/ups/upsmon.conf: Permission denied
ls: cannot access /etc/ups/upssched.conf: Permission denied
total 0
-????????? ? ? ? ? ? nut.conf.sample
-????????? ? ? ? ? ? ups.conf
-????????? ? ? ? ? ? ups.conf.sample
-????????? ? ? ? ? ? upsd.conf
-????????? ? ? ? ? ? upsd.conf.sample
-????????? ? ? ? ? ? upsd.users
-????????? ? ? ? ? ? upsd.users.sample
-????????? ? ? ? ? ? upsmon.conf
-????????? ? ? ? ? ? upsmon.conf.sample
-????????? ? ? ? ? ? upssched.conf
-????????? ? ? ? ? ? upssched.conf.sample
I cannot explain this. The user upsmon can read as far as the directory /etc/ups, but not the files inside it, even though the group nut (which the user upsmon belongs to) has read permission.
pacman -U
Ok, thanks. It's getting very late here though, so I'll continue tomorrow, ran into some issues:
error: '/var/cache/pacman/pkg/nut-2.7.3.tar.gz': invalid or corrupted package (PGP signature)
May have found a solution for it though, we'll see tomorrow.
Best regards, Marc
Offline
My solution did not pan out. When attempting "pacman -U http://www.networkupstools.org/source/2.7/nut-2.7.3.tar.gz" it first complained about the keys, but that was solved using "gpg --fetch-keys http://www.networkupstools.org/source/nut-key.gpg".
But I quickly ran into new problems, namely
loading packages...
error: '/var/cache/pacman/pkg/nut-2.7.3.tar.gz': invalid or corrupted package (PGP signature)
Others had managed to solve this by doing the following:
rm -R /etc/pacman.d/gnupg
pacman-key --init
pacman -Syy
pacman-key --populate archlinux
pacman -Syu
And after system update I attempted to upgrade nuts through pacman again, but to no avail. Removing the old tarball at /var/cache/pacman/pkg/ did not remedy the situation either, the tarball was indeed downloaded anew, but the error remained. Maybe there is some syntax error in my commands I am not aware of, that I'm not using pacman properly, I do not know.
So, in short. I still cannot explain or understand the permission issue described in my previous post and I'm stuck at trying to upgrade nuts though pacman.
Last edited by folkdanskung (2015-07-19 10:54:24)
Offline
Pages: 1