You are not logged in.
Pages: 1
Topic closed
Hello to all.
I have some problems with netctl, after a the system starts netcl fails to start up the network interface and run dhcpd on it.
Here are my configs:
My netctl profile file:
cat /etc/netctl/ethernet-dhcp
Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
## for DHCPv6
#IP6=dhcp
## for IPv6 autoconfiguration
#IP6=stateless
journalctl log entry:
#netctl start ethernet-dhcp
Job for netctl@ethernet\x2ddhcp.service failed. See 'systemctl status netctl@ethernet\x2ddhcp.service' and 'journalctl -xn' for details.
# journalctl -xn
-- Logs begin at Sat 2012-10-20 22:54:19 EEST, end at Sun 2013-05-12 02:39:09 EEST. --
May 12 02:38:54 arch-pc kernel: r8169 0000:04:00.0 eth0: link up
May 12 02:38:55 arch-pc kernel: r8169 0000:04:00.0 eth0: link down
May 12 02:38:57 arch-pc kernel: r8169 0000:04:00.0 eth0: link up
May 12 02:38:58 arch-pc kernel: r8169 0000:04:00.0 eth0: link down
May 12 02:39:09 arch-pc systemd[1]: Starting Networking for netctl profile ethernet-dhcp...
-- Subject: Unit netctl@ethernet\x2ddhcp.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@ethernet\x2ddhcp.service has begun starting up.
May 12 02:39:09 arch-pc network[505]: Starting network profile 'ethernet-dhcp'...
May 12 02:39:09 arch-pc network[505]: The interface of network profile 'ethernet-dhcp' is already up
May 12 02:39:09 arch-pc systemd[1]: netctl@ethernet\x2ddhcp.service: main process exited, code=exited, status=1/FAILURE
May 12 02:39:09 arch-pc systemd[1]: Failed to start Networking for netctl profile ethernet-dhcp.
-- Subject: Unit netctl@ethernet\x2ddhcp.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit netctl@ethernet\x2ddhcp.service has failed.
--
-- The result is failed.
May 12 02:39:09 arch-pc systemd[1]: Unit netctl@ethernet\x2ddhcp.service entered failed state.
I do not understand why the network interface status is changing in the first steps, is brought up then down then up again then down.....
For now, to make my network work I am doing all the things manually, I'm starting dhcpd on eth0 so it can assign the ip to the interface.
I have tried using systemcl unit file, #systemctl netctl-auto@eth0.service, after the reboot the result was the same. Can some one help me?
Thank you in advance.
Last edited by starlays (2013-05-16 14:41:11)
Offline
The dash "-" character has a special meaning in systemd. Try renaming your .service file to something without it.
Offline
The dash "-" character has a special meaning in systemd. Try renaming your .service file to something without it.
That shouldn't matter. I have the exact same profile (name and all) and it works fine. It was copied from the /etc/netctl/examples. I also have the same service. If you follow the directions from the wiki, it is the service required.
Last edited by jgreen1tc (2013-05-12 18:27:48)
Offline
That shouldn't matter. I have the exact same profile (name and all) and it works fine. It was copied from the /etc/netctl/examples. I also have the same service. If you follow the directions from the wiki, it is the service required.
Can you please give us a link to the wiki? Are you referring to this one: https://wiki.archlinux.org/index.php/Netctl ? I have done all the things that are written there, my bad, I forgot to mention that I have read the wiki and the man pages that are indicated on the wiki.
Offline
Is eth0 the interface name?
Mine is enp2s0
Can you define that eth0 is correct?
ip link
Cause i dont had any connectivity problem when followed the wiki article.
Offline
Is eth0 the interface name?
Mine is enp2s0Can you define that eth0 is correct?
ip link
Cause i dont had any connectivity problem when followed the wiki article.
Yes, i can confirm that eth0 is the network name, I set the naming to the old way, not the new way.
I notice a strange thing, after the login my interface is down, I tried to bring it up but it fails without any warnings, I do not know where to dig more for errors or how to do a debug to understand what is the problem... I resolved the problem by stopping the network and starting it back than using the same commands as in the log and it worked. I do not understand what are my problems, what am I doing wrong.
Here is the required information and the new discovered problem:
[root]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:1f:d0:8d:2d:77 brd ff:ff:ff:ff:ff:ff
inet6 fe80::21f:d0ff:fe8d:2d77/64 scope link
valid_lft forever preferred_lft forever
[root]# ip link set eth0 state UP
[root]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:1f:d0:8d:2d:77 brd ff:ff:ff:ff:ff:ff
inet6 fe80::21f:d0ff:fe8d:2d77/64 scope link
valid_lft forever preferred_lft forever
[root]# ip link set eth0 state UP
[root]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:1f:d0:8d:2d:77 brd ff:ff:ff:ff:ff:ff
inet6 fe80::21f:d0ff:fe8d:2d77/64 scope link
valid_lft forever preferred_lft forever
Thank you to all for your help, hope that i can solve this problem.
Last edited by starlays (2013-05-13 19:04:13)
Offline
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
Sanity check.... Is the cable plugged in? At both ends?
Are the link lights on on the computer and on the router?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
starlays wrote:2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
Sanity check.... Is the cable plugged in? At both ends?
Are the link lights on on the computer and on the router?
Yes, after I stop the network and bring it back and run the dhcpcd on eth0 manualy it gets the ip and all works well.
Last edited by starlays (2013-05-14 06:31:02)
Offline
I don't know if this solution is for real, but I had the same problem with nearly an identical config for weeks. Like you, I was also able to start it by hand. This morning, I deleted the _comments_ from the config (yep - the lines starting with a hash #), and it has now worked twice in a row. Don't see why that should make a difference, but it seems to have. Two data points hardly proves the point, but after several weeks of zero success???
Mike
Linux User #353 - SLS -> Slackware -> Red Hat -> Mandrake -> Fedora -> Arch
Offline
I don't know if this solution is for real, but I had the same problem with nearly an identical config for weeks. Like you, I was also able to start it by hand. This morning, I deleted the _comments_ from the config (yep - the lines starting with a hash #), and it has now worked twice in a row. Don't see why that should make a difference, but it seems to have. Two data points hardly proves the point, but after several weeks of zero success???
Mike
WOW, Yes that was the solution, removing all the comments lines from the profile config file that netctl is using did the job 100%. Thank you.
Last edited by starlays (2013-05-14 19:41:02)
Offline
I think that's mostly a coincidence. Don't forget to add [SOLVED] to your thread title.
The real problem is that your interface is UP, which means that netctl will not touch it. Bring it down before running netctl (e.g. ip link set eth0 down)
Last edited by gonX (2013-05-14 22:35:21)
since 2009
Offline
My interface was definitely not up before and after the comment deletion. I tried many variations of of trying netctl first, rebooting, then trying by hand first, and the only time I got netctl to work was when I finally decided to delete the comments. Now a coincidental possibility was that I did an update a couple of days ago that bumped the kernel to 3.9.2, amongst other things; maybe that had something to do with it. However, it was definitely not having ifconfig "up" first.
Mike
Linux User #353 - SLS -> Slackware -> Red Hat -> Mandrake -> Fedora -> Arch
Offline
I can confirm that I saw the exact same problem. My interface was not up beforehand either. I also tried various things and it was the deletion of the comments which fixed it for me. Very helpful thread. Thanks.
Offline
I think that's mostly a coincidence. Don't forget to add [SOLVED] to your thread title.
The real problem is that your interface is UP, which means that netctl will not touch it. Bring it down before running netctl (e.g. ip link set eth0 down)
My interface is down after each reboot, I have triple checked.
Offline
I still don't think that "Deletion of comments" could fix anything.
Looking at your log and at the sources clearly shows, that the first issue was that your interface was already up.
My interface was definitely not up before
My interface is down after each reboot, I have triple checked.
How do you check that?
netctl noticed that the interface is "UP", which is (or should be, if your driver works correctly) indicated by a set bit number 0 in /sys/class/net/eth0/flags.
So as you say:
Now a coincidental possibility was that I did an update a couple of days ago that bumped the kernel to 3.9.2
Maybe there was a fix/bug for your driver? Could you check that?
Offline
I still don't think that "Deletion of comments" could fix anything.
Yes, it does not fix anything, at least not at my machine. There I have the exact same issue that netctl won't start my wlan as it assumes that the device is aready up.
Looking at your log and at the sources clearly shows, that the first issue was that your interface was already up.
Well, it seems so. But it isn't. There may be an error in the driver and "netctl" has its trouble with it but "ip" does not. It shows the link to be "DOWN". It is mysterious as the link is not really down as well as it is not really up. A valid state can be created only if the interface is taken down "ip link set dev xxxx down". Than, the output of "ip link show" looks still same (link is DOWN) but the bit in /sys/class/net/xxxx/flags is also set to zero.
As the others talked about eth0 as the link name, i assume that the device handles a wired connection. In my case, the very same picture is shown but on a ath9k wireless device. So it cannot be a device specific issue, right? Is that something more in the kernel by handling the network device drivers?
Offline
I'm encountering similar issues on wireless without any comment lines. Only it happens randomly. I've set the DHCPTimeout to 30, which has helped to some degree for manual fixes, but not during start up.
As stated, I can manually resolve the problem, but I must first bring down the interface.
ip link set <inter> down && netctl start <profile>
Strange to me that netctl requires the interface to be down first. Especially when wifi-menu requires the opposite. However, I did discover that running wifi-menu post a netctl-auto on a profile doesn't work, since it appears to expect to be only managed by netctl-auto. I found that odd, as to me, I should be able to run wifi-menu at anytime since it appears to only be setting the wpa_supplicant and dhcpd on the interface, and I can manually do those just fine without wifi-menu.
Oh well, I'm a bit new to Arch still, just learning my way around
Offline
I know this is an old thread but I was having the same symptoms. I even tried removing the comments which obviously did nothing. For me the problem was that netctl-ifplugd@eth0.service had control of the interface, which is why it would constantly switch to "UP".
My solution was:
systemctl disable netctl-ifplugd@eth0.service
After that netctl start worked just fine. Of course this will impact auto profile switching.
Offline
I use VirtualBox in Windows, today I updated VirtualBox and had this problem.
So I tried this and worked:
First make sure your profile file is set correctly ( in my case "ethernet-dhcp" with the interface enp0s3)
Then I did
systemctl restart netctl
systemctl restart dhcpcd
netctl disable ethernet-dhcp
netctl stop ethernet-dhcp
reboot
netctl start ethernet-dhcp
netctl enable ethernet-dhcp
Yes, I know, this is just a drity "turn it off and on again", but i was just trying random things after an hour trying to fix it.
This is my first time posting in this forum so don´t be too hard on me.
Offline
Don't necrobump. This thread is nearly 9 years old....
https://wiki.archlinux.org/title/Genera … bumping%22
Closing.
Offline
Pages: 1
Topic closed