You are not logged in.

#1 2016-03-05 14:30:34

ahura
Member
Registered: 2016-02-20
Posts: 57

[solved] Can't start dhcpcd with systemctl

Hi there.

I'm learning Arch and reading up on system maintenance on the Wiki. systemctl --failed shows me the following:

UNIT                    LOAD   ACTIVE SUB    DESCRIPTION
● dhcpcd@enp1s0f1.service loaded failed failed dhcpcd on enp1s0f1

To investigate, I try to start it with sudo systemctl start dhcpcd@enp1s0f1.service which gives me

Job for dhcpcd@enp1s0f1.service failed because a configured resource limit was exceeded. See "systemctl status dhcpcd@enp1s0f1.service" and "journalctl -xe" for details.

I run journalctl -xe which shows the following

Mar 05 14:49:30 ahura dhcpcd[4261]: open `/run/dhcpcd.pid': Permission denied
Mar 05 14:49:30 ahura dhcpcd[4261]: control_start: No such file or directory
Mar 05 14:49:30 ahura dhcpcd[4261]: dev: loaded udev
Mar 05 14:49:30 ahura dhcpcd[4261]: write_path: /proc/sys/net/ipv6/conf/wlp2s0/autoconf: Permission denie
Mar 05 14:49:30 ahura dhcpcd[4261]: DUID 00:01:00:01:1e:5b:37:45:a4:34:d9:09:61:72
Mar 05 14:49:30 ahura dhcpcd[4261]: wlp2s0: IAID d9:09:61:72
Mar 05 14:49:30 ahura dhcpcd[4261]: enp1s0f1: if_up: Operation not permitted
Mar 05 14:49:30 ahura dhcpcd[4261]: enp1s0f1: waiting for carrier
Mar 05 14:49:31 ahura dhcpcd[4261]: dhcp_start1: dhcp_openudp: Permission denied
Mar 05 14:49:31 ahura dhcpcd[4261]: dhcp_open: wlp2s0: Operation not permitted
Mar 05 14:49:36 ahura dhcpcd[4261]: received SIGINT, stopping
Mar 05 14:49:36 ahura dhcpcd[4261]: enp1s0f1: removing interface
Mar 05 14:49:36 ahura dhcpcd[4261]: wlp2s0: removing interface
Mar 05 14:49:36 ahura dhcpcd[4261]: dhcpcd exited
Mar 05 14:52:13 ahura dhcpcd[4272]: dhcpcd not running

I'm not sure how to fix this after reading the Wiki entries on dhcpcd and systemctl. Any help is greatly appreciated.

Last edited by ahura (2016-03-07 15:21:10)

Offline

#2 2016-03-05 14:36:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [solved] Can't start dhcpcd with systemctl

It looks like you already had dhcpcd running for a wireless connection.  I'm not sure if dhdpcd can run on multiple interfaces at the same time - even if it can, I'd be surprised if it didn't take some particular customizations.

Do you intend to connect via wired or wireless networking?  Did you have a working network connection before this investigation?  It's possible you were runing dhcpcd on any available interface, and if you only had wireless when it started the failure on a wired interface is not unusual and not a problem.

Overall, you'll need to tell us more about your set up, how you connect, all of what services are enabled, and whether there is an actual problem.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2016-03-07 11:11:25

ahura
Member
Registered: 2016-02-20
Posts: 57

Re: [solved] Can't start dhcpcd with systemctl

Okay, it's possible that I misunderstood the network section in the beginner's guide, as I followed both the section on wired and wireless connections. I mainly use wireless, but I'd like to be able to connect with a cable as well. Both wired and wireless connections work fine. ip link lists the following interfaces:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 80:fa:5b:21:86:c5 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether a4:34:d9:09:61:72 brd ff:ff:ff:ff:ff:ff

Offline

#4 2016-03-07 11:44:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [solved] Can't start dhcpcd with systemctl

ahura wrote:

Both wired and wireless connections work fine.

So what's the problem?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2016-03-07 12:14:55

ahura
Member
Registered: 2016-02-20
Posts: 57

Re: [solved] Can't start dhcpcd with systemctl

I'm just following the advice from the Wiki on system maintenance which says to look for errors with systemctl --failed once in a while. This turned up so I wanted to figure out what to do (if anything).

Offline

#6 2016-03-07 12:18:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [solved] Can't start dhcpcd with systemctl

Trilby wrote:

It's possible you were runing dhcpcd on any available interface, and if you only had wireless when it started the failure on a wired interface is not unusual and not a problem.

You set up your netoworking to try to connect to wired and/or wireless as each one is avialble, right?  And at the time you ran that systemctl command there was no ethernet cable connected, right?  If so, of course dhcpcd fails on the wired interface.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2016-03-07 12:26:37

ahura
Member
Registered: 2016-02-20
Posts: 57

Re: [solved] Can't start dhcpcd with systemctl

Okay, I got the impression from the system maintenance wiki that any error printed by systemctl --failed meant there was a problem. Is it good practice to just ignore that error, then?

Offline

#8 2016-03-07 12:37:26

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: [solved] Can't start dhcpcd with systemctl

Why not just stop/disable the service for the interface you are not using?

Offline

#9 2016-03-07 12:53:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [solved] Can't start dhcpcd with systemctl

ahura wrote:

Okay, I got the impression from the system maintenance wiki that any error printed by systemctl --failed meant there was a problem. Is it good practice to just ignore that error, then?

You can ignore this failed message as you expect it to be there.  Checking for failed services is a good idea - but that is a source of information and you have to think about what it means.

I'd disagree with loqs.  If you periodically use wired networking, then don't disable that service.  It will connect when it can and fail when it can't - again, this is exactly what you'd expect.  Stopping the service would also be pointless: it's already stopped once it has failed.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2016-03-07 14:43:17

ahura
Member
Registered: 2016-02-20
Posts: 57

Re: [solved] Can't start dhcpcd with systemctl

Okay, I disabled the service but I can still connect both wired and wireless. I'm running NetworkManager, so I'm guessing this that it takes care of both connection methods automatically, whereas I thought it depended on the dhcpcd daemon that the beginner's guide told me to set up.
Is that correct and if so, I guess it's fine to disable dhcpcd?

Offline

#11 2016-03-07 15:14:14

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: [solved] Can't start dhcpcd with systemctl

Correct NetworkManager does not depend upon dhcpcd or more speciffically dhcpcd@*.services you created.
If you look at NetworkManagers dependencies they include dhclient and wpa_supplicant but I believe again it calls the executables directly without using systemd services.

Offline

#12 2016-03-07 15:20:53

ahura
Member
Registered: 2016-02-20
Posts: 57

Re: [solved] Can't start dhcpcd with systemctl

Thank you. Marking thread solved.

Offline

Board footer

Powered by FluxBB