You are not logged in.
Hi everyone,
I have just installed Arch (64 bit) and am running on a dynamic, wired connection.
I followed the Beginners' Guide and enabled the dhcpcd service during the installation so that it would start automatically on boot.
systemctl enable dhcpcd@eth0.service
However, I currently must issue the command "dhcpcd" each boot before the internet starts to work.
Does anyone know how I can automate this process or if I need to further configure my network connection?
Thank you in advance.
Last edited by Ipozya (2012-11-15 11:29:05)
Offline
I shall tell you a workaround which i used.
1.I installed dhclient.
2. I set it up like
ip link set eth0 up
3.finally
dhclient eth0
Offline
Check the output from
# systemctl status dhcpcd@eth0.service
to debug the issue you're experiencing.
Offline
Check the output from
# systemctl status dhcpcd@eth0.service
to debug the issue you're experiencing.
% sudo systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: failed (Result: exit-code) since Tue, 2012-11-15 20:38:16 GMT; 27 sec ago
Process: 244 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/dhcpcd@.service/eth0
Nov 15 20:37:47 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
Nov 15 20:37:47 arch dhcpcd[244]: eth0: sendmsg: Cannot assign requested address
Nov 15 20:37:47 arch dhcpcd[244]: eth0: broadcasting for a lease
Nov 15 20:37:51 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
Nov 15 20:37:55 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
Nov 15 20:37:59 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
Nov 15 20:37:59 arch dhcpcd[244]: eth0: no IPv6 Routers available
Nov 15 20:38:16 arch dhcpcd[244]: timed out
Nov 15 20:38:16 arch systemd[1]: Failed to start dhcpcd on eth0.
Nov 15 20:38:16 arch systemd[1]: Unit dhcpcd@eth0.service entered failed state
Dhclient did not work automatically on boot either.
Others seem to have experienced similar issues but I don't see any real solutions in any of these posts, despite being marked as solved. For example, adding "-t 120" to the dhcpcd start line in /usr/lib/systemd/system/dhcpcd@.service did not work for me.
I also tried the following but it did not work either and I had to issue "dhcpcd" before internet started working.
Install and configure wired and wireless networking
# pacman -S netcfg ifplugd
# cd /etc/network.d
# ln -s examples/ethernet-dhcp .
Make sure the WIRED_INTERFACE and WIRELESS_INTERFACE lines is uncommented
# nano /etc/conf.d/netcfg
# systemctl enable net-auto-wired.service
# pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
# systemctl enable net-auto-wireless.service
https://bbs.archlinux.org/viewtopic.php?pid=1176656
https://bbs.archlinux.org/viewtopic.php?pid=1189587
https://bbs.archlinux.org/viewtopic.php?pid=1180192
Last edited by Ipozya (2012-11-15 21:08:03)
Offline
As I understand it, this should not be necessary but I have to disable ipv6 to get access at work. The way I think I do this right now is by having:
net.ipv6.conf.all.disable_ipv6 = 1
at the end of /etc/sysctl.conf. Basically, otherwise it only ever tries ipv6 and if your network only has ipv4, it just gives up and fails.
(I believe the network should respond in a way which prevents this - it works for me at home but at work, I need it disabled.)
On the other hand, I don't know why it would then work manually if this was the problem... just the errors looked familiar.
Last edited by cfr (2012-11-15 23:14:13)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I am also having the same problem dhcpcd service fails almost allways to connect me on boot, but after logging in and runing
sudo dhcpcd
everything is fine.
ismaelvc@toybox ~ $ systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: failed (Result: exit-code) since Thu, 2012-11-15 17:57:26 CST; 2h 16min ago
Process: 118 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/dhcpcd@.service/eth0
EDIT: By the way arch installation cd (from october), never fails to connect on boot.
output of dhcpcd:
ismaelvc@toybox ~ $ connect
[sudo] password for ismaelvc:
dhcpcd[477]: version 5.6.2 starting
dhcpcd[477]: eth0: sending IPv6 Router Solicitation
dhcpcd[477]: eth0: sendmsg: Cannot assign requested address
dhcpcd[477]: eth0: rebinding lease of 192.168.0.3
dhcpcd[477]: eth0: acknowledged 192.168.0.3 from 192.168.0.1
dhcpcd[477]: eth0: checking for 192.168.0.3
dhcpcd[477]: eth0: sending IPv6 Router Solicitation
dhcpcd[477]: eth0: leased 192.168.0.3 for 3600 seconds
dhcpcd[477]: forked to background, child pid 504
I think is this one: dhcpcd[477]: eth0: sendmsg: Cannot assign requested address
Last edited by ismaelvc (2012-11-16 03:10:29)
Laptop: LG LM70 Express Kernel: 3.14.2-1-ARCH
CPU: Intel Pentium M processor @1.86GHz Hard Drive: 80G
Video: Mobility Radeon X600 X Driver: xf86-video-ati
Memory Size: 1.5G + zramswap: 384M + swap: 3G
Offline
As I understand it, this should not be necessary but I have to disable ipv6 to get access at work. The way I think I do this right now is by having:
net.ipv6.conf.all.disable_ipv6 = 1
at the end of /etc/sysctl.conf. Basically, otherwise it only ever tries ipv6 and if your network only has ipv4, it just gives up and fails.
(I believe the network should respond in a way which prevents this - it works for me at home but at work, I need it disabled.)
On the other hand, I don't know why it would then work manually if this was the problem... just the errors looked familiar.
Thanks, but it did not work. Any other ideas? Like ismaelvc, my ethernet connection started up automatically when I booted the installation CD and installed arch.
Last edited by Ipozya (2012-11-16 20:34:06)
Offline
Does it change the error messages, though?
Do you know if your network supports ipv6? Because the messages suggest that it is only trying ipv6 and not falling back to ipv4.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Does it change the error messages, though?
Do you know if your network supports ipv6? Because the messages suggest that it is only trying ipv6 and not falling back to ipv4.
No - causes same error messages except that it's process 245 instead of 244.
Not sure if this is any useful, but this is what it shows when I type dhcpcd in root to get ethernet started manually:
#dhcpcd
dhcpcd[386]: version 5.6.2 starting
dhcpcd[386]: wlan0: up_interface: Operation not possible due to RF-kill
dhcpcd[386]: eth0: sending IPv6 Router Solicitation
dhcpcd[386]: eth0: sendmsg: Network is unreachable
dhcpcd[386]: eth0: rebinding lease of 157.142.173.203
dhcpcd[386]: wlan0: waiting for carrier
dhcpcd[386]: eth0: sending IPv6 Router Solicitation
dhcpcd[386]: eth0: sendmsg: Network is unreachable
dhcpcd[386]: eth0: acknowledged 157.142.173.203 from 157.142.223.170
dhcpcd[386]: eth0: checking for 157.142.173.203
dhcpcd[386]: eth0: sending IPv6 Router Solicitation
dhcpcd[386]: eth0: sendmsg: Network is unreachable
dhcpcd[386]: eth0: leased 157.142.173.203 for 720 seconds
dhcpcd[386]: forked to background, child pid 422
Offline
I to just experienced the same problem. I had just done an update, turned off computer. When I came back and turned it back on dhcpcd wouldn't start. Done a quick check by downgrading the packages that were updated and all was working again. Haven't narrowed it down yet but these were the packages that were updated.
binutils-2.23-1 => binutils-2.23.1-1
telepathy-qt-0.9.3-1 => telepathy-qt-0.9.3-2
Me thinks maybe binutils could be the problem. Going to just update again and see what happens
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
Offline
Did you identify if this was the problem? If so, should there not a be a lot more people experiencing this issue - I don't see a thread in the Pacman/upgrades section
Last edited by Ipozya (2012-11-17 00:02:06)
Offline
Did you identify if this was the problem? If so, should there not a be a lot more people experiencing this issue - I don't see a thread in the Pacman/upgrades section
Nope. Scratch that one. Still looking at what could be the problem. I kinda stumped on this as everything was working fine up until today. Even my laptop is playing up. KDM comes up but that's as far as it goes
"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."
Offline
I am also experiencing this issue off a fresh install of Arch linux
Offline
Maybe try getting additional information from the journal/logs. I would try to figure out what command exactly the service ends up trying to execute in the case when it fails on boot and the case where it succeeds when started manually. I can't see why this should make a difference but something obviously does. systemctl status is only showing you the end of the messages. You probably need to see more to see what is happening. (At least, that's what I would try.)
Was the October iso using initscripts or systemd? If the former, it will not tell you much that that works. The latter possibility might be more interesting.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
https://www.archlinux.org/news/install- … s-systemd/
October iso is the one that introduced systemd and I installed with november which also used systemd.
Will try to see in logs if I can get additional information.
Last edited by Ipozya (2012-11-17 01:11:58)
Offline
I have a similar problem as dhcpcd doesn't start on reboot and is a fresh install with Nov release
# systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: failed (Result: exit-code) since Sat, 2012-11-17 09:03:58 GMT; 6min ago
CGroup: name=systemd:/system/dhcpcd@.service/eth0
Nov 17 09:03:28 ace dhcpcd[262]: eth0: carrier acquired
Nov 17 09:03:28 ace dhcpcd[262]: eth0: carrier lost
Nov 17 09:03:28 ace dhcpcd[262]: eth0: waiting for carrier
Nov 17 09:03:58 ace systemd[1]: Failed to start dhcpcd on eth0.
Nov 17 09:03:58 ace systemd[1]: Unit dhcpcd@eth0.service entered failed state
# systemctl status dhcpcd@eth1.service
dhcpcd@eth1.service - dhcpcd on eth1
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: inactive (dead)
CGroup: name=systemd:/system/dhcpcd@.service/eth1
# ping -c 3 www.google.com
ping: unknown host www.google.com
# dhcpcd
dhcpcd[528]: version 5.6.2 starting
dhcpcd[528]: eth1: sending IPv6 Router Solicitation
dhcpcd[528]: eth1: sendmsg: Cannot assign requested address
dhcpcd[528]: eth1: rebinding lease of 192.168.0.2
dhcpcd[528]: eth0: waiting for carrier
dhcpcd[528]: eth1: carrier lost
dhcpcd[528]: eth1: carrier acquired
dhcpcd[528]: eth1: sending IPv6 Router Solicitation
dhcpcd[528]: eth1: sendmsg: Cannot assign requested address
dhcpcd[528]: eth1: rebinding lease of 192.168.0.2
dhcpcd[528]: eth1: acknowledged 192.168.0.2 from 192.168.0.1
dhcpcd[528]: eth1: checking for 192.168.0.2
dhcpcd[528]: eth1: sending IPv6 Router Solicitation
dhcpcd[528]: eth1: leased 192.168.0.2 for 3600 seconds
dhcpcd[528]: forked to background, child pid 574
Offline
Just thinking out loud. But if it works when mannualy done but not durring boot I would think it is depending on a service which is loading after dhcpd.
How do you view / control the service order in Systemd ?
Life is pleasant. Death is peaceful. It's the transition that's troublesome. Isaac Asimov - / -
Offline
There are fancy ways but I tend to read the service file:
$ less /usr/lib/systemd/system/dhcpcd\@.service
[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
ExecStart=/sbin/dhcpcd -A -q -w %I
ExecStop=/sbin/dhcpcd -k %I
[Install]
Alias=multi-user.target.wants/dhcpcd@eth0.service
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
cfr,
Thanks for the insight.
Ipozya ,
Please post yours.
Mine --> and it works for me.
[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
ExecStart=/sbin/dhcpcd -A -q -w %I
ExecStop=/sbin/dhcpcd -k %I
[Install]
Alias=multi-user.target.wants/dhcpcd@eth0.service
Life is pleasant. Death is peaceful. It's the transition that's troublesome. Isaac Asimov - / -
Offline
Just thinking out loud. But if it works when mannualy done but not durring boot I would think it is depending on a service which is loading after dhcpd.
How do you view / control the service order in Systemd ?
I am starting to sense that this is a bug as several users in this thread are reporting the same issue and other threads are coming up as well:
https://bbs.archlinux.org/viewtopic.php?id=152609
https://bbs.archlinux.org/viewtopic.php?id=151662
Could possibly be the following bug (https://mailman.archlinux.org/pipermail … 03331.html)
Our current systemd units have a fatal flaw: They may fail because they
are started before the needed devices show up. This patch series adds
new units that fix that. However, the change is not transparent for the
user and requires different configuration.I'd really like to deprecate netcfg.service, netcfg at .service and
net-auto-wireless.service at some point, but that will break existing
setups. I don't know if we should go ahead with this.Anyway, please comment on the patches.
My service file looks identical:
[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
ExecStart=/sbin/dhcpcd -A -q -w %I
ExecStop=/sbin/dhcpcd -k %I
[Install]
Alias=multi-user.target.wants/dhcpcd@eth0.service
Offline
I encounter the same problem, but with wifi.
My service file looks exactly the same.
Offline
I encounter the same problem, but with wifi.
My service file looks exactly the same.
But I doubt that file is relevant to you. "eth0" is *usually* a wired connection. If this is actually your wireless, that is unusual and you would need to account for this.
I think if you are having trouble with wifi *after* reading the relevant wiki pages and searching the forums, you should start a new thread. Make sure you include relevant information about your system, config and network.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Well, I think it has to do with the same thing.
I cannot establish a wifi connection using wicd. It says "not connected" directly after it tries to get an IP. If I use static IP's, I can connect to the router.
After I run "sudo dhcpcd" after startup, it connects just fine. I'll have an eye on that threat and on that bug.
Offline
In that case, you are not starting dhcpcd in the same way. Those in this thread start using the service file and it works after start up. In their case, it should be started by systemd. You are starting dhcpcd directly when it should be started (I think) by wicd. In your case, wicd should be started by systemd on boot. Is *that* service enabled?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
OK, what you say makes perfect sense.
The wicd.service is running without problems:
systemctl status wicd.service
wicd.service - Wicd a wireless and wired network manager for Linux
Loaded: loaded (/usr/lib/systemd/system/wicd.service; enabled)
Active: active (running) since Sun, 2012-11-18 20:24:39 EST; 1min 3s ago
Main PID: 345 (wicd)
CGroup: name=systemd:/system/wicd.service
├ 345 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py --no-daemon
└ 398 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
Allthough this seems not good, but there is no ethernet cable plugged in:
systemctl status dhcpcd@eth0.service
dhcpcd@eth0.service - dhcpcd on eth0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: failed (Result: exit-code) since Sun, 2012-11-18 20:25:04 EST; 1min 40s ago
Process: 344 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/dhcpcd@.service/eth0
Nov 18 20:24:34 philipp dhcpcd[344]: eth0: waiting for carrier
Nov 18 20:25:04 philipp systemd[1]: Failed to start dhcpcd on eth0.
Nov 18 20:25:04 philipp systemd[1]: Unit dhcpcd@eth0.service entered failed state
Is there some dhcpcd service? Because I cannot find/ start/ enable one.
Offline