Red Hat Bugzilla – Bug 1476999
ddclient doesn't wait until network is online
Last modified: 2017-08-10 00:58:41 EDT
Description of problem:
ddclient does not wait until the network is online before starting and retrieving the public IP address. The systemd unit is configured to start after 'network.target' (/usr/lib/systemd/system/ddclient.service):
After=syslog.target network.target nss-lookup.target
However, after booting, often, the service cannot get online to determine its public IP address. Typing `sudo systemctl status ddclient.service` shows DNS errors looking up the hostname for the public IP service.
I believe this is caused by the service starting up too quickly, and not waiting for the network to come online ('network.target' comes up immediately after 'network-pre.target').
It may be better for it to specify 'Wants=network-online.target'. At the very least, 'After=network-online.target' would be better.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure ddclient with lookup service for public IP (for example: `use=web, web=dynamicdns.park-your-domain.com/getip`)
3. sudo systemctl status ddclient.service
Sometimes see errors resolving hostname, because ddclient started before the network was fully available.
ddclient should wait until the network is online. There should be no issues resolving the DNS name because the host should be online.
I started seeing this problem in F24, but in F26, it's worse, perhaps because F26 seems to boot faster (for me). In F25, the problem would occur after boot about 30% of the time. In F26, it's closer to 100% of the time. I have an SSD, so my boot times are very fast. The workaround is to restart the service: `sudo systemctl restart ddclient.service`
I presume you don't use NetworkManager? There's supposed to be a hook that starts ddclient when NetworkManager connects to a network, but that wouldn't help if you don't use it.
No, I definitely am using NetworkManager. I don't know about the hook you speak of. I'm using the systemd unit which comes with the ddclient package in Fedora. The only "hook" I know of is the network-online.target which is set by NetworkManager when the network connects. ddclient isn't waiting for this, though... it's waiting for just network.target