You are not logged in.

#1 2013-09-22 19:00:20

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

[SOLVED] Netctl won't connect unless wifi-menu is run beforehand

I've just moved to university, which uses Eduroam (as said on the netctl wiki page). I've used the example netctl profile to connect to the eduroam wireless however I'm strangely only able to connect after running wifi-menu.

If I customise the profile for wifi-menu and connect through that it doesn't connect. If I try "netctl start wlp2s0-eduroam" it doesn't connect unless I run wifi-menu beforehand. I don't even have to do anything within wifi-menu, just open it and press cancel, then start the netctl service. It seems that running wifi-menu switches something on enables something etc.

journalctl -xn leaves no error messages
dmesg shows
[  243.964721] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
when trying to connect before running wifi-menu

I don't think its relevant as I know it CAN connect, but here's the netctl profile.

Description='Automatically generated profile by wifi-menu'
Interface=wlp2s0
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
        'ssid="eduroam"'
        'proto=RSN'
        'key_mgmt=WPA-EAP'
        'pairwise=CCMP'
        'auth_alg=OPEN'
        'eap=PEAP'
        'identity="xxx"'
        'password="xxx"'
)

Does anyone know why this is happening? Please ask if you want any other info.

Last edited by manypopes (2013-09-24 14:51:18)

Offline

#2 2013-09-22 20:58:33

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,147
Website

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

That sounds really odd... Not really contributing much to your actual problem, but I've had no issues connecting to eduroam networks with networkmanager.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2013-09-22 21:39:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

Total shot in the dark, but do things improve if you were to change the name of the profile to 'eduroam' or even 'wlp2s0_eduroam'?

Offline

#4 2013-09-23 13:54:31

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

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

Initially it was named "wlp2s0-eduroam" as I edited the file originally created by wifi-menu. I later changed the name to "eduroam". It didn't seem to change anything, I might mess around with the file, maybe create a new file instead of editing the automatic one, I doubt that should make a difference as the file itself will be identical.

@clfarron4
I don't think it's a problem with eduroam, I also had problems connecting wireless on my home network on both my laptop and netbook, however it wasn't the same problem and was equally as strange as this. I could only connect at home if the dhcpcd service was enabled at boot and then could only connect through wifi-menu, not netctl.

Offline

#5 2013-09-23 14:38:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

Like I said, it was just a hot in the dark.  Systemd treats '-' in a special way.  It is what is used to denote a filesystem path in the mount and automount units.  That is why they have to be escape sequences when run through systemctl (I think \x2a).  So I have seen people have real issues with the default naming scheme that wifi-menu chooses.  Personally I have never had a problem with this naming scheme, but I hvae spoken to many others who have.

Unfortunately, I know <zero about eduroam, so I cannot be of any further assistance if it has to do with that.  But at this point, it still kind of sounds like netctl is the part that is being shitty on you.


Edit: Oh, btw, although 'journalctl -xn' can give some incredibly helpful, human-readable messages, it often leaves out some of the nitty-gritty that really give you an idea of what is going wrong.  I think you should use 'journalctl -b' to see the current boot in all its glory, or use 'journalctl -f' to see it in real time.  If you use '-f', then you can watch it while you cause this failure and see what comes out.

Last edited by WonderWoofy (2013-09-23 14:40:58)

Offline

#6 2013-09-23 17:33:47

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

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

I looked through the boot log as best as I could, dhcpcd.service starting was the only thing that stood out to me.

Sep 23 19:09:19 n110 dhcpcd[181]: version 6.0.5 starting
Sep 23 19:09:19 n110 dhcpcd[181]: forked to background, child pid 191
Sep 23 19:09:22 n110 dhcpcd[191]: enp3s0: waiting for carrier
Sep 23 19:09:22 n110 dhcpcd[191]: wlp2s0: waiting for carrier
Sep 23 19:09:22 n110 dhcpcd[191]: wlp2s0: carrier acquired
Sep 23 19:09:22 n110 dhcpcd[191]: wlp2s0: carrier lost
Sep 23 19:09:22 n110 dhcpcd[191]: wlp2s0: waiting for carrier

Trying to start the netctl service shows this:

Sep 23 19:15:10 n110 systemd[1]: Starting Networking for netctl profile eduroam...
Sep 23 19:15:10 n110 network[488]: Starting network profile 'eduroam'...
Sep 23 19:15:10 n110 network[488]: The interface of network profile 'eduroam' is already up
Sep 23 19:15:10 n110 systemd[1]: netctl@eduroam.service: main process exited, code=exited, status=1/FAILURE
Sep 23 19:15:10 n110 systemd[1]: Failed to start Networking for netctl profile eduroam.
Sep 23 19:15:10 n110 systemd[1]: Unit netctl@eduroam.service entered failed state.

Running wifi-menu didn't show anything, starting the netctl service now works and shows this:

Sep 23 19:16:32 n110 systemd[1]: Starting Networking for netctl profile eduroam...
Sep 23 19:16:32 n110 network[534]: Starting network profile 'eduroam'...
Sep 23 19:16:33 n110 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
Sep 23 19:16:46 n110 kernel: wlp2s0: authenticate with d0:c2:82:f0:e8:60
Sep 23 19:16:46 n110 kernel: wlp2s0: send auth to d0:c2:82:f0:e8:60 (try 1/3)
Sep 23 19:16:46 n110 kernel: wlp2s0: authenticated
Sep 23 19:16:46 n110 kernel: wlp2s0: associate with d0:c2:82:f0:e8:60 (try 1/3)
Sep 23 19:16:46 n110 kernel: wlp2s0: RX AssocResp from d0:c2:82:f0:e8:60 (capab=0x431 status=0 aid=31)
Sep 23 19:16:46 n110 kernel: wlp2s0: associated
Sep 23 19:16:46 n110 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
Sep 23 19:16:46 n110 dhcpcd[191]: wlp2s0: carrier acquired
Sep 23 19:16:46 n110 dhcpcd[191]: wlp2s0: soliciting an IPv6 router
Sep 23 19:16:46 n110 dhcpcd[926]: sending commands to master dhcpcd process
Sep 23 19:16:46 n110 network[534]: Started network profile 'eduroam'
Sep 23 19:16:46 n110 systemd[1]: Started Networking for netctl profile eduroam.
Sep 23 19:16:46 n110 sudo[528]: pam_unix(sudo:session): session closed for user root
Sep 23 19:16:47 n110 dhcpcd[191]: wlp2s0: soliciting a DHCP lease
Sep 23 19:16:47 n110 dhcpcd[191]: control command: dhcpcd -4qL -t 10 wlp2s0
Sep 23 19:16:51 n110 dhcpcd[191]: wlp2s0: offered 143.167.229.37 from 172.22.0.240
Sep 23 19:16:56 n110 dhcpcd[191]: wlp2s0: leased 143.167.229.37 for 600 seconds
Sep 23 19:16:56 n110 dhcpcd[191]: wlp2s0: adding host route to 143.167.229.37 via 127.0.0.1
Sep 23 19:16:56 n110 dhcpcd[191]: wlp2s0: adding route to 143.167.228.0/22
Sep 23 19:16:56 n110 dhcpcd[191]: wlp2s0: adding default route via 143.167.228.254
Sep 23 19:16:59 n110 dhcpcd[191]: wlp2s0: no IPv6 Routers available

EDIT: Just found another post with the same issue, I have to manually set the interface to "down" (despite it being listed as down) prior to using netctl. I can now see that wifi-menu was at some point setting wlp2s0 to "down" allowing netctl to work.

https://bbs.archlinux.org/viewtopic.php?id=162582

Last edited by manypopes (2013-09-23 19:24:04)

Offline

#7 2013-09-23 22:31:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

If you have dhcpcd.service enabled, you need to disable that.  Netctl handles dhcpcd on its own internally.  The dhcpcd.service simply runs a dhcpcd process on each interface, and is really meant for an ethernet situation where the cable will be plugged on boot.

Offline

#8 2013-09-24 14:42:03

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

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

Thank you! Disabling dhcpcd.service has fixed the problem.

Offline

#9 2013-09-24 15:02:57

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Netctl won't connect unless wifi-menu is run beforehand

In the future, remember that only one network management tool is allowed at a time. 

If this is something you think you are likely to forget in the future, you can use the drop-in change feature of systemd units to add a Conflicts=dhcpcd.service to the netctl@.service.  This is not very well documented yet, so to do this, you would make a directory /etc/systemd/system/netctl@.service.d and within that directory, any file ending in '.conf' will be included in the service. So for example, you might want to call this file 'conflicts.conf' since you will be adding conflicts.

% cat /etc/systemd/system/netctl@.service.d/conflicts.conf
[Unit]
Conflicts=dhcpcd.service dhcpcd@.service


As a side not, and just because it took me a while to figure this out, you can also change an existing value of the original service file.  To do this, you would set the parameter to a blank value, then set it to whatever you wanted it to be.  So for an example, lets say that you wanted to change the ExecStart of dhcpcd.service.  It runs /sbin/dhcpcd, and although that will work fine with the /sbin symlink, lets say it makes you uneasy and you want the actual path there.  So you would do:

% cat /etc/systemd/system/dhcpcd.service.d/fixup.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dhcpcd -q -b
ExecStop=
ExecStop=/usr/bin/dhcpcd -x

Offline

Board footer

Powered by FluxBB