You are not logged in.

#1 2020-01-26 21:15:31

jakub
Member
Registered: 2013-09-14
Posts: 151

[SOLVED] dhcpcd@enp10s0 is not starting at boot

I've messed something up trying to solve issue with duplicated connections in NetworkManager... And now the problem is that dhcpcd can't start during boot which makes boot itself to take additional 1m30s (timeout) longer.

➜  ~ sudo systemctl status dhcpcd@enp10s0.service
[sudo] password for kuba: 
● dhcpcd@enp10s0.service - dhcpcd on enp10s0
     Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled; vendor preset: disabled)
     Active: failed (Result: timeout) since Sun 2020-01-26 22:10:13 CET; 48s ago
    Process: 584 ExecStart=/usr/bin/dhcpcd -q -w enp10s0 (code=exited, status=0/SUCCESS)

sty 26 22:08:47 mayday dhcpcd[584]: forked to background, child pid 681
sty 26 22:08:47 mayday dhcpcd[681]: enp10s0: pid -1534387234 deleted route to 192.168.1.0/24
sty 26 22:08:47 mayday dhcpcd[681]: enp10s0: pid -423868181 deleted default route via 192.168.1.1
sty 26 22:08:47 mayday systemd[1]: dhcpcd@enp10s0.service: Can't open PID file /run/dhcpcd-enp10s0.pid (yet?) after start: Operation not permitted
sty 26 22:10:13 mayday systemd[1]: dhcpcd@enp10s0.service: start operation timed out. Terminating.
sty 26 22:10:13 mayday dhcpcd[681]: received SIGTERM, stopping
sty 26 22:10:13 mayday dhcpcd[681]: enp10s0: removing interface
sty 26 22:10:13 mayday dhcpcd[681]: dhcpcd exited
sty 26 22:10:13 mayday systemd[1]: dhcpcd@enp10s0.service: Failed with result 'timeout'.
sty 26 22:10:13 mayday systemd[1]: Failed to start dhcpcd on enp10s0.

But when system is actually running, my connection is up and I have internet access. I can also start manually dhcpcd:

➜  ~ sudo systemctl start dhcpcd@enp10s0.service 
➜  ~ sudo systemctl status dhcpcd@enp10s0.service
● dhcpcd@enp10s0.service - dhcpcd on enp10s0
     Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2020-01-26 22:13:17 CET; 898ms ago
    Process: 1950 ExecStart=/usr/bin/dhcpcd -q -w enp10s0 (code=exited, status=0/SUCCESS)
   Main PID: 1963 (dhcpcd)
      Tasks: 1 (limit: 19030)
     Memory: 2.0M
     CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@enp10s0.service
             └─1963 dhcpcd: enp10s0 [ip4]

sty 26 22:13:17 mayday systemd[1]: Starting dhcpcd on enp10s0...
sty 26 22:13:17 mayday dhcpcd[1950]: DUID 00:04:46:b8:fc:f0:2f:ec:7c:a7:da:22:d0:17:c2:ab:99:e6
sty 26 22:13:17 mayday dhcpcd[1950]: enp10s0: IAID c2:ab:99:e7
sty 26 22:13:17 mayday dhcpcd[1950]: enp10s0: rebinding lease of 192.168.1.155
sty 26 22:13:17 mayday dhcpcd[1950]: enp10s0: leased 192.168.1.155 for 43200 seconds
sty 26 22:13:17 mayday dhcpcd[1950]: enp10s0: adding route to 192.168.1.0/24
sty 26 22:13:17 mayday dhcpcd[1950]: enp10s0: adding default route via 192.168.1.1
sty 26 22:13:17 mayday dhcpcd[1950]: forked to background, child pid 1963
sty 26 22:13:17 mayday systemd[1]: Started dhcpcd on enp10s0.

PS. dhcpcd daemon is not running on all interfaces (not recommended as far as I know):

➜  ~ systemctl list-unit-files --state=enabled
UNIT FILE                                  STATE  
autovt@.service                            enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
display-manager.service                    enabled
docker.service                             enabled
getty@.service                             enabled
NetworkManager-dispatcher.service          enabled
NetworkManager-wait-online.service         enabled
NetworkManager.service                     enabled
sddm.service                               enabled
remote-fs.target                           enabled

10 unit files listed.

Last edited by jakub (2020-01-26 22:16:00)

Offline

#2 2020-01-26 22:02:18

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] dhcpcd@enp10s0 is not starting at boot

Did you configure networkmanager to stay away from enp10s0?
Do you have dhcpcd issues if you disable NM?

Why are you trying to use both itfp?

Offline

#3 2020-01-26 22:15:35

jakub
Member
Registered: 2013-09-14
Posts: 151

Re: [SOLVED] dhcpcd@enp10s0 is not starting at boot

Well, I was about to remove this thread as I just found out what's going on. Apparently I didn't understand Wiki good enough...

And correct me if I'm wrong, but my understanding is:
NM will take care of everything and there is no need to have dhcpcd installed. In my case I had dhcp=dhcpcd configured in NetworkManager.conf  (which should be fine, but at the same time I was trying to run dhcpcd service on enp10s0 interface).

For some time I was mislead this is working because dhcpcd@enp10s0 service was starting OK (I still don't know really what was going on). For sure networking wasn't working smoothly, as I was experiencing connections duplication problem, or some strange freezes "inside" nm applet when I was connecting/disconnecting to a network - maybe because dhcpcd was trying to kick in and do something on it's own in background while I manually disconnected from a network???

What I did is
- I removed dhcpcd package
- I removed dhcp=dhcpcd from NetworkManager config

I assume NetworkManager is using now it's default DHCP client which is dhclient.

Offline

#4 2020-01-26 22:20:20

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] dhcpcd@enp10s0 is not starting at boot

NM uses an internal dhcp implementation by default, if it works that's ok and you don't need anything else.
If it doesn't (they recently swapped the codebase, there's some reported friction) you can direct it to use dhpcd or dhclient.

In either case you MUST NOT enable or start further services like dhcpcd or dhcpcd@ - NM will invoke dhcpcd itself.
If you run concurrent interface managing services, they'll get into a race and knock out each other ("three stooges syndrome")

Offline

#5 2020-01-26 22:39:49

jakub
Member
Registered: 2013-09-14
Posts: 151

Re: [SOLVED] dhcpcd@enp10s0 is not starting at boot

seth thanks for additional explanation and quick reaction to my post

Last edited by jakub (2020-01-26 23:05:19)

Offline

Board footer

Powered by FluxBB