Daniel Shields
2017-Oct-22 06:39 UTC
[Nut-upsuser] nut-server service fails to start at boot
Hello, I have a Raspberry Pi model B running Raspbian Stretch. I have installed version 2.7.4-5 of nut from the raspbian repos. I have a CyberPower 1500PFCLCD UPS. When I reboot the Pi, the nut-server service fails to start. root at nut:~# service nut-server status ? 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 Sun 2017-10-22 05:57:37 UTC; 5min ago Process: 341 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE) Oct 22 05:57:37 nut.tklapp.com upsd[341]: fopen /var/run/nut/upsd.pid: No such file or directory Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493 Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available Oct 22 05:57:37 nut.tklapp.com upsd[341]: Network UPS Tools upsd 2.7.4 Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Control process exited, code=exited status=1 Oct 22 05:57:37 nut.tklapp.com systemd[1]: Failed to start Network UPS Tools - power devices information server. Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Unit entered failed state. Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Failed with result 'exit-code'. root at nut:~# I have looked through the syslogs, but have not been able to find anything obvious. I have attached an excerpt from the syslog from when the server is rebooted and the nut-server service fails. Any help or advice is greatly appreciated. Thanks! Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171022/6e6b6615/attachment-0001.html> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Nut Syslog 22OCT17.txt URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171022/6e6b6615/attachment-0001.txt>
Charles Lepple
2017-Oct-22 12:39 UTC
[Nut-upsuser] nut-server service fails to start at boot
On Oct 22, 2017, at 2:39 AM, Daniel Shields <grungelizard9 at hotmail.com> wrote:> > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available >I think you're hitting this race condition: https://github.com/networkupstools/nut/issues/393 Using the LISTEN directive to selectively ignore certain interfaces worked a lot better when 1) we didn't have to worry about interfaces being removed and added at runtime and 2) when NUT was guaranteed to start after all of the network interfaces were already up. Can you just use "LISTEN 0.0.0.0"? If there is one particular interface you are excluding, can you handle that with firewall rules?
Manuel Wolfshant
2017-Oct-22 13:41 UTC
[Nut-upsuser] nut-server service fails to start at boot
On 10/22/2017 09:39 AM, Daniel Shields wrote:> > Hello, > > ???? I have a Raspberry Pi model B running Raspbian Stretch.? I have > installed version 2.7.4-5 of nut from the raspbian repos.? I have a > CyberPower 1500PFCLCD UPS. When I reboot the Pi, the nut-server > service fails to start. > > root at nut:~# service nut-server status > > ? 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 Sun 2017-10-22 05:57:37 > UTC; 5min ago > > ? Process: 341 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE) > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: fopen /var/run/nut/upsd.pid: > No such file or directory > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on > 192.168.213.189 port 3493 > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on > 192.168.213.189 port 3493 > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493 > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available > > Oct 22 05:57:37 nut.tklapp.com upsd[341]: Network UPS Tools upsd 2.7.4 > > Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Control > process exited, code=exited status=1 > > Oct 22 05:57:37 nut.tklapp.com systemd[1]: Failed to start Network UPS > Tools - power devices information server. > > Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Unit > entered failed state. > > Oct 22 05:57:37 nut.tklapp.com systemd[1]: nut-server.service: Failed > with result 'exit-code'. > > root at nut:~# > > I have looked through the syslogs, but have not been able to find > anything obvious. > > I have attached an excerpt from the syslog from when the server is > rebooted and the nut-server service fails.? Any help or advice is > greatly appreciated.? Thanks! >Can you please try replacing "after=network.target" with "after=network-online.target" ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171022/789431c4/attachment.html>
Daniel Shields
2017-Oct-23 15:26 UTC
[Nut-upsuser] nut-server service fails to start at boot
Thanks Charles, Looks like setting LISTEN to 0.0.0.0 did the trick. I use iptables so no worries on the filtering. Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Charles Lepple<mailto:clepple at gmail.com> Sent: Sunday, October 22, 2017 8:39 AM To: Daniel Shields<mailto:GRUNGELIZARD9 at HOTMAIL.COM> Cc: nut-upsuser at lists.alioth.debian.org<mailto:nut-upsuser at lists.alioth.debian.org> Subject: Re: [Nut-upsuser] nut-server service fails to start at boot On Oct 22, 2017, at 2:39 AM, Daniel Shields <grungelizard9 at hotmail.com> wrote:> > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: not listening on 192.168.213.189 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: listening on 127.0.0.1 port 3493 > Oct 22 05:57:37 nut.tklapp.com upsd[341]: no listening interface available >I think you're hitting this race condition: https://github.com/networkupstools/nut/issues/393 Using the LISTEN directive to selectively ignore certain interfaces worked a lot better when 1) we didn't have to worry about interfaces being removed and added at runtime and 2) when NUT was guaranteed to start after all of the network interfaces were already up. Can you just use "LISTEN 0.0.0.0"? If there is one particular interface you are excluding, can you handle that with firewall rules? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171023/ec84b12a/attachment.html>