<div dir="auto"><div>Note that stopping nut-server.service does not impact your ability to run/restart the drivers, see docs on NUT 3-layer architecture for more details.<div dir="auto"><br></div><div dir="auto">The single nut-driver.service was last delivered with NUT v2.7.4; now it is a multi-instance nut-driver@YOURUPSNAME.service with magic done by nut-driver-enumerator* units. You should stop those units before experimenting with e.g. direct driver program launch for debug/troubleshooting.</div><div dir="auto"><br></div><div dir="auto">Also don't use the old upsdrvctl on OSes with systemd or SMF, use upsdrvsvcctl instead if you must :)</div><div dir="auto"><br></div><div dir="auto">> <span style="font-family:arial,sans-serif;font-size:14px">/path/to/driver: No such file or directory</span></div><div dir="auto"><br></div><div dir="auto">Did you literally write that? Which driver, we have about 50?</div><div dir="auto"><br></div><div dir="auto">e.g. with Debian-ish packaging it might be /lib/nut/usbhid-ups or what suits your UPS.</div><div dir="auto"><br></div><div dir="auto">Hope this helps,</div><div dir="auto">Jim Klimov</div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2025, 22:32 Andrea Santiccioli via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px"><span>Hello everyone,</span><div><span>I am a italian basic user with a problem using NUT and Raspberry Pi 5 Bookworm. </span></div><div><span>Version NUT 2.8.0-7</span></div><div><span>i have APC i have used driver: usbhid-ups</span></div><div><span>I successfully used NUT on Raspberry Pi 3 and Bullseye without any issues.</span></div><div><span>I changed the Raspberry Pi and the operating system version, and now it no longer works.</span></div><div><br></div><div><span>sudo systemctl stop nut-server.service</span></div><div><span>/path/to/driver -DD -a nomeups</span></div><div><br></div><div><span>/path/to/driver: No such file or directory</span></div><div><br></div><div><br></div><div><span>The main issue is that notifications are not being received.</span></div><div><span>The obvious error occurs when I try to execute:</span></div><div><br></div><div><span>---------</span></div><div><span>sudo systemctl restart nut-driver.service</span></div><div><br></div><div><span>Failed to restart nut-driver.service: Unit nut-driver.service not found.</span></div><div><br></div><div><span>---------------------</span></div><div><br></div><div><span>If I run lsusb, I get this output:</span></div><div><br></div><div><br></div><div><span>Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub</span></div><div><span>Bus 003 Device 002: ID 046d:c077 Logitech, Inc. Mouse</span></div><div><span>Bus 003 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply</span></div><div><span>Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</span></div><div><span>Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub</span></div><div><span>Bus 001 Device 002: ID 046d:c34b Logitech, Inc. USB Keyboard</span></div><div><span>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</span></div><div><br></div><div><span>------------------------------------</span></div><div><br></div><div><span>upsc nomeups</span></div><div><br></div><div><span>Init SSL without certificate database</span></div><div><span>battery.charge: 100</span></div><div><span>battery.charge.low: 10</span></div><div><span>battery.charge.warning: 50</span></div><div><span>battery.date: 2001/09/25</span></div><div><span>battery.mfr.date: 2014/09/27</span></div><div><span>battery.runtime: 4405</span></div><div><span>battery.runtime.low: 120</span></div><div><span>battery.type: PbAc</span></div><div><span>battery.voltage: 27.0</span></div><div><span>battery.voltage.nominal: 24.0</span></div><div><span>device.mfr: American Power Conversion</span></div><div><span>device.model: Back-UPS RS 900G</span></div><div><span>device.serial: 3B </span></div><div><span>device.type: ups</span></div><div><span><a rel="noreferrer nofollow noopener noreferrer" href="http://driver.name" target="_blank">driver.nam</a>e: usbhid-ups</span></div><div><span>driver.parameter.pollfreq: 30</span></div><div><span>driver.parameter.pollinterval: 2</span></div><div><span>driver.parameter.port: auto</span></div><div><span>driver.parameter.synchronous: auto</span></div><div><span>driver.version: 2.8.0</span></div><div><span>driver.version.data: APC HID 0.98</span></div><div><span>driver.version.internal: 0.47</span></div><div><span>driver.version.usb: libusb-1.0.26 (API: 0x1000109)</span></div><div><span>input.sensitivity: medium</span></div><div><span>input.transfer.high: 294</span></div><div><span>input.transfer.low: 176</span></div><div><span>input.voltage: 224.0</span></div><div><span>input.voltage.nominal: 230</span></div><div><span>ups.beeper.status: enabled</span></div><div><span>ups.delay.shutdown: 20</span></div><div><span>ups.firmware: 879.L4 .I</span></div><div><span>ups.firmware.aux: L4 </span></div><div><span>ups.load: 7</span></div><div><span>ups.mfr: American Power Conversion</span></div><div><span>ups.mfr.date: 2014/09/27</span></div><div><span>ups.model: Back-UPS RS 900G</span></div><div><span>ups.productid: 0002</span></div><div><span>ups.realpower.nominal: 540</span></div><div><span>ups.serial: 3B </span></div><div><span>ups.status: OL</span></div><div><span>ups.test.result: No test initiated</span></div><div><span>ups.timer.reboot: 0</span></div><div><span>ups.timer.shutdown: -1</span></div><div><span>ups.vendorid: 051d</span></div><div><br></div><div><span>----------------------------------</span></div><div><br></div><div><span>This is the configuration I set up, and I also installed an email sending service.</span></div><div><br></div><div><span>----------------------</span></div><div><span>/etc/nut/ups.conf</span></div><div><span>[nomeups]</span></div><div><span> driver = usbhid-ups</span></div><div><span> port = auto</span></div><div><span>#maxretry = 3</span></div><div><br></div><div><span>---------------------------</span></div><div><br></div><div><span>/etc/nut/upsd.users</span></div><div><span>[andreanut]</span></div><div><span> password = password123</span></div><div><span> andreanut master</span></div><div><br></div><div><span>--------------------------------</span></div><div><span>/etc/nut/upsmon.conf</span></div><div><br></div><div><span>NOTIFYCMD /etc/nut/notifycmd.sh</span></div><div><br></div><div><span>#SHUTDOWNCMD "/sbin/shutdown -h +0"</span></div><div><br></div><div><span> NOTIFYMSG ONLINE "UPS %s on line power"</span></div><div><span> NOTIFYMSG ONBATT "UPS %s on battery"</span></div><div><span> NOTIFYMSG LOWBATT "UPS %s battery is low"</span></div><div><span> NOTIFYMSG FSD "UPS %s: forced shutdown in progress"</span></div><div><span> NOTIFYMSG COMMOK "Communications with UPS %s established"</span></div><div><span> NOTIFYMSG COMMBAD "Communications with UPS %s lost"</span></div><div><span> NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"</span></div><div><span> NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"</span></div><div><span> NOTIFYMSG NOCOMM "UPS %s is unavailable"</span></div><div><span> NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"</span></div><div><br></div><div><span> ONLINE : UPS is back online</span></div><div><span> ONBATT : UPS is on battery</span></div><div><span> LOWBATT : UPS has a low battery (if also on battery, it's "critical")</span></div><div><span> FSD : UPS is being shutdown by the primary (FSD = "Forced Shutdown")</span></div><div><span> COMMOK : Communications established with the UPS</span></div><div><span> COMMBAD : Communications lost to the UPS</span></div><div><span> SHUTDOWN : The system is being shutdown</span></div><div><span> REPLBATT : The UPS battery is bad and needs to be replaced</span></div><div><span> NOCOMM : A UPS is unavailable (can't be contacted for monitoring)</span></div><div><span> NOPARENT : The process that shuts down the system has died (shutdown impossible)</span></div><div><br></div><div><br></div><div><span>NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG FSD SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC</span></div><div><span>NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC</span></div><div><br></div><div><span>MONITOR nomeups@localhost 1 andreanut password123 master</span></div><div><br></div><div><span>------------------------------------------</span></div><div><br></div><div><span>/etc/nut/nut.conf</span></div><div><br></div><div><span>MODE=netserver</span></div><div><br></div><div><span>------------------------------------</span></div><div><br></div><div><span>/etc/nut/upsd.conf</span></div><div><br></div><div><span>LISTEN 0.0.0.0 3493</span></div><div><br></div><div><span>----------------------------------</span></div><div><br></div><div><span>I installed Apache:</span></div><div><br></div><div><span>apache2 nut-cgi</span></div><div><br></div><div><span>Enabled the CGI module:</span></div><div><br></div><div><span>a2enmod cgi</span></div><div><br></div><div><span>---------------------------------</span></div><div><br></div><div><span>/etc/nut/hosts.conf</span></div><div><span>MONITOR nomeups@localhost "UPS APC COMPUTER"</span></div><div><br></div><div><span>------------------------------------</span></div><div><br></div><div><span>sudo systemctl restart apache2</span></div><div><br></div><div><br></div><div><span>I installed msmtp for email sending:</span></div><div><br></div><div><span>sudo apt install msmtp</span></div><div><span>sudo nano /etc/msmtprc</span></div><div><br></div><div><span>defaults</span></div><div><span>auth on</span></div><div><span>tls on</span></div><div><span>tls_trust_file /etc/ssl/certs/ca-certificates.crt</span></div><div><span>logfile ~/.msmtp.log</span></div><div><span>account gmail</span></div><div><span>host <a rel="noreferrer nofollow noopener noreferrer" href="http://smtp.gmail.com" target="_blank">smtp.gmail.com</a></span></div><div><span>port 587</span></div><div><span>from <a rel="noreferrer nofollow noopener noreferrer" href="mailto:youremail@gmail.com" target="_blank">youremail@gmail.com</a></span></div><div><span>user <a rel="noreferrer nofollow noopener noreferrer" href="mailto:youremail@gmail.com" target="_blank">youremail@gmail.com</a></span></div><div><span>password yourAppPassword</span></div><div><span>account default : gmail</span></div><div><br></div><div><span>---------------------------------</span></div><div><br></div><div><span>sudo nano /etc/nut/notifycmd.sh</span></div><div><span>#!/bin/bash</span></div><div><span>EMAIL='email'</span></div><div><span>echo -e "Subject: $HOSTNAME ALERT: $NOTIFYTYPE\n\nUPS: $UPSNAME\r\nAlert type: $NOTIFYTYPE\n\n$UPSNAME: $*" | msmtp $EMAIL</span></div><div><br></div><div><span>------------------------------</span></div><div><br></div><div><span>sudo chown :nut /etc/nut/notifycmd.sh</span></div><div><span>sudo chmod 774 /etc/nut/notifycmd.sh</span></div><div><span>sudo systemctl restart nut-server.service</span></div><div><span>sudo systemctl restart nut-driver.service</span></div><div><br></div><div><span>Failed to restart nut-driver.service: Unit nut-driver.service not found.</span></div><div><br></div><div><br></div><div><span>sudo systemctl restart nut-monitor.service</span></div><div><br></div><div><span>-------------------------------</span></div><div><br></div><div><span>Now, if I go to the link:</span></div><div><span><a rel="noreferrer nofollow noopener noreferrer" href="http://xxx.xxx.xxx.xxx/cgi-bin/nut/upsstats.cgi" target="_blank">http://xxx.xxx.xxx.xxx/cgi-bin/nut/upsstats.cgi</a></span></div><div><span>it works and is recognized, but notifications do not arrive, and even if I try to restart the driver, it still fails.</span></div><div><br></div><div><span>Please please help me! Thanks</span></div><span>Andrea</span><br></div>
<div style="font-family:Arial,sans-serif;font-size:14px">
<div>
</div>
<div>
</div>
</div>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote></div></div></div>