<div dir="auto">Can you please check what was previous to the signal 15 (graceful termination)? With `journalctl -lu nut-server` or with longer `systemctl status -n 50 nut-server` if that works for yours?<div dir="auto"><br></div><div dir="auto">Also, check NUT Wiki or other docs about using `debug_min` setting woth 2.8.0+ to bump it and have more context about why differebt daemons decide to do whatever they do (e.g. restart).</div><div dir="auto"><br></div><div dir="auto">For all I know from the few lines here, the restart of services could be auto-updates rebooting the server, unrelated to NUT or UPS. Or not. Just got too little to say anything definite.</div><div dir="auto"><br></div><div dir="auto">Good luck,</div><div dir="auto">Jim</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 19, 2024, 17:02 Stefan Schumacher 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jan 19 05:50:13 mars nut-monitor[849]: Signal 15: exiting<br>
Jan 19 05:50:13 mars nut-monitor[849]: Network UPS Tools upsmon 2.8.0<br>
Jan 19 05:50:13 mars systemd[1]: Stopping nut-monitor.service -<br>
Network UPS Tools - power device monitor and shutdown controller...<br>
Jan 19 05:50:13 mars systemd[1]: nut-monitor.service: Deactivated successfully.<br>
Jan 19 05:50:13 mars systemd[1]: Stopped nut-monitor.service - Network<br>
UPS Tools - power device monitor and shutdown controller.<br>
Jan 19 05:50:17 mars nut-server[1303]: mainloop: Interrupted system call<br>
Jan 19 05:50:17 mars nut-server[1303]: Signal 15: exiting<br>
Jan 19 05:50:17 mars nut-server[1303]: Network UPS Tools upsd 2.8.0<br>
Jan 19 05:50:17 mars systemd[1]: Stopping nut-server.service - Network<br>
UPS Tools - power devices information server...<br>
Jan 19 05:50:17 mars upsd[1303]: mainloop: Interrupted system call<br>
Jan 19 05:50:17 mars upsd[1303]: Signal 15: exiting<br>
Jan 19 05:50:17 mars systemd[1]: nut-server.service: Deactivated successfully.<br>
Jan 19 05:50:17 mars systemd[1]: Stopped nut-server.service - Network<br>
UPS Tools - power devices information server.<br>
Jan 19 05:50:44 mars usbhid-ups[845]: WARNING: send_to_all: write 31<br>
bytes to socket 11 failed (ret=-1), disconnecting: Broken pipe<br>
<br>
Am Fr., 19. Jan. 2024 um 16:33 Uhr schrieb Matus UHLAR - fantomas<br>
<<a href="mailto:uhlar@fantomas.sk" target="_blank" rel="noreferrer">uhlar@fantomas.sk</a>>:<br>
><br>
> On 19.01.24 16:20, Stefan Schumacher via Nut-upsuser wrote:<br>
> >This morning at 9:50 the server stopped working unexpectedly - I was<br>
> >still sleeping until 10:00, so no user intervention took place.<br>
> ><br>
> >Jan 19 05:50:17 mars nut-server[1303]: mainloop: Interrupted system call<br>
> >Jan 19 05:50:17 mars nut-server[1303]: Signal 15: exiting<br>
> >Jan 19 05:50:17 mars nut-server[1303]: Network UPS Tools upsd 2.8.0<br>
> >Jan 19 05:50:17 mars systemd[1]: Stopping nut-server.service - Network<br>
> >UPS Tools - power devices information server...<br>
> >Jan 19 05:50:17 mars upsd[1303]: mainloop: Interrupted system call<br>
> >Jan 19 05:50:17 mars upsd[1303]: Signal 15: exiting<br>
> >Jan 19 05:50:17 mars systemd[1]: nut-server.service: Deactivated successfully.<br>
> >Jan 19 05:50:17 mars systemd[1]: Stopped nut-server.service - Network<br>
> >UPS Tools - power devices information server.<br>
> ><br>
> >I am considering returning the device to the online shop I bought. As<br>
> >it is, it's nothing but trouble. Can you recommend a small UPS (1<br>
> >Server) that is guaranteed to work flawlessly with NUT?<br>
><br>
> perhaps Eaton Ellipse would be fine.<br>
><br>
> The message above does not look like a problem of the UPS.<br>
> Was there anything other in the logs, before the message above?<br>
><br>
> >Am Fr., 19. Jan. 2024 um 10:54 Uhr schrieb Jim Klimov via Nut-upsuser<br>
> ><<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">nut-upsuser@alioth-lists.debian.net</a>>:<br>
> >><br>
> >> With recent NUT releases, driver disconnections should be contained in its own `nut-driver@eaton` instance (the `@upsname` part is derived from the `ups.conf` section name). One of the drivers failing and restarting is not a proper cause for the data server to recycle.<br>
> >><br>
> >> Also, nowadays some (maybe not all) USB-capable drivers should try to reconnect without restarting. Note however, that in some NUT iterations it is possible that this feature misfires if the devices get re-enumerated and the driver tries to reuse results of original libusb discovery (e.g. some kernels add +1 to "device" number upon each reconnection, such as due to USB chip/hub reset, EMI causing protocol reset, or a device going to sleep and yanked back to work).<br>
> >><br>
> >> In fact, recent work on master branch got `nut-scanner` to not suggest the `device` option by default to avoid such situations.<br>
> >><br>
> >> Jim<br>
> >><br>
> >><br>
> >> On Fri, Jan 19, 2024 at 9:36 AM Matus UHLAR - fantomas <<a href="mailto:uhlar@fantomas.sk" target="_blank" rel="noreferrer">uhlar@fantomas.sk</a>> wrote:<br>
> >>><br>
> >>> On 19.01.24 09:00, Jim Klimov via Nut-upsuser wrote:<br>
> >>> >Well, from your logs it seems that at 05:17:03 your nut-server (upsd)<br>
> >>> >restarted, so an upsmon reconnection attempt at 05:17:09 had an issue with<br>
> >>> >that (config not all applied? strange a bit) but since 05:17:14 it is okay.<br>
> >>> ><br>
> >>> >Maybe a few too many banners shown from upsmon, while its same uptime seems<br>
> >>> >to continue. Maybe someone should check on that, seems like a good and easy<br>
> >>> >newcomer issue to learn the code, so PRs are welcome :D<br>
> >>> ><br>
> >>> >Messages about lack of "*.pid" files are okay, they should look less scary<br>
> >>> >in newer releases of NUT. They confirm that there is no previous daemon<br>
> >>> >with the same basic configuration currently running, so that your new<br>
> >>> >instance might conflict with it or send it some signals intentionally - so<br>
> >>> >it is just a new start in a clean environment with no competitors.<br>
> >>> ><br>
> >>> >It is a bit unfortunate that both syslog (upsd) and stderr (nut-server)<br>
> >>> >messages land into the same systemd journal. It may be possible to add<br>
> >>> >auto-detection of systemd and not-emit one of those streams then, or add an<br>
> >>> >option for that to be quieter and better readable (some people can have a<br>
> >>> >separate syslog setup anyway, maybe on a remote "sink" system, so just<br>
> >>> >cutting one off always is not right).<br>
> >>> ><br>
> >>> >So one question that remains is the missing lines from previous lifetime in<br>
> >>> >the short excerpt of upsd: why did it restart at that time? :)<br>
> >>><br>
> >>> I also have Eaton UPS, just different model. It sometimes disconnects and<br>
> >>> nut has to connect again. I guess this is what happened.<br>
> >>><br>
> >>> I assume the disonnect message is not visible in "Systemctl status" message<br>
> >>> because it does not belong to the current process but previous one.<br>
> >>> Looking for syslog (/var/log/messages) or journal messages (journalctl) could<br>
> >>> show that. I guess nothing bad happened there.<br>
> >>><br>
> >>> >On Fri, Jan 19, 2024 at 6:13 AM Stefan Schumacher via Nut-upsuser <<br>
> >>> ><a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br>
> >>> >> I recently bought a small UPS by Eaton (Ellipse ECO 800) in order to<br>
> >>> >> prevent my<br>
> >>> >> btrfs-fileserver (running Debian 12 Bookworm 12.4 from shutting down<br>
> >>> >> abruptly while writing<br>
> >>> >> something important during a power loss. I am using the version<br>
> >>> >> 2.8.0.7 provided by Debian.<br>
> >>> >> I have found very gooddocumentation on how to set up the UPS and the<br>
> >>> >> services on the server<br>
> >>> >> connected to it. Unfortunately it's in German<br>
> >>> >> (<a href="https://techbotch.org/blog/ups-setup/index.html" rel="noreferrer noreferrer" target="_blank">https://techbotch.org/blog/ups-setup/index.html</a>) which is not a<br>
> >>> >> problem for me but possibly for others trying to understand my set-up.<br>
> >>> >><br>
> >>> >> I will now describe the steps I took and the configuration options I<br>
> >>> >> set and then post the errors of nut-monitor and nut server. I hope<br>
> >>> >> someone can help fix the underlying problem behind these error<br>
> >>> >> messages.<br>
> >>> >><br>
> >>> >> lsusb shows the UPS:<br>
> >>> >> Bus 001 Device 003: ID 0463:ffff MGE UPS Systems UPS<br>
> >>> >><br>
> >>> >> So I made this changes to ups.conf<br>
> >>> >> [Eaton]<br>
> >>> >> driver = usbhid-ups<br>
> >>> >> port = auto<br>
> >>> >> vendorid = 0463<br>
> >>> >> pollfreq = 30<br>
> >>> >><br>
> >>> >> In nut.conf I set mode=standalone.<br>
> >>> >><br>
> >>> >> And finally I added these lines to upsd.users:<br>
> >>> >> [upsmon]<br>
> >>> >> password = XXXX<br>
> >>> >> actions = SET<br>
> >>> >> instcmds = ALL<br>
> >>> >><br>
> >>> >> I did a live test, plugged the cord and waited until the server shut<br>
> >>> >> down at 20%. Worked fine.<br>
> >>> >> Upsc also works - I can query my UPS for specific parameters or show them<br>
> >>> >> all.<br>
> >>> >><br>
> >>> >> The problem is the dozens of errors the systemctl status messages<br>
> >>> >> show. I bought the UPS to increase reliability and now I don't know if<br>
> >>> >> the service is working in case of an emergency. How can I fix this ?<br>
> >>> >><br>
> >>> >> ● nut-server.service - Network UPS Tools - power devices information server<br>
> >>> >> Loaded: loaded (/lib/systemd/system/nut-server.service; enabled;<br>
> >>> >> preset: enabled)<br>
> >>> >> Active: active (running) since Fri 2024-01-19 05:17:03 CET; 5s ago<br>
> >>> >> Main PID: 1303 (upsd)<br>
> >>> >> Tasks: 1 (limit: 38253)<br>
> >>> >> Memory: 640.0K<br>
> >>> >> CPU: 3ms<br>
> >>> >> CGroup: /system.slice/nut-server.service<br>
> >>> >> └─1303 /lib/nut/upsd -F<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: fopen /run/nut/upsd.pid:<br>
> >>> >> No such file or directory<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: Could not find PID file<br>
> >>> >> '/run/nut/upsd.pid' to see if previous upsd instance is already<br>
> >>> >> running!<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: listening on 127.0.0.1 port<br>
> >>> >> 3493<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: listening on ::1 port 3493<br>
> >>> >> Jan 19 05:17:03 servername upsd[1303]: listening on 127.0.0.1 port 3493<br>
> >>> >> Jan 19 05:17:03 servername upsd[1303]: listening on ::1 port 3493<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: Connected to UPS [Eaton]:<br>
> >>> >> usbhid-ups-Eaton<br>
> >>> >> Jan 19 05:17:03 servername upsd[1303]: Connected to UPS [Eaton]:<br>
> >>> >> usbhid-ups-Eaton<br>
> >>> >> Jan 19 05:17:03 servername upsd[1303]: Running as foreground process,<br>
> >>> >> not saving a PID file<br>
> >>> >> Jan 19 05:17:03 servername nut-server[1303]: Running as foreground<br>
> >>> >> process, not saving a PID file<br>
> >>> >><br>
> >>> >> ● nut-monitor.service - Network UPS Tools - power device monitor and<br>
> >>> >> shutdown controller<br>
> >>> >> Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled;<br>
> >>> >> preset: enabled)<br>
> >>> >> Active: active (running) since Fri 2024-01-19 03:37:28 CET; 1h 41min ago<br>
> >>> >> Main PID: 847 (upsmon)<br>
> >>> >> Tasks: 2 (limit: 38253)<br>
> >>> >> Memory: 3.4M<br>
> >>> >> CPU: 338ms<br>
> >>> >> CGroup: /system.slice/nut-monitor.service<br>
> >>> >> ├─847 /lib/nut/upsmon -F<br>
> >>> >> └─849 /lib/nut/upsmon -F<br>
> >>> >> Jan 19 03:43:08 servername nut-monitor[849]: UPS Eaton@localhost on<br>
> >>> >> battery<br>
> >>> >> Jan 19 03:43:09 servername nut-monitor[916]: Network UPS Tools upsmon 2.8.0<br>
> >>> >> Jan 19 03:43:33 servername nut-monitor[849]: UPS Eaton@localhost on line<br>
> >>> >> power<br>
> >>> >> Jan 19 03:43:34 servername nut-monitor[920]: Network UPS Tools upsmon 2.8.0<br>
> >>> >> Jan 19 05:17:04 servername nut-monitor[849]: Poll UPS<br>
> >>> >> [Eaton@localhost] failed - Write error: Broken pipe<br>
> >>> >> Jan 19 05:17:04 servername nut-monitor[849]: Communications with UPS<br>
> >>> >> Eaton@localhost lost<br>
> >>> >> Jan 19 05:17:04 servername nut-monitor[1305]: Network UPS Tools upsmon<br>
> >>> >> 2.8.0<br>
> >>> >> Jan 19 05:17:09 servername nut-monitor[849]: Login on UPS<br>
> >>> >> [Eaton@localhost] failed - got [ERR ACCESS-DENIED]<br>
> >>> >> Jan 19 05:17:14 servername nut-monitor[849]: Communications with UPS<br>
> >>> >> Eaton@localhost established<br>
> >>> >> Jan 19 05:17:14 servername nut-monitor[1312]: Network UPS Tools upsmon<br>
> >>> >> 2.8.0<br>
> >>><br>
> >>><br>
> >>> --<br>
> >>> Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank" rel="noreferrer">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
> >>> Warning: I wish NOT to receive e-mail advertising to this address.<br>
> >>> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.<br>
> >>> Spam = (S)tupid (P)eople's (A)dvertising (M)ethod<br>
> >>><br>
> >>> _______________________________________________<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>
> >><br>
> >> _______________________________________________<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>
> ><br>
> >_______________________________________________<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>
><br>
> --<br>
> Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank" rel="noreferrer">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
> Warning: I wish NOT to receive e-mail advertising to this address.<br>
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.<br>
> Micro$oft random number generator: 0, 0, 0, 4.33e+67, 0, 0, 0...<br>
><br>
> _______________________________________________<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>
<br>
_______________________________________________<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>