You are not logged in.

#1 2014-07-09 15:49:16

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

[SOLVED]netctl-auto no longer working

Can some kind person point me in the right direction to fix this? Seems to have stopped working after latest upgrade.  Manually netctl start works OK.  Haven't been able to find the solution in man pages or googling.

netctl-auto@wlp16s0.service - Automatic wireless network connection using netctl profiles
   Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled)
   Active: failed (Result: exit-code) since Wed 2014-07-09 08:00:20 UTC; 1h 14min ago
     Docs: man:netctl.special(7)
  Process: 231 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=1/FAILURE)

Jul 09 08:00:20 arch systemd[1]: Failed to start Automatic wireless network connection using netctl profiles.
Jul 09 08:00:50 arch netctl-auto[231]: Included profile 'wlp16s0-Matviak'
Jul 09 08:00:51 arch netctl-auto[231]: Included profile 'wlp16s0-WIRELESS'
Jul 09 08:00:51 arch netctl-auto[231]: Successfully initialized wpa_supplicant
Jul 09 08:00:51 arch netctl-auto[231]: ctrl_iface exists and seems to be in use - cannot override it
Jul 09 08:00:51 arch netctl-auto[231]: Delete '/run/wpa_supplicant/wlp16s0' manually if it is not used anymore
Jul 09 08:00:51 arch netctl-auto[231]: Failed to initialize control interface '/run/wpa_supplicant'.
Jul 09 08:00:51 arch netctl-auto[231]: You may have another wpa_supplicant process already running or the file was
Jul 09 08:00:51 arch netctl-auto[231]: left by an unclean termination of wpa_supplicant in which case you will need
Jul 09 08:00:51 arch netctl-auto[231]: to manually remove this file before starting wpa_supplicant again.

Last edited by hilltownboy (2014-08-02 12:41:03)

Offline

#2 2014-07-09 15:58:16

tritron4
Member
Registered: 2012-04-14
Posts: 153

Re: [SOLVED]netctl-auto no longer working

Did you try to disable and enable it ?

Last edited by tritron4 (2014-07-09 16:00:15)

Offline

#3 2014-07-09 15:58:39

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED]netctl-auto no longer working

I seem to have been having misbehaving netctl also, not just wireless which is more or less expected, but also with the ethernet-dhcp profile, which isn't normal.  It has seemed to correct the ethernet profile with later updates to the kernel.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#4 2014-07-10 15:36:15

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

disable / enable didn't help

Offline

#5 2014-07-11 01:32:05

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [SOLVED]netctl-auto no longer working

hilltownboy wrote:

disable / enable didn't help

Did you try restarting?  Enable/disable is start-up configuration.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#6 2014-07-11 09:31:36

rix
Member
Registered: 2012-07-25
Posts: 238

Re: [SOLVED]netctl-auto no longer working

Why is above log pointing out two profiles?

Did you tried what log indicates and then restart and renable service?

Offline

#7 2014-07-11 16:17:26

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

rix, the two profiles are wifi links that netctl-auto finds if it is in range of one of them.
I should add that my netctl-auto does work if I manually command it

sudo systemctl netctl-auto@wlp16s0

It just is not working automatically on startup.

Offline

#8 2014-07-13 13:03:01

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

Today I get the following, indicating that netctl-auto is running, but I can't figure out why it does not connect to wlp16s0-WIRELESS.
If I stop netctl-auto, I can then connect to it manually.   

[myname@arch ~] systemctl status netctl-auto@wlp16s0
* netctl-auto@wlp16s0.service - Automatic wireless network connection using netctl profiles
   Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled)
   Active: active (running) since Sun 2014-07-13 07:44:35 UTC; 8min ago
     Docs: man:netctl.special(7)
  Process: 235 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/system-netctl\x2dauto.slice/netctl-auto@wlp16s0.service
           |-311 wpa_supplicant -B -P /run/wpa_supplicant_wlp16s0.pid -i wlp16s0 -D nl80211,wext -c/run/network/wpa_supplicant_wlp16s0.conf -W
           `-314 wpa_actiond -p /run/wpa_supplicant -i wlp16s0 -P /run/network/wpa_actiond_wlp16s0.pid -a /usr/lib/network/auto.action

Jul 13 07:44:35 arch wpa_actiond[314]: Starting wpa_actiond session for interface 'wlp16s0'
Jul 13 07:45:12 arch netctl-auto[235]: Included profile 'wlp16s0-Matviak'
Jul 13 07:45:13 arch netctl-auto[235]: Included profile 'wlp16s0-WIRELESS'
[myname@arch ~]

Offline

#9 2014-07-13 18:31:54

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

Looking at /etc/wpa_supplicant/wpa_supplicant.conf, I found an entry near the bottom (just before the examples) indicating "network" and listing the essid and key of my alternate wifi profile (not the one in use at my home location).  This entry does not appear in wpa_supplicant.conf.pacnew or in an older version (~).  So on a hunch I commented it out, and on the next boot wifi came on automatically.

I dont know how that entry got in there; I have never knowingly configured wpa_supplicant.

I probably should not have bothered the forum with this exercise, but who knows, it may help some other equally unskilled arch afficionado.  I hesitate to mark it solved until I'm sure that it works every time.

Offline

#10 2014-07-14 00:32:30

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED]netctl-auto no longer working

You were right to "bother us."  Trust me, I've done a lot of it.  big_smile Future forum members will see your last post and perhaps try to solve their own issue and will need a similar answer.

Please edit the original post and put [Solved] (or something similar) into the beginning of the subject line.  Have a good solar year!  smile

Offline

#11 2014-07-19 12:00:34

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

The problem has not been solved.  netctl still starts but does not connect.  I have got around it by inserting "sudo systemctl restart netctl-auto@<interface>" in .config/openbox/autostart.  This activates the wifi but it should have occurred automatically.

Offline

#12 2014-07-19 18:45:39

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED]netctl-auto no longer working

Could you please post your netctl profiles here?  It may help if we look at them and see if we can spot any errors.  And maybe you should disable one of the wifi links while trouble-shooting this issue.  It may simplify matters.  For giggles try to rename at least one wifi link without a hyphen in the name, instead use a underscore or no space at all.  Netctl has issues with hyphens I've found.

Offline

#13 2014-07-19 21:56:47

oktorok
Member
From: San Francisco, Ca
Registered: 2014-06-18
Posts: 70

Re: [SOLVED]netctl-auto no longer working

Is the wpa_supplicant.conf entry you mentioned still commented out?  I believe wpa_supplicant.conf will overwrite itself if the line

 update_config=1 

is not commented out.

Offline

#14 2014-07-29 01:30:07

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

MoonSwan, herewith the profiles, which I imagine are OK because they do work.

Description='Automatically generated profile by wifi-menu'
Interface=wlp16s0
Connection=wireless
Security=none
ESSID=WIRELESS
IP=dhcp

Description='Automatically generated profile by wifi-menu'
Interface=wlp16s0
Connection=wireless
Security=wpa
ESSID=Matviak
IP=dhcp
Key=1c64a936646e40870a2d7c70834528bd51bac908c0b31577b85cda761024b852

Offline

#15 2014-07-29 01:34:54

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

oktorok, the wpa_supplicant.conf entry is still commented out after numerous rebootings

Offline

#16 2014-07-29 02:59:51

oktorok
Member
From: San Francisco, Ca
Registered: 2014-06-18
Posts: 70

Re: [SOLVED]netctl-auto no longer working

Can you post your /usr/lib/systemd/system/netctl-auto@.service file?

Let's also take a look at

 journalctl -b | grep wlp16s0 

This will spit out messages from the last boot.

Last edited by oktorok (2014-07-29 04:06:37)

Offline

#17 2014-07-29 15:51:23

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

/usr/lib/systyemd/system/netctl-auto@.service file:

[Unit]
Description=Automatic wireless network connection using netctl profiles
Documentation=man:netctl.special(7)
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target

[Service]
ExecStart=/usr/bin/netctl-auto start %I
ExecStop=/usr/bin/netctl-auto stop %I
RemainAfterExit=yes
Type=forking

[Install]
WantedBy=multi-user.target

Offline

#18 2014-07-29 16:03:40

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

journalctl -b | grep wlp16s0:

ul 29 11:27:17 arch systemd-udevd[148]: renamed network interface wlan0 to wlp16s0
Jul 29 11:27:28 arch kernel: IPv6: ADDRCONF(NETDEV_UP): wlp16s0: link is not ready
Jul 29 11:27:28 arch kernel: IPv6: ADDRCONF(NETDEV_UP): wlp16s0: link is not ready
Jul 29 11:27:19 arch dhcpcd[225]: wlp16s0: adding address fe80::ea40:c74b:8e70:d43a
Jul 29 11:27:23 arch wpa_actiond[317]: Starting wpa_actiond session for interface 'wlp16s0'
Jul 29 11:27:24 arch dhcpcd[230]: wlp16s0: waiting for carrier
Jul 29 11:27:24 arch dhcpcd[230]: wlp16s0: carrier acquired
Jul 29 11:27:25 arch dhcpcd[230]: wlp16s0: IAID e0:20:c5:69
Jul 29 11:27:28 arch dhcpcd[230]: wlp16s0: carrier lost
Jul 29 11:27:25 arch systemd[1]: netctl@wlp16s0\x2dWIRELESS.service: main process exited, code=exited, status=1/FAILURE
Jul 29 11:27:25 arch systemd[1]: Unit netctl@wlp16s0\x2dWIRELESS.service entered failed state.
Jul 29 11:27:28 arch network[222]: Starting network profile 'wlp16s0-WIRELESS'...
Jul 29 11:27:28 arch network[222]: Delete '/run/wpa_supplicant/wlp16s0' manually if it is not used anymore
Jul 29 11:27:28 arch network[222]: The WPA supplicant did not start for interface 'wlp16s0'
Jul 29 11:27:28 arch network[222]: Failed to bring the network up for profile 'wlp16s0-WIRELESS'
Jul 29 11:27:28 arch netctl-auto[223]: Included profile 'wlp16s0-Matviak'
Jul 29 11:27:28 arch netctl-auto[223]: Included profile 'wlp16s0-WIRELESS'
Jul 29 11:27:28 arch dhcpcd[230]: wlp16s0: soliciting a DHCP lease
Jul 29 11:27:28 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:27:28 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down

Jul 29 11:31:21 arch dbus[227]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.7" (uid=1000 pid=605 comm="systemctl restart netctl-auto@wlp16s0 ") interface="org.freedesktop.systemd1.Manager" member="RestartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/sbin/init ")
Jul 29 11:31:22 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:22 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:25 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:25 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:29 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:29 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:29 arch sudo[607]: norman : TTY=pts/1 ; PWD=/home/norman ; USER=root ; COMMAND=/usr/bin/systemctl restart netctl-auto@wlp16s0
Jul 29 11:31:29 arch wpa_actiond[317]: Terminating wpa_actiond session for interface 'wlp16s0'
Jul 29 11:31:33 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:33 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:37 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:37 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:41 arch netctl-auto[633]: Included profile 'wlp16s0-Matviak'
Jul 29 11:31:41 arch netctl-auto[633]: Included profile 'wlp16s0-WIRELESS'
Jul 29 11:31:41 arch dhcpcd[230]: wlp16s0: if_sendrawpacket: Network is down
Jul 29 11:31:41 arch dhcpcd[230]: wlp16s0: dhcp if_readrawpacket: Network is down
Jul 29 11:31:41 arch kernel: IPv6: ADDRCONF(NETDEV_UP): wlp16s0: link is not ready
Jul 29 11:31:41 arch wpa_actiond[651]: Starting wpa_actiond session for interface 'wlp16s0'
Jul 29 11:31:43 arch kernel: wlp16s0: authenticate with f8:1a:67:d3:6f:aa
Jul 29 11:31:43 arch kernel: wlp16s0: send auth to f8:1a:67:d3:6f:aa (try 1/3)
Jul 29 11:31:43 arch kernel: wlp16s0: authenticated
Jul 29 11:31:43 arch kernel: wlp16s0: associate with f8:1a:67:d3:6f:aa (try 1/3)
Jul 29 11:31:43 arch kernel: wlp16s0: RX AssocResp from f8:1a:67:d3:6f:aa (capab=0x421 status=0 aid=2)
Jul 29 11:31:43 arch kernel: wlp16s0: associated
Jul 29 11:31:43 arch kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp16s0: link becomes ready
Jul 29 11:31:43 arch dhcpcd[230]: wlp16s0: carrier acquired
Jul 29 11:31:43 arch wpa_actiond[651]: Interface 'wlp16s0' connected to network 'WIRELESS'
Jul 29 11:31:43 arch dhcpcd[230]: wlp16s0: adding address fe80::ad30:b256:e3a3:dbd0
Jul 29 11:31:43 arch dhcpcd[230]: wlp16s0: IAID e0:20:c5:69
Jul 29 11:31:43 arch dhcpcd[230]: control command: dhcpcd -4 -q -t 30 -K -L wlp16s0
Jul 29 11:31:43 arch dhcpcd[230]: wlp16s0: soliciting a DHCP lease
Jul 29 11:31:43 arch dhcpcd[230]: wlp16s0: offered 192.168.0.100 from 192.168.0.1
Jul 29 11:31:44 arch dhcpcd[230]: wlp16s0: soliciting an IPv6 router
Jul 29 11:31:48 arch dhcpcd[230]: wlp16s0: leased 192.168.0.100 for 7200 seconds
Jul 29 11:31:48 arch dhcpcd[230]: wlp16s0: adding route to 192.168.0.0/24
Jul 29 11:31:48 arch dhcpcd[230]: wlp16s0: adding default route via 192.168.0.1
Jul 29 11:31:56 arch dhcpcd[230]: wlp16s0: no IPv6 Routers available

Blank line omits dozens of repeated "Network is down", etc.

Offline

#19 2014-07-29 16:55:42

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED]netctl-auto no longer working

OK I think I'm getting confused here.  So please tell me if these are "correct" or that I'm a bloody idiot.

First off I saw that only 1 profile has a Key line.  So one doesn't use an encryption module or is that a mistake in your cut/paste?

Secondly, might this be a part of the problem:

 Jul 29 11:27:28 arch network[222]: Delete '/run/wpa_supplicant/wlp16s0' manually if it is not used anymore 

I.E. there still is a link that you need to manually delete after a failed execution?

Third, I'm going to guess that your network includes two separate modems and/or routers based on these two lines:

Jul 29 11:27:19 arch dhcpcd[225]: wlp16s0: adding address fe80::ea40:c74b:8e70:d43a
Jul 29 11:31:43 arch kernel: wlp16s0: authenticate with f8:1a:67:d3:6f:aa

It appears as if the one profile is trying to connect with one device, fails and then proceeds to the next one.  I hope that's the case because otherwise I'm clueless.

I'm starting to run out of ideas too.  This is not simple and I do understand, I think, your frustration.

Offline

#20 2014-07-29 17:16:34

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

Only one of the profiles has a "key" - that's normal
"run/wpa_supplicant", etc, I don't understand.  I believe that wpa_supplicant does get used because it shows up as a process being used
Two modems: my home profile (WIRELESS) uses my home router and modem.  The "away from home" profile (Matviak) uses Matviak's router.

Offline

#21 2014-07-29 17:45:03

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED]netctl-auto no longer working

OK that clears things up, thank you.

As for the /run/wpa_supplicant thing, yes WPA Supplicant is in use in for the profile with a key.  What it's suggesting is that, after a failed connection, navigate to that directory (under /var/run I believe), delete that LOCK file and try to connect again.  The LOCK file is just a way for linux to tell the networking session's apps that there is already a process in-place and not to start up a duplicate set of actions.

I'm not sure where else to go from here.  Hopefully a network admin will see this and help.

Offline

#22 2014-07-29 20:56:28

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

It looks as though you have multiple services trying to configure the same network, netctl@wlp16s0\x2dWIRELESS.service and netctl-auto@wlp16s0. You can run

systemctl status "netctl*.service"

to get information on all netctl services. If you do indeed have a service for a specific network in addition to netctl-auto, I believe you need to disable one of them; it sounds like you want to autoconnect to whichever profile is relevant, so leave the netctl-auto@wlp16s0 service alone and

systemctl disable netctl@wlp16s0\\x2dWIRELESS  #Note the double backslash in the \x2d escape.

and see if that helps.

Services should clean up their own wpa_supplicant lock files, it's not something you should ever have to do as a regular part of connecting.

Last edited by eewallace (2014-07-29 20:57:21)

Offline

#23 2014-07-29 22:15:28

oktorok
Member
From: San Francisco, Ca
Registered: 2014-06-18
Posts: 70

Re: [SOLVED]netctl-auto no longer working

From man:netctl.special(7)

netctl.service
           When started, this unit tries to start the profiles that were running
           when the unit was last stopped. In some cases, the interface a
           profile binds to might not be available yet, when netctl.service
           tries to bring a profile up. A simple, hackish, solution is to do:

           echo "[[ -t 0 ]] || sleep 3" > /etc/netctl/interfaces/<interface>
           chmod 755 /etc/netctl/interfaces/<interface>

           A more concise solution is to first enable a profile through netctl
           and then disable it again through systemctl:

           netctl enable <profile>
           systemctl disable netctl@<profile>

           This way the unit configuration file for the profile remains in
           existence, while the profile is not enabled.

Thinking along the the same lines as eewallace, conflicting services are problematic .  Maybe (after disabling the profiles) try 

  
 netctl enable <profile>
 systemctl disable netctl@<profile>

Then logout/login to test.  The key to this idea, perhaps obviously, is

This way the unit configuration file for the profile remains in existence, while the profile is not enabled.

eewallace may be presenting the same thing in a more concise manner, but at least you have a couple things to go on, sorry it this is redundant.

Offline

#24 2014-07-29 22:31:54

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

oktorok wrote:

From man:netctl.special(7)

netctl.service
           When started, this unit tries to start the profiles that were running
           when the unit was last stopped. In some cases, the interface a
           profile binds to might not be available yet, when netctl.service
           tries to bring a profile up. A simple, hackish, solution is to do:

           echo "[[ -t 0 ]] || sleep 3" > /etc/netctl/interfaces/<interface>
           chmod 755 /etc/netctl/interfaces/<interface>

           A more concise solution is to first enable a profile through netctl
           and then disable it again through systemctl:

           netctl enable <profile>
           systemctl disable netctl@<profile>

           This way the unit configuration file for the profile remains in
           existence, while the profile is not enabled.

Thinking along the the same lines as eewallace, conflicting services are problematic .  Maybe (after disabling the profiles) try 

  
 netctl enable <profile>
 systemctl disable netctl@<profile>

Then logout/login to test.  The key to this idea, perhaps obviously, is

This way the unit configuration file for the profile remains in existence, while the profile is not enabled.

eewallace may be presenting the same thing in a more concise manner, but at least you have a couple things to go on, sorry it this is redundant.

I can't claim to understand the solution proposed in the manpage, but it seems to be addressing a different problem. [Edit: I think I do understand it now, having read through it again, but it's still not relevant to the problem at hand, as far as I can tell.] My understanding of the OP's situation is that they want to use netctl-auto to automatically connect to whichever of a set of profiles is appropriate, but that they already have a systemd service enabled to connect to a specific profile, which is conflicting with the netctl-auto service. If that's the case, then the solution is simply to disable the netctl@<profile> service, and let netctl-auto@<interface>.service deal with finding the appropriate profile to connect to, as it's designed to do. I don't think your suggestion will hurt, since it does disable the service, as is needed, but as far as I can tell, the "netctl enable <profile>" bit is superfluous - netctl-auto doesn't need systemd unit files for the specific profiles to exist in order to do its job.

Last edited by eewallace (2014-07-29 22:34:22)

Offline

#25 2014-07-29 23:24:58

oktorok
Member
From: San Francisco, Ca
Registered: 2014-06-18
Posts: 70

Re: [SOLVED]netctl-auto no longer working

Hi eewallace,

netctl-auto doesn't need systemd unit files for the specific profiles to exist in order to do its job.

Because when netctl-auto enables the profile it will create the unit configuration file?  That makes sense.

Offline

Board footer

Powered by FluxBB