View previous topic :: View next topic |
Author |
Message |
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Wed Aug 27, 2014 11:47 pm Post subject: [solved]systemd/udev dhcpcd bailing out on boot |
|
|
A little puzzler. This happens on both my home and work PC, very occasionally. Similar builds of Gentoo running systemd:
Code: | Aug 27 19:34:28 gentoopc dhcpcd[2966]: dev: loaded udev
Aug 27 19:34:28 gentoopc dhcpcd[2966]: no valid interfaces found
Aug 27 19:34:28 gentoopc dhcpcd[2966]: no interfaces have a carrier
Aug 27 19:34:28 gentoopc dhcpcd[2966]: lo: unsupported interface type 00, falling back to ethernet
Aug 27 19:34:28 gentoopc dhcpcd[2966]: lo: adding address fe80::c51:6906:1cbc:a26f
Aug 27 19:34:28 gentoopc dhcpcd[2966]: if_addaddress6: No such device
Aug 27 19:34:28 gentoopc dhcpcd[2966]: DUID 00:01:00:01:1a:ad:2e:11:00:24:1d:6b:cb:c9
Aug 27 19:34:28 gentoopc dhcpcd[2966]: lo: IAID 00:00:01:00
Aug 27 19:34:28 gentoopc dhcpcd[2966]: sit0: unsupported interface type 308, falling back to ethernet
Aug 27 19:34:28 gentoopc dhcpcd[2966]: sit0: adding address fe80::faa7:fd20:a2f8:24fb
Aug 27 19:34:28 gentoopc dhcpcd[2966]: sit0: waiting for carrier
Aug 27 19:34:28 gentoopc dhcpcd[2966]: enp3s0: adding address fe80::3bf2:8d7b:4805:913f
Aug 27 19:34:28 gentoopc dhcpcd[2966]: enp3s0: waiting for carrier
Aug 27 19:34:28 gentoopc dhcpcd[2966]: enp3s0: waiting for carrier
Aug 27 19:34:28 gentoopc dhcpcd[2966]: enp3s0: removing interface
Aug 27 19:34:28 gentoopc dhcpcd[2966]: sit0: carrier acquired
Aug 27 19:34:29 gentoopc dhcpcd[2966]: sit0: IAID 00:00:00:00
Aug 27 19:34:29 gentoopc dhcpcd[2966]: sit0: soliciting a DHCP lease
Aug 27 19:34:29 gentoopc dhcpcd[2966]: lo: needs a clientid to configure
Aug 27 19:34:29 gentoopc dhcpcd[2966]: lo: soliciting an IPv6 router
Aug 27 19:38:20 gentoopc dhcpcd[2966]: received signal TERM from PID 1, stopping
Aug 27 19:38:20 gentoopc dhcpcd[2966]: sit0: removing interface
Aug 27 19:38:20 gentoopc dhcpcd[2966]: lo: removing interface
Aug 27 19:38:20 gentoopc systemd[1]: dhcpcd.service: main process exited, code=exited, status=1/FAILURE
Aug 27 19:38:20 gentoopc systemd[1]: Unit dhcpcd.service entered failed state.
Aug 27 19:38:20 gentoopc dhcpcd[3715]: version 6.4.3 starting
Aug 27 19:38:20 gentoopc dhcpcd[3715]: dev: loaded udev
Aug 27 19:38:20 gentoopc dhcpcd[3715]: DUID 00:01:00:01:1a:ad:2e:11:00:24:1d:6b:cb:c9
Aug 27 19:38:20 gentoopc dhcpcd[3715]: enp3s0: IAID 1d:6b:cb:c9
Aug 27 19:38:20 gentoopc dhcpcd[3715]: enp3s0: rebinding lease of 10.0.0.200
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: soliciting an IPv6 router
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: Router Advertisement from fe80::ba9b:c9ff:fecb:e0c2
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: adding address 2601:7:8080:870:5b51:9eb3:e232:5d3f/64
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: adding route to 2601:7:8080:870::1/64
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: adding default route via fe80::ba9b:c9ff:fecb:e0c2
Aug 27 19:38:21 gentoopc dhcpcd[3715]: enp3s0: soliciting a DHCPv6 lease
Aug 27 19:38:25 gentoopc dhcpcd[3715]: enp3s0: leased 10.0.0.200 for 604800 seconds
Aug 27 19:38:25 gentoopc dhcpcd[3715]: enp3s0: adding route to 10.0.0.0/24
Aug 27 19:38:25 gentoopc dhcpcd[3715]: enp3s0: adding default route via 10.0.0.1
Aug 27 19:38:41 gentoopc dhcpcd[3715]: enp3s0: ADV 2601:7:8080:870:aa4d:7f9a:e920:a49b/128 from fe80::ba9b:c9ff:fecb:e0c2
Aug 27 19:38:51 gentoopc dhcpcd[3715]: enp3s0: REPLY6 received from fe80::ba9b:c9ff:fecb:e0c2
Aug 27 19:38:51 gentoopc dhcpcd[3715]: enp3s0: adding address 2601:7:8080:870:aa4d:7f9a:e920:a49b/128
Aug 27 19:38:51 gentoopc dhcpcd[3715]: enp3s0: renew in 144991 seconds, rebind in 231985 seconds
|
Essentially dhcpcd.service bails out having failed to work, because the interface isn't up yet; my gut feeling is udev isn't giving it enough time.
It's intermittent, and solved easily by restarting dhcpcd.service. I'm just wondering why this is happening, and it anyone else encounters it?
Last edited by Sulman on Wed Sep 10, 2014 2:49 am; edited 1 time in total |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Sun Aug 31, 2014 11:37 am Post subject: |
|
|
I thought that was strange too. Systemd was updated by an emerge @world recently so maybe that will fix it. |
|
Back to top |
|
|
zeronullity Tux's lil' helper
Joined: 16 Oct 2010 Posts: 103
|
Posted: Mon Sep 01, 2014 1:37 am Post subject: |
|
|
[REMOVED UNRELATED ISSUE]
Last edited by zeronullity on Fri Sep 05, 2014 10:40 am; edited 3 times in total |
|
Back to top |
|
|
deefster Tux's lil' helper
Joined: 19 Apr 2004 Posts: 77
|
Posted: Mon Sep 01, 2014 2:56 am Post subject: |
|
|
Have you tried NetworkManager? I myself used dhcpcd for years under the old rc style boot, but NetworkManager seems to work a bit better with systemd and parallel booting. |
|
Back to top |
|
|
zeronullity Tux's lil' helper
Joined: 16 Oct 2010 Posts: 103
|
Posted: Mon Sep 01, 2014 9:23 am Post subject: |
|
|
deefster wrote: | Have you tried NetworkManager? I myself used dhcpcd for years under the old rc style boot, but NetworkManager seems to work a bit better with systemd and parallel booting. |
I can usually work around most problems.. it's just unusual to get so many problems at once when no changes to use flags or config files were made. It's mostly likely a combination of package updates and useflags that didn't cause a problem before, however due to package changes are now causing major issues. I'll just have to solve them one by one until I can get a clear picture of just what happened. idk, just a waste of time regardless. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
deefster Tux's lil' helper
Joined: 19 Apr 2004 Posts: 77
|
Posted: Mon Sep 01, 2014 5:32 pm Post subject: |
|
|
I guess YMMV, I myself had issues with for example apache trying to fire up before the network was there.
UberLord wrote: | deefster wrote: | Have you tried NetworkManager? I myself used dhcpcd for years under the old rc style boot, but NetworkManager seems to work a bit better with systemd and parallel booting. |
dhcpcd works fine on a Debian/systemd system starting very early without any of these reported problems.
I'll try sytemd on my Gentoo installation at some point just to check. |
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
zeronullity Tux's lil' helper
Joined: 16 Oct 2010 Posts: 103
|
Posted: Mon Sep 01, 2014 11:12 pm Post subject: |
|
|
[REMOVED UNRELATED ISSUE]
Last edited by zeronullity on Fri Sep 05, 2014 10:40 am; edited 10 times in total |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Wed Sep 10, 2014 2:49 am Post subject: |
|
|
Actually, I found a solution on the Arch wiki.
Using just dhcpd.service can cause a race condition, as outlined here: https://wiki.archlinux.org/index.php/Dhcpcd#dhcpcd_and_systemd_network_interfaces
The solution was to copy the service file with the interface name following the @ symbol:
Code: | cp dhcpcd.service dhcpcd@[interface name].service |
You have to reload them or trying to enable the new service will fail (systemd is a binary, remember?)
Code: | systemctl daemon-reload |
Then enable the new service unit, and disable the original. This ensures that it's bound to that interface and it behaves itself. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Wed Sep 10, 2014 12:27 pm Post subject: |
|
|
UberLord wrote: |
dhcpcd has a udev plugin so the race condition can never happen.
If you think it's racing then it's a problem with systemd-udev reporting the wrong things. |
Yes, you're right - that's what the article mentions. |
|
Back to top |
|
|
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Wed Sep 10, 2014 3:17 pm Post subject: |
|
|
...And it turns out it doesn't work, after many reboot tests. It's blind luck.
I've given up fighting this brave new world and instead have configured systemd-networkd, as God and/or Lennart Poettering intended. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Sep 10, 2014 8:05 pm Post subject: |
|
|
Is there anymore context you can post?
I just followed the Gentoo guide to installing systemd (running amd64 stable here) and dhcpcd worked perfectly - admittedly it was started after the interfaces were renamed.
So my questions are these
1) Is your systemd modified anyhow?
2) Is your dhcpcd systsemd service modified anyhow?
3) Can you post a full bootlog (enail me privately if you wish) instead of a snippet? _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
Sulman n00b
Joined: 15 Feb 2014 Posts: 63
|
Posted: Wed Sep 10, 2014 8:10 pm Post subject: |
|
|
UberLord wrote: | Is there anymore context you can post?
I just followed the Gentoo guide to installing systemd (running amd64 stable here) and dhcpcd worked perfectly - admittedly it was started after the interfaces were renamed.
So my questions are these
1) Is your systemd modified anyhow?
2) Is your dhcpcd systsemd service modified anyhow?
3) Can you post a full bootlog (enail me privately if you wish) instead of a snippet? |
Sure, if I get a moment I'll try and hunt down a few boot logs.
There's nothing unusual, it's literally a wired ethernet connection with dhcpcd.service enabled (I like the simplicity of it) but udev-systemd appears to periodically cause a snag. |
|
Back to top |
|
|
|