You are not logged in.

#1 2012-10-16 09:43:33

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

[SOLVED] dhcpcd@eth0.service failure

I am trying to move from initscripts to systemd on a server I have no physical access to (luckily I do have a rescue system...).
With only network left in DAEMONS, connectivity comes up just fine, and I see a "dhcpcd -q" process running in the background.
However, removing that last initscripts daemon and using dhcpcd@eth0.service fails.

The server has eth0 only and a static IP.

% sudo systemctl start dhcpcd@eth0.service
Job for dhcpcd@eth0.service failed. See 'systemctl status dhcpcd@eth0.service' and 'journalctl' for details.
% systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
	  Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
	  Active: failed (Result: resources) since Tue, 16 Oct 2012 11:26:05 +0200; 44s ago
	 Process: 14105 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/dhcpcd@.service/eth0

Oct 16 11:26:05 cutie.skaaf.net systemd[1]: Starting dhcpcd on eth0...
Oct 16 11:26:05 cutie.skaaf.net systemd[1]: Failed to start dhcpcd on eth0.

The relevant part of journalctl comes in two shapes, I'm not sure what that depends on.

Oct 16 11:26:05 xxx systemd[1]: Starting dhcpcd on eth0...
Oct 16 11:26:05 xxx dhcpcd[14105]: sending commands to master dhcpcd process
Oct 16 11:26:05 xxx dhcpcd[314]: control command: dhcpcd[14105]: sending commands to master dhcpcd process
Oct 16 11:26:05 xxx dhcpcd[314]: handle_args: no interface
Oct 16 11:26:05 xxx dhcpcd[314]: control command: /sbin/dhcpcd -A -q -w eth0
Oct 16 11:26:05 xxx systemd[1]: PID file /run/dhcpcd-eth0.pid not readable (yet?) after start.
Oct 16 11:26:05 xxx systemd[1]: Failed to start dhcpcd on eth0.
Oct 16 11:26:05 xxx systemd[1]: Unit dhcpcd@eth0.service entered failed state.

and

Oct 16 11:27:14 xxx systemd[1]: Starting dhcpcd on eth0...
Oct 16 11:27:14 xxx dhcpcd[14145]: sending commands to master dhcpcd process
Oct 16 11:27:14 xxx dhcpcd[314]: control command: dhcpcd[14145]: sending commands to master dhcpcd process
Oct 16 11:27:14 xxx systemd[1]: PID file /run/dhcpcd-eth0.pid not readable (yet?) after start.
Oct 16 11:27:14 xxx systemd[1]: Failed to start dhcpcd on eth0.
Oct 16 11:27:14 xxx systemd[1]: Unit dhcpcd@eth0.service entered failed state.

Now maybe this is trying to tell me that dhcpcd is already running? However the result is the same with "systemctl restart ...".
Upon boot up with no network DAEMON but dhcpcd@eth0.service enabled, I simply can't get in.
I also tried editing /usr/lib/systemd/system/dhcpcd\@.service and making everything explicit in ExecStart, but I don't see any more useful output, and systemctl still claims the start failed.
Running dhcpcd eth0 explicitly gives no error exit code:

 % sudo dhcpcd eth0
dhcpcd[14347]: sending commands to master dhcpcd process

Questions:
- why does systemctl think the start failed?
- can I find any more debugging info anywhere? Perhaps reboot with sytemd dhcpcd only and redirect journalctl logs to a text file that I can then view from the rescue system?
- why does network DAEMON manage to start dhcpcd, while systemd fails?

Thanks for any help or pointers in advance!

Last edited by nickray (2012-10-16 12:13:41)


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#2 2012-10-16 10:20:36

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,783

Re: [SOLVED] dhcpcd@eth0.service failure

Why are you running dhcpcd if you have a static IP? The "d" stands for dynamic, the opposite of static.

You might want to look at the part of the systemd wiki page that addresses static IP addresses.

Offline

#3 2012-10-16 10:58:42

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: [SOLVED] dhcpcd@eth0.service failure

The network.service file referenced there does not exist (although it can be found in Google's cache, I'm trying this in parallel now).
This has more information https://bbs.archlinux.org/viewtopic.php?pid=1110003

On the other hand, I'm lazy w.r.t. to learning too much about networking, so I was hoping that dhcpcd would work as packaged / zero config.
In the end, it should work even if it wastes a daemon, since "network" manages to start it.
The references in the systemd wiki are a bit too cryptic to me: "Sometimes the dhcpd service starts before your network card module (FS#30235), manually add your network card to /etc/modules-load.d/*.conf"


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#4 2012-10-16 11:07:30

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,783

Re: [SOLVED] dhcpcd@eth0.service failure

nickray wrote:

In the end, it should work even if it wastes a daemon, since "network" manages to start it.

Even if dhcpcd started, it wouldn't DO anything unless you had a DHCP server it could get an address from. That's how DHCP works. It's not just going to magically know your IP address.

The wiki section I was referring it is rather short, but it's here: https://wiki.archlinux.org/index.php/Sy … igurations

Last edited by Scimmia (2012-10-16 11:09:00)

Offline

#5 2012-10-16 11:25:41

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: [SOLVED] dhcpcd@eth0.service failure

It seems that using the ethernet-static profile of netcfg is the "supported" solution, replacing the deleted scripts:
(having said this, the dates of https://wiki.archlinux.org/index.php?ti … did=201219 and
https://bbs.archlinux.org/viewtopic.php … 3#p1110003 don't quite add up wink ).

However, this solution also doesn't work for me so far.

So the question remains:
- how to debug such a systemd problem remotely?
- re. DHCP server, it seems that there is one available, or how does the old network daemon do this?

Thanks for your help so far!
Any other ideas? I'll be happy to add my findings to the relevant wiki pages to help others.
Obviously the whole systemd/networking part of the wiki is a work in progress...


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#6 2012-10-16 11:39:22

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: [SOLVED] dhcpcd@eth0.service failure

I solved this problem for myself (typo'd systemctl enable netcfg@ethernet-statice.service, with an extra e...).
Should I mark it as [SOLVED], since the original problem is *not* solved?

For the record, it seems systemd keeps logs in /var/log/messages.log by default.

Is there a way to do the "systemctl enable" from a rescue system (by editing some file), as was
possible before with /etc/rc.conf? Otherwise I would never have been able to solve this smile.

Scimmia, any pointers to read more about the DHCD/DHCPCD issues?


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#7 2012-10-16 11:39:56

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,837

Re: [SOLVED] dhcpcd@eth0.service failure

I use netcfg with an appropriate profile for static IP configuration, works fine. We need a  bit more than "doesn't work for me so far" if you want to get a useful answer.

IMO you're confusing yourself by continuing to focus on dhcp - if you want a static IP, set up a static IP. You can learn more about networking some other time, when you're not as lazy.

Last edited by tomk (2012-10-16 11:50:24)

Offline

#8 2012-10-16 11:52:31

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,783

Re: [SOLVED] dhcpcd@eth0.service failure

Glad you got it working. I would go ahead and mark it as solved.

nickray wrote:

Is there a way to do the "systemctl enable" from a rescue system (by editing some file), as was
possible before with /etc/rc.conf? Otherwise I would never have been able to solve this smile.

When you do a systemctl enable, it shows you what it's doing, making a symlink. If you need to do it by hand, you just have to make the appropriate symlink in /etc/systemd/system to the service file in /usr/lib/systemd/system

nickray wrote:

Scimmia, any pointers to read more about the DHCD/DHCPCD issues?

The place I usually start is Wikipedia: http://en.wikipedia.org/wiki/Dhcp

To put it simply, it lets a DHCP client (dhcpcd = dhcp client daemon) request networking information from a DHCP server. The server selects an IP from the pool of IP addresses that it has, and sends that information back to the client along with all the other needed network configuration info. The client automatically configures everything and you're up and running without having to do any manual configuration at all.

Offline

#9 2012-10-16 11:56:12

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: [SOLVED] dhcpcd@eth0.service failure

Quite right. It seemed easier to use dhcp instead of finding out the necessary details to configure the static IP myself (I really have no background in networking...).
But it's nice to now have a clean simple configuration with netcfg.

So one last question to wrap this up:
To find out the correct gateway to enter in /etc/network.d/examples/ethernet-static, is "ip neigh" the correct replacement for the deprecated "route -n"?
I'm asking because then that might be added to the netcfg wiki.


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

#10 2012-10-16 12:14:06

nickray
Member
From: Switzerland
Registered: 2012-04-02
Posts: 8

Re: [SOLVED] dhcpcd@eth0.service failure

Thanks everyone for the help! I think I'm starting to even like systemd...


dd if=archlinux-XXX.iso of=/dev/sdX

Offline

Board footer

Powered by FluxBB