On 9/1/21 1:27 AM, bobby via Nut-upsuser wrote:
I am running nut server on a raspberry pi.  Doing a status after bootup, I see this: ● nut-server.service - Network UPS Tools - power devices information server    Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)    Active: failed (Result: exit-code) since Tue 2021-08-31 18:11:54 EDT; 48s ago
  Process: 448 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)

Aug 31 18:11:54 NUT upsd[448]: not listening on 192.168.2.105 port 3493
Aug 31 18:11:54 NUT upsd[448]: listening on 127.0.0.1 port 3493
Aug 31 18:11:54 NUT upsd[448]: no listening interface available
Aug 31 18:11:54 NUT upsd[448]: not listening on 192.168.2.105 port 3493
Aug 31 18:11:54 NUT upsd[448]: listening on 127.0.0.1 port 3493
Aug 31 18:11:54 NUT upsd[448]: no listening interface available
Aug 31 18:11:54 NUT upsd[448]: Network UPS Tools upsd 2.7.4
Aug 31 18:11:54 NUT systemd[1]: nut-server.service: Control process exited, code=exited, status=1/FAILURE Aug 31 18:11:54 NUT systemd[1]: nut-server.service: Failed with result 'exit-code'. Aug 31 18:11:54 NUT systemd[1]: Failed to start Network UPS Tools - power devices information server.

To try to fix this, I added to (root's) crontab:
@reboot    upsdrvctl start && upsd && systemctl start nut-server.service

This is completely useless.

- first of all that's not how you (re)start nut services on a machine that uses systemd;

- second the "&&" you used mean that should any of the early commands fail, the rest would not get executed at all ( And I am pretty sure that the "upsdrvctl start" fails spectacularly ; you should start the nut-driver service if you insist on doing that manually rather than letting systemd start it via the requirements enforced by the nut-server service) ;

- and last but not least,  starting upsd ( ... with proper arguments ) is exactly what nut-server.service is supposed to do.



But it still fails to start on boot up.

Because you did not fix the underlying issue. The " no listening interface available" lines seem to indicate that either your network does not start at all or you have configured nut to use incorrect IP addresses. Start debugging by checking the parts from the boot logs that mention the network interfaces.


_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to