You are not logged in.

#1 2013-05-11 21:45:58

starlays
Member
Registered: 2011-02-02
Posts: 12

[Solved] netctl fails start network

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

#2 2013-05-12 07:05:40

BasT
Member
Registered: 2010-08-28
Posts: 112

Re: [Solved] netctl fails start network

The dash "-" character has a special meaning in systemd. Try renaming your .service file to something without it.

Offline

#3 2013-05-12 18:24:03

jgreen1tc
Member
From: St. Louis
Registered: 2011-05-16
Posts: 251

Re: [Solved] netctl fails start network

BasT wrote:

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

#4 2013-05-13 11:14:42

starlays
Member
Registered: 2011-02-02
Posts: 12

Re: [Solved] netctl fails start network

jgreen1tc wrote:

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

#5 2013-05-13 12:22:41

Opanos
Member
Registered: 2012-09-16
Posts: 42

Re: [Solved] netctl fails start network

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

#6 2013-05-13 19:02:59

starlays
Member
Registered: 2011-02-02
Posts: 12

Re: [Solved] netctl fails start network

Opanos wrote:

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.

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

#7 2013-05-13 19:18:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Solved] netctl fails start network

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? tongue
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

#8 2013-05-13 19:33:15

starlays
Member
Registered: 2011-02-02
Posts: 12

Re: [Solved] netctl fails start network

ewaller wrote:
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? tongue
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

#9 2013-05-13 20:06:50

mike_r
Member
Registered: 2009-01-22
Posts: 114

Re: [Solved] netctl fails start network

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

#10 2013-05-14 19:39:51

starlays
Member
Registered: 2011-02-02
Posts: 12

Re: [Solved] netctl fails start network

mike_r wrote:

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

#11 2013-05-14 22:34:06

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: [Solved] netctl fails start network

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

#12 2013-05-14 22:54:34

mike_r
Member
Registered: 2009-01-22
Posts: 114

Re: [Solved] netctl fails start network

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

#13 2013-05-15 16:13:29

karl0sfandang0
Member
Registered: 2013-05-15
Posts: 1

Re: [Solved] netctl fails start network

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

#14 2013-05-16 14:42:41

starlays
Member
Registered: 2011-02-02
Posts: 12

Re: [Solved] netctl fails start network

gonX wrote:

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

#15 2013-05-19 13:42:13

DanielOertwig
Member
Registered: 2011-12-29
Posts: 6

Re: [Solved] netctl fails start network

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.

mike_r wrote:

My interface was definitely not up before

starlays wrote:

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:

mike_r wrote:

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

#16 2013-07-14 09:44:28

ernibert
Member
Registered: 2012-03-09
Posts: 13

Re: [Solved] netctl fails start network

DanielOertwig wrote:

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.

DanielOertwig wrote:

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

#17 2013-07-16 09:42:08

CryptAck
Member
Registered: 2013-07-14
Posts: 2

Re: [Solved] netctl fails start network

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 smile

Offline

#18 2014-07-17 16:52:45

tanders12
Member
Registered: 2010-12-17
Posts: 13

Re: [Solved] netctl fails start network

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

#19 2021-11-26 00:18:10

Dafelixcly
Member
Registered: 2021-11-26
Posts: 1

Re: [Solved] netctl fails start network

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

#20 2021-11-26 00:21:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] netctl fails start network

Don't necrobump. This thread is nearly 9 years old....
https://wiki.archlinux.org/title/Genera … bumping%22

Closing.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB