dhclient for eth0 does never exit and retries dhcp foerever
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Snappy |
Medium
|
Unassigned | ||
| | isc-dhcp (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
When booting snappy without eth0 connected, dhclient runs forever trying to retrieve DHCP every 5 minutes.
dhclient is run with the -1 parameter which is supposed to try only once and exit after trying.
-1 Try to get a lease once. On failure exit with code 2. In
Though dhclient keeps running / does not exit.
If dhclient is changed to exit after failure, it must be insured that it will be restarted when the network interface gets a physical link.
| Oliver Grawert (ogra) wrote : | #1 |
| Oliver Grawert (ogra) wrote : | #2 |
simon: starting dhclient on connect should be done by ifup once the link exists and if allow-hotplug is set in /etc/network/
| Simon Eisenmann (longsleep) wrote : | #3 |
Oct 08 10:00:19 odroid dhclient[587]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 (xid=0xe7223b64)
Oct 08 10:00:19 odroid sh[578]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 (xid=0xe7223b64)
Oct 08 10:00:34 odroid dhclient[587]: No DHCPOFFERS received.
Oct 08 10:00:34 odroid dhclient[587]: No working leases in persistent database - sleeping.
Oct 08 10:00:34 odroid sh[578]: No DHCPOFFERS received.
Oct 08 10:00:34 odroid sh[578]: No working leases in persistent database - sleeping.
Oct 08 10:00:35 odroid sshd[836]: Received SIGHUP; restarting.
Oct 08 10:00:35 odroid systemd[1]: Reloaded OpenBSD Secure Shell server.
Oct 08 10:00:35 odroid sh[578]: ifup: interface eth0 already configured
Oct 08 10:00:35 odroid sshd[836]: Server listening on 0.0.0.0 port 22.
Oct 08 10:00:35 odroid sshd[836]: Server listening on :: port 22.
Now i killed dhclient for eth0
No dhclient is running now
Now i plug the network cable
Oct 08 10:03:17 odroid kernel: [adjust link] -> eth: full-duplex
Oct 08 10:03:17 odroid kernel: [adjust link] -> eth: phy_speed <> priv_speed)
Oct 08 10:03:17 odroid kernel: [adjust link -> eth: am_adjust_link state change (new_state=true)
Oct 08 10:03:17 odroid kernel: libphy: 0:01 - Link is Up - 1000/Full
Oct 08 10:03:17 odroid kernel: IPv6: ADDRCONF(
Thats it, still no dhclient is running for eth0. @Oliver : no dhclient is started if the link becomes ready
cat /etc/network/
allow-hotplug eth0
iface eth0 inet dhcp
| Launchpad Janitor (janitor) wrote : | #4 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in isc-dhcp (Ubuntu): | |
| status: | New → Confirmed |
I can confirm this behavior on my systems.
from syslog (identifying information removed):
Mar 23 19:10:41 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x3e38a8c2)
Mar 23 19:10:44 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x3e38a8c2)
Mar 23 19:10:52 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20 (xid=0x3e38a8c2)
Mar 23 19:11:12 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x3e38a8c2)
Mar 23 19:11:20 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 (xid=0x3e38a8c2)
Mar 23 19:11:33 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0x3e38a8c2)
Mar 23 19:11:42 HOSTNAME dhclient: No DHCPOFFERS received.
Mar 23 19:11:42 HOSTNAME dhclient: No working leases in persistent database - sleeping.
Mar 23 19:13:12 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x49984e3f)
Mar 23 19:13:15 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x49984e3f)
Mar 23 19:13:20 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0x49984e3f)
Mar 23 19:13:30 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0x49984e3f)
Mar 23 19:13:41 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17 (xid=0x49984e3f)
Mar 23 19:13:58 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0x49984e3f)
Mar 23 19:14:08 HOSTNAME dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x49984e3f)
Mar 23 19:14:13 HOSTNAME dhclient: No DHCPOFFERS received.
Mar 23 19:14:13 HOSTNAME dhclient: No working leases in persistent database - sleeping.
This repeats forever.
dhclient was launched by a script thusly: /sbin/dhclient -1 -nw eth0_20
/etc/dhcp/
option rfc3442-
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-
dhcp6.
netbios-
rfc3442-
dhcp6.fqdn, dhcp6.sntp-servers;
timeout 60;
retry 60;
initial-interval 3;
package isc-dhcp-client version 4.2.4-7ubuntu8
Is this fixed in the newer versions?
| Changed in snappy: | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Michael Vogt (mvo) wrote : | #6 |
Is this still an issue with core 16 and networkd?
| Changed in snappy: | |
| status: | Triaged → Incomplete |


dhclient.conf has "timeout 300" set by default in ubuntu so theoretically according to the manpge it should exit after 5min. this looks like a bug in dhclient itself