Red Hat Bugzilla – Bug 852335
nut-server.service fails to start at boot when nut is configured in netserver mode
Last modified: 2013-01-14 15:19:54 EST
Created attachment 607443 [details]
log excerpt from /var/log/messages at boot
Description of problem:
When nut is running in netserver mode, nut-server.service fails to start at system boot. Running `systemctl start nut-server.service` after boot completes works fine.
In upsd.conf, I have nut set to listen on localhost and 192.168.1.102. The machine gets that address from DHCP, but it is always the same, so hard-coding it shouldn't be an issue (Oddly nut seems to have no option to specify an interface without knowing its ip).
Despite the nut-server.service file having "After=network.target", the service gets started before network manager, causing it to fail because the network interface isn't up yet. I'm not sure if this is a bug with the service files, or a bug with systemd.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install nut and configure in netserver mode.
2. Set listen address to network interface's ip and enable start at boot.
Service doesn't start as expected. nut-driver and nut-monitor services still load.
nut-server service starts andl functions as configured.
Log file is attached.
I've just tried switching to a manual address instead of DHCP, but the same problem is still happening. nut-server still tries to start before NetworkManager brings up the interface.
please attach /var/log/boot.log
Created attachment 610339 [details]
Looking at boot.log, nut starts after NetworkManager.
The problem is that "After=network.target" is quite useless. It does not mean the network is ready. What it means is that NetworkManager has started, but not necessarily that all interfaces were brought up. We can't change the "After=" to anything, because there is no "online.target" or anything that would trigger when network is really usable. Unfortunately, this is one of the design flaws.
Does "systemctl enable NetworkManager-wait-online.service" fix your issue?
No response, so closing.