You are not logged in.

#1 2013-05-02 04:23:00

deags
Member
Registered: 2012-12-28
Posts: 23

[Mostly Solved] Netctl can't use interface, interface is up

Hey all,
I've previously used NetworkManager, but after some issues I tried to use something a bit less bloated to troubleshoot and found netctl to be amazing, how networking should always be. And magically my wireless at uni started working again. Initially netctl worked fine, it still does for the most part but on boot the interfaces seem to be hogged by something else, an issue NetworkManager was able to resolve apparently.

To use netctl, I have to start NetworkManager, then stop it. I can then use netctl without issue.

In a troubleshooting attempt I tried disabling udev renaming, so I am back to eth0 and wlan0: Issues persist.

[root@t60 boza]# netctl status tomato
netctl@tomato.service - Networking for netctl profile tomato
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Fri 2013-05-03 00:07:10 EST; 11min ago
     Docs: man:netctl.profile(5)
  Process: 497 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

May 03 00:07:10 t60 systemd[1]: Starting Networking for netctl profile tomato...
May 03 00:07:10 t60 network[497]: Starting network profile 'tomato'...
May 03 00:07:10 t60 network[497]: The interface of network profile 'tomato' is already up
May 03 00:07:10 t60 systemd[1]: netctl@tomato.service: main process exited, code=exited, status=1/FAILURE
May 03 00:07:10 t60 systemd[1]: Failed to start Networking for netctl profile tomato.
May 03 00:07:10 t60 systemd[1]: MESSAGE=Unit netctl@tomato.service entered failed state.

Cheers

Last edited by deags (2013-05-02 04:28:07)

Offline

#2 2013-05-02 04:26:22

deags
Member
Registered: 2012-12-28
Posts: 23

Re: [Mostly Solved] Netctl can't use interface, interface is up

I tried all last night, but of course I found a solution right after I made a post...

ip link set wlan0 down
netctl start profile

netctl apparently wants the interface to be in a downed state, and won't configure it otherwise. Is it possible to change this behaviour, so that netctl will disconnect anything else that's stolen the interface and/or change profile automatically if interfaces conflict?

Thanks

Last edited by deags (2013-05-02 04:27:42)

Offline

#3 2013-05-02 04:35:15

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

Please describe your problem more clearly.

Is NetworkManager enabled at boot time? If not, how and when are you enabling NetworkManager? How are you handling disabling NetworkManager prior to enableing netctl? What are the contents of the netctl profiles giving you trouble? Are both eth0 and wlan0 failing to connect, or just one of them?

Offline

#4 2013-05-02 04:36:26

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

The ideal solution would be to not start NetworkManager in  the first place if you are intending to use netctl. Is there a reason you're starting NetworkManager first?

Offline

#5 2013-05-02 04:41:23

deags
Member
Registered: 2012-12-28
Posts: 23

Re: [Mostly Solved] Netctl can't use interface, interface is up

I'm not, I've ditched it. That was purely for troubleshooting. I now know why it helped get netctl working of course.

I've removed NetworkManager, but during boot something is setting wlan0 to UP which is unexpected.

Edit: After a few reboots, disabling netctl service, ip reports wlan0 DOWN on log in, but then I get an error from netctl/systemd that isn't descriptive at all. If I set it to DOWN anyway, then try netctl, it works. Perhaps ip is misreporting an 'up' interface as down, or the interface is in some sort of bugged state?

Last edited by deags (2013-05-02 04:50:16)

Offline

#6 2013-05-02 04:58:50

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

Again, the description of your problem is confusing... if you aren't starting any network management tools on boot, then your interface should be down. netctl automatically sets any needed interface to 'up'. If starting netctl is giving you errors, please provide relevant output from the journal. netctl status ${profile} should suffice. If not, I'll ask for journalctl output.

Offline

#7 2013-05-02 05:54:38

deags
Member
Registered: 2012-12-28
Posts: 23

Re: [Mostly Solved] Netctl can't use interface, interface is up

Sorry, you are right I haven't worded this well.

You are correct, there are no other network management daemons running, and on boot the interface is DOWN.
Despite being down, netctl can not start the interface.
If I manually 'ip link set wlan0 down', despite it already being reported as DOWN, netctl can then use the interface.

Here is some output, after logging in:

[root@t60 ~]# netctl start tomato
Job for netctl@tomato.service failed. See 'systemctl status netctl@tomato.service' and 'journalctl -xn' for details.


[root@t60 ~]# netctl status tomato
netctl@tomato.service - Networking for netctl profile tomato
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Fri 2013-05-03 01:51:59 EST; 42s ago
     Docs: man:netctl.profile(5)
  Process: 456 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

May 03 01:51:58 t60 systemd[1]: Starting Networking for netctl profile tomato...
May 03 01:51:59 t60 network[456]: Starting network profile 'tomato'...
May 03 01:51:59 t60 network[456]: The interface of network profile 'tomato' is already up
May 03 01:51:59 t60 systemd[1]: netctl@tomato.service: main process exited, code=exited, status=1/FAILURE
May 03 01:51:59 t60 systemd[1]: Failed to start Networking for netctl profile tomato.
May 03 01:51:59 t60 systemd[1]: MESSAGE=Unit netctl@tomato.service entered failed state.


[root@t60 ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 00:15:58:2b:ea:56 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
    link/ether 00:13:02:69:8c:d4 brd ff:ff:ff:ff:ff:ff

As you can see, netctl thinks the interface is UP, but ip says it is DOWN. To get going from this point, this works:

[root@t60 ~]# ip link set wlan0 down
[root@t60 ~]# netctl start tomato
[root@t60 ~]# 

Offline

#8 2013-05-02 06:25:36

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

Please cat /etc/netctl/tomato

Also, from a fresh restart, before running a

# netctl start tomato

please run

wpa_cli status

Offline

#9 2013-05-02 10:42:24

deags
Member
Registered: 2012-12-28
Posts: 23

Re: [Mostly Solved] Netctl can't use interface, interface is up

wpa_cli status

[root@t60 ~]# wpa_cli status
Failed to connect to non-global ctrl_ifname: (null)  error: No such file or directory

netctl profile. Based on an example provided in /etc/netctl/examples

Description='tomato'
Interface=wlan0
Connection=wireless
Security=wpa

IP=dhcp

ESSID='tomato'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='supersecretpassphrase'
# Uncomment this if your ssid is hidden
#Hidden=yes

Thanks

Offline

#10 2013-05-02 13:02:16

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

Re: [Mostly Solved] Netctl can't use interface, interface is up

Are you trying to autostart the profile? If you are, you can't have any profiles enabled. Only enable the netctl-auto@<interface>.service

Try disabling all profiles? I know this worked for me when I was getting similar errors.

Offline

#11 2013-05-02 15:32:28

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

Sorry, try

wpa_cli -i wlan0 status

before attempting to start your netctl profile after boot

Offline

#12 2013-05-04 10:37:51

deags
Member
Registered: 2012-12-28
Posts: 23

Re: [Mostly Solved] Netctl can't use interface, interface is up

@jgreen1tc:
Not using any autostart. All netctl* are 'disabled' in systemd. On boot, all profiles are disabled.

[root@t60 ~]# wpa_cli -i wlan0 status
Failed to connect to non-global ctrl_ifname: wlan0  error: No such file or directory

Thanks. Sorry about the delay, busy with life sad

Offline

#13 2013-05-05 00:08:15

dark808bb
Member
Registered: 2013-05-01
Posts: 19

Re: [Mostly Solved] Netctl can't use interface, interface is up

Hey deags. I recently installed netctl which is a good program I think.

Well I was having the same issue as you.

I had the same error that you did in the original post. I also remedied it in the same manner as you, by using

 ip link set wlp2s0 down

then

netctl start wireless-wpa

Before discovering this I had tried for days to get the wireless to work so boiling down to just two commands is very satisfying to me.

Reading through the netctl arch wiki under the "Automatic Operation" section I found this

systemctl enable netctl-auto@<interface>.service

and since I previously tried enabling a service I needed to run

netctl disable <profile>

I then rebooted and ran a ping against google. This worked for me, quite possibly might work for you.

Offline

#14 2013-05-05 00:12:18

dark808bb
Member
Registered: 2013-05-01
Posts: 19

Re: [Mostly Solved] Netctl can't use interface, interface is up

Actually this did not work after a cold shutdown sad

It failed once but i've done 6 more cold reboots and successfully ran a ping against google...

So hopefully it holds up... forever.

Last edited by dark808bb (2013-05-05 00:22:36)

Offline

#15 2013-05-05 02:50:20

dark808bb
Member
Registered: 2013-05-01
Posts: 19

Re: [Mostly Solved] Netctl can't use interface, interface is up

Now its broke again.

If I log on and run

rfkill unblock all

and

netctl start wireless-wpa

it will work

Last edited by dark808bb (2013-05-05 03:03:43)

Offline

#16 2013-05-07 00:28:07

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Mostly Solved] Netctl can't use interface, interface is up

deags wrote:

@jgreen1tc:
Not using any autostart. All netctl* are 'disabled' in systemd. On boot, all profiles are disabled.

[root@t60 ~]# wpa_cli -i wlan0 status
Failed to connect to non-global ctrl_ifname: wlan0  error: No such file or directory

Thanks. Sorry about the delay, busy with life sad

Please paste output

cat /etc/wpa_supplicant.conf | grep ctrl_interface

Offline

#17 2013-09-23 11:41:45

jimbob
Member
Registered: 2013-09-23
Posts: 1

Re: [Mostly Solved] Netctl can't use interface, interface is up

Take a look at the man page for netctl.profile. This option worked for me. Not sure why netctl needs the interface to be down or what the down sides are to using this option..

       ForceConnect=
           Set to ‘yes’ to force connecting even if the interface is up. Do not use this unless you know what you are doing.

Offline

#18 2013-09-23 19:30:04

manypopes
Member
Registered: 2013-06-25
Posts: 33

Re: [Mostly Solved] Netctl can't use interface, interface is up

I also have this problem, thread.

My interface is listed as DOWN, however netctl will only connect when I set the interface to down again with "ip link set wlp2s0 down".

EDIT:
My problem was due to dhcpcd.service running at the same time as netctl, disabling dhcpcd fixed this.

You don't happen to have dhcpcd.service enabled do you?

Last edited by manypopes (2013-09-24 14:52:26)

Offline

#19 2013-09-29 15:19:00

valo
Member
From: IT
Registered: 2013-08-23
Posts: 8

Re: [Mostly Solved] Netctl can't use interface, interface is up

Hi everybody, i got the same problem.

jimbob wrote:

Take a look at the man page for netctl.profile. This option worked for me. Not sure why netctl needs the interface to be down or what the down sides are to using this option..

       ForceConnect=
           Set to ‘yes’ to force connecting even if the interface is up. Do not use this unless you know what you are doing.

Do you know why the default behaviour of netctl is to fail if the interface is up?
For me it would be better the opposite but, as said from jimbob, i don't know if there's something wrong...

Offline

#20 2014-04-03 14:04:21

seanthebean
Member
Registered: 2013-08-13
Posts: 2

Re: [Mostly Solved] Netctl can't use interface, interface is up

Thanks deags. This helped me a great deal. I'd tried just about everything (reconfiguring profiles, reinstalling wireless drivers, etc), and this was what I needed.

deags wrote:

ip link set wlan0 down
netctl start profile

netctl apparently wants the interface to be in a downed state, and won't configure it otherwise

valo wrote:

Do you know why the default behaviour of netctl is to fail if the interface is up?
For me it would be better the opposite but, as said from jimbob, i don't know if there's something wrong...

I agree this seems more like a bug than desirable behavior. I think it would make a lot more sense to automatically bring the interface up or down if needed. (Though perhaps that's not the responsibility of a network manager?) It could at least provide a more helpful error than "the interface is already up", which doesn't even sound like there's a problem.

Offline

Board footer

Powered by FluxBB