Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netctl cannot start this because the interface is already up #11

Closed
taylorchu opened this issue Feb 2, 2013 · 17 comments
Closed

netctl cannot start this because the interface is already up #11

taylorchu opened this issue Feb 2, 2013 · 17 comments

Comments

@taylorchu
Copy link

this happens a lot for me. netctl simply exits, and i dont think this behavior is right.

@KaiSforza
Copy link
Contributor

If you run netctl start foo on a profile that is already up, it will behave just like running systemctl start bar when bar.service is already running. netctl switch-to baz and netctl restart foo are what you are looking for.

@taylorchu
Copy link
Author

I use wifi-menu

@joukewitteveen
Copy link
Owner

what is the output you get?

@taylorchu
Copy link
Author

netctl@wlan0-UCLA_WEB_RES.service - Networking for netctl profile wlan0-UCLA_WEB_RES
Loaded: loaded (/usr/lib/systemd/system/netctl@.service; disabled)
Active: failed (Result: exit-code) since Sat 2013-02-02 04:15:15 PST; 44s ago
Docs: man:netctl.profile(5)
Process: 3222 ExecStart=/usr/lib/network/network start %i (code=exited, status=1/FAILURE)

Feb 02 04:15:15 localhost systemd[1]: Starting Networking for netctl profile wlan0-UCLA_WEB_RES...
Feb 02 04:15:15 localhost network[3222]: Starting network profile 'wlan0-UCLA_WEB_RES'...
Feb 02 04:15:15 localhost network[3222]: The interface of network profile 'wlan0-UCLA_WEB_RES' is already up
Feb 02 04:15:15 localhost systemd[1]: netctl@wlan0-UCLA_WEB_RES.service: main process exited, code=exited, status=1/FAILURE
Feb 02 04:15:15 localhost systemd[1]: Failed to start Networking for netctl profile wlan0-UCLA_WEB_RES.
Feb 02 04:15:15 localhost systemd[1]: Unit netctl@wlan0-UCLA_WEB_RES.service entered failed state

@taylorchu
Copy link
Author

I think netctl should remove some states. re-* is a mess.
For stop, it is ok. But for start/restart/enable/reenable/switch-to, the proper behavior should be tear down all connection no matter what, and start the specified one. This will make 4 states to 2 states.

@joukewitteveen
Copy link
Owner

Seems like you are already connected on the interface. This might be the result of the wpa scan, in which case it is a bug. If it is the result of something you did yourself, than you should issue a ip link set dev <interface> down before using netctl.

@joukewitteveen
Copy link
Owner

With regard to your 'it is a mess' statement: I disagree. The only way to convince me is by crafting a convincing patch. If you want to ignore all state tracking, you can add "ForceConnect=yes" to your profiles (or to a hook if you so insist).

@taylorchu
Copy link
Author

I only use netctl, so I believe this is a bug from netctl.

@ghost
Copy link

ghost commented Mar 2, 2014

i have the same problem with you, do you remember how to deal with it, thanks

@ihommani
Copy link

ihommani commented Mar 2, 2014

@lansunlong , if you follow the "ForceConnect=yes" instruction it works. But it's not really a solution. So if someone get the solution...
I just had the problem while upgrading my archlinux.

@ghost
Copy link

ghost commented Mar 3, 2014

@ihommani , thanks very much. it works with 'ForceConnect=yes', the problem came out just after I upgrated the OS yesterday, archlinux too.

@moneytoo
Copy link

moneytoo commented May 6, 2014

I described (probably) same issue here (with wifi-menu): https://bbs.archlinux.org/viewtopic.php?id=181107

@joukewitteveen
Copy link
Owner

Read the error message:

The interface of network profile 'wlp2s0-adsl' is already up

In other words: you should not bring the interface up before running wifi-menu. The Beginners' guide is at fault, not in netctl.

@moneytoo
Copy link

moneytoo commented May 8, 2014

@joukewitteveen Thanks for confirming. I see that the wiki has been updated and fixed by Kynikos.

@MauroMombelli
Copy link

Hello, arch Linux on raspi here. Something is keeping my eth0 up ( if I try to put it down it say it does not support remote shutdown and immediately bring it up). Using force connect is a working workaround, but...

@reggaedit
Copy link

Just commenting in case anyone else comes here. Adding 'ForceConnect=yes' to my eduroam profile worked for me. I tried countless other things, and I had the same errors as above. Really not sure what was wrong with my computer.

@mervin0502
Copy link

I have fixed this problem by the wiki

Job for netctl@wlan(...).service failed
Warning: This section assumes that there is no other network service running before starting a netctl profile/service. See #Installation for details.
Some people have an issue when they connect to a network with netctl, for example:

netctl start wlan0-ssid

Job for netctl@wlan0\x2ssid.service failed. See 'systemctl status netctl@wlan0\x2ssid.service' and 'journalctl -xn' for details.
When then looking at journalctl -xn, either of the following are shown:

  1. If your device (wlan0 in this case) is up:
    network[2322]: The interface of network profile 'wlan0-ssid' is already up
    Setting the interface down should resolve the problem:

ip link set wlan0 down

Then retry:

netctl start wlan0-ssid

  1. If the error continues, try again after adding the ForceConnect option:
    /etc/netctl/wlan0-ssid

...
ForceConnect=yes
Save it and try to connect with the profile:

netctl start wlan0-ssid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants