You are not logged in.

#1 2013-04-22 13:48:17

davidek
Member
Registered: 2013-04-22
Posts: 2

Transient connection problems with netctl

Hi Archers!

I tried to configure automatic wifi connection with netctl like it is described in the wiki (https://wiki.archlinux.org/index.php/Ne … e_Profiles)

But unfortunatly it fails at startup, with no internet connection bein availiable after. systemctl outputs

 netctl-auto@wlp2s0.service    loaded failed failed    Automatic wireless network connection using netctl profiles 

for the service.

Calling journalctl -xn I get:

 [...] dhcpcd[742]: dhcpcd will not work correctly unless run as root 

Is that realy the problem? How can I tell netctl to run dhcpcd as root?

My netctl config file for the network I want to use is

Description='eduroam wiht wpa_supplicant config file'
Interface=wlp2s0
Connection=wireless
Security=wpa
WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
IP=dhcp

Greets
davidek

Last edited by davidek (2013-04-26 11:08:13)

Offline

#2 2013-04-22 15:09:52

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Transient connection problems with netctl

Welcome to the forums davidek,

When commands in the wiki are prefixed with the # sign, it usually means that you need to run it as root. You have a root account and a user account right? If you have added your user account to sudoers then you can use sudo else you su into the root account and then run the command again


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2013-04-22 15:15:02

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

Re: Transient connection problems with netctl

I am not sure how you were able to have the service telling you it failed if you didn't try to run it as root in the first place...

When you did "systemctl start <service>" did it output something like this:

$ systemctl stop <service>
Failed to issue method call: Access denied

If so, Inxsible is right, and you need to do some researching into the users/permissions of a *nix system.

Offline

#4 2013-04-22 18:40:13

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: Transient connection problems with netctl

As you have set up your netctl profile to use dhcp in order for netctl to work correctly it expects the dhcpd.service already to be running. As apparently it does/did not netctl obviously will fail.

A look at the systemd wiki entry (in this case regarding service files) would be too advisable once you have solved/understood what caused your, momentary, problem.


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

#5 2013-04-26 10:44:59

davidek
Member
Registered: 2013-04-22
Posts: 2

Re: Transient connection problems with netctl

Hi folks,

thanks for your answers so far. I know what root, su and sudo is. wink

I did some further investigations with netctl-auto disabled. Now I'm trying to connect manually with netctl after startup:

davidek@klapprad ~ % sudo netctl start wlp2s0-DI-524                     
Job for netctl@wlp2s0\x2dDI\x2d524.service failed. See 'systemctl status netctl@wlp2s0\x2dDI\x2d524.service' and 'journalctl -xn' for details.
davidek@klapprad ~ % systemctl status netctl@wlp2s0x2dDIx2d524.service   
netctl@wlp2s0x2dDIx2d524.service - Networking for netctl profile wlp2s0x2dDIx2d524
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

jounaltctl -xn does not contain new log messages this time.

I called "sudo netctl start wlp2s0-DI-524" multiple times and after the third try I successfully connected to the net! Here is my dmesg log:

[  124.179162] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  125.211937] wlp2s0: authenticate with 00:15:e9:09:49:14
[  125.223772] wlp2s0: send auth to 00:15:e9:09:49:14 (try 1/3)
[  125.225755] wlp2s0: authenticated
[  125.226071] ath9k 0000:02:00.0 wlp2s0: disabling HT as WMM/QoS is not supported by the AP
[  125.226084] ath9k 0000:02:00.0 wlp2s0: disabling VHT as WMM/QoS is not supported by the AP
[  125.226786] wlp2s0: associate with 00:15:e9:09:49:14 (try 1/3)
[  125.229288] wlp2s0: RX AssocResp from 00:15:e9:09:49:14 (capab=0x431 status=0 aid=1)
[  125.229478] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[  125.229700] wlp2s0: associated
[  136.033246] wlp2s0: deauthenticating from 00:15:e9:09:49:14 by local choice (reason=3)
[  136.046732] cfg80211: Calling CRDA to update world regulatory domain
[  356.654216] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  357.688551] wlp2s0: authenticate with 00:15:e9:09:49:14
[  357.693747] wlp2s0: send auth to 00:15:e9:09:49:14 (try 1/3)
[  357.695722] wlp2s0: authenticated
[  357.696058] ath9k 0000:02:00.0 wlp2s0: disabling HT as WMM/QoS is not supported by the AP
[  357.696072] ath9k 0000:02:00.0 wlp2s0: disabling VHT as WMM/QoS is not supported by the AP
[  357.696788] wlp2s0: associate with 00:15:e9:09:49:14 (try 1/3)
[  357.699262] wlp2s0: RX AssocResp from 00:15:e9:09:49:14 (capab=0x431 status=0 aid=1)
[  357.699426] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[  357.699650] wlp2s0: associated
[  368.330095] wlp2s0: deauthenticating from 00:15:e9:09:49:14 by local choice (reason=3)
[  368.342278] cfg80211: Calling CRDA to update world regulatory domain
[  370.469519] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  371.505173] wlp2s0: authenticate with 00:15:e9:09:49:14
[  371.510447] wlp2s0: send auth to 00:15:e9:09:49:14 (try 1/3)
[  371.512419] wlp2s0: authenticated
[  371.512763] ath9k 0000:02:00.0 wlp2s0: disabling HT as WMM/QoS is not supported by the AP
[  371.512777] ath9k 0000:02:00.0 wlp2s0: disabling VHT as WMM/QoS is not supported by the AP
[  371.513435] wlp2s0: associate with 00:15:e9:09:49:14 (try 1/3)
[  371.515906] wlp2s0: RX AssocResp from 00:15:e9:09:49:14 (capab=0x431 status=0 aid=1)
[  371.516062] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[  371.516289] wlp2s0: associated

Im sitting next to my wifi router, so it should not be an signal strength problem.

I hope you have some more ideas.

Greets
davidek


Edit:

By the way; I used this script as a workaround for my netctl problem to do a manual connect, which works flawlessly:

#!/bin/sh
sudo wpa_supplicant -D wext -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
sudo dhcpcd wlp2s0

Edit 2:
I noticed that you get more output from journalctl by calling it with root privileges, so here is some more information being logged while I did one failing connection attempt.

Apr 26 12:54:58 klapprad login[202]: pam_unix(login:session): session opened for user davidek by LOGIN(uid=0)
Apr 26 12:54:58 klapprad systemd-logind[198]: New session 1 of user davidek.
-- Subject: A new session 1 has been created for user davidek
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-- 
-- A new session with the ID 1 has been created for the user davidek.
-- 
-- The leading process of the session is 202.
Apr 26 12:54:58 klapprad login[202]: LOGIN ON tty1 BY davidek
Apr 26 12:55:10 klapprad sudo[303]: davidek : TTY=tty1 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/netctl start wlp2s0-DI-524
Apr 26 12:55:10 klapprad sudo[303]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 12:55:10 klapprad systemd[1]: Starting Networking for netctl profile wlp2s0-DI-524...
-- Subject: Unit netctl@wlp2s0\x2dDI\x2d524.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@wlp2s0\x2dDI\x2d524.service has begun starting up.
Apr 26 12:55:10 klapprad network[310]: Starting network profile 'wlp2s0-DI-524'...
Apr 26 12:55:10 klapprad kernel: IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
Apr 26 12:55:11 klapprad kernel: wlp2s0: authenticate with 00:15:e9:09:49:14
Apr 26 12:55:11 klapprad kernel: wlp2s0: send auth to 00:15:e9:09:49:14 (try 1/3)
Apr 26 12:55:11 klapprad kernel: wlp2s0: authenticated
Apr 26 12:55:11 klapprad kernel: ath9k 0000:02:00.0 wlp2s0: disabling HT as WMM/QoS is not supported by the AP
Apr 26 12:55:11 klapprad kernel: ath9k 0000:02:00.0 wlp2s0: disabling VHT as WMM/QoS is not supported by the AP
Apr 26 12:55:11 klapprad kernel: wlp2s0: associate with 00:15:e9:09:49:14 (try 1/3)
Apr 26 12:55:11 klapprad kernel: wlp2s0: RX AssocResp from 00:15:e9:09:49:14 (capab=0x431 status=0 aid=1)
Apr 26 12:55:11 klapprad kernel: wlp2s0: associated
Apr 26 12:55:11 klapprad kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
Apr 26 12:55:12 klapprad dhcpcd[369]: version 5.6.7 starting
Apr 26 12:55:12 klapprad dhcpcd[369]: wlp2s0: sending IPv6 Router Solicitation
Apr 26 12:55:12 klapprad dhcpcd[369]: wlp2s0: sendmsg: Cannot assign requested address
Apr 26 12:55:12 klapprad dhcpcd[369]: wlp2s0: broadcasting for a lease
Apr 26 12:55:14 klapprad ntpd[204]: Listen normally on 4 wlp2s0 fe80::72f1:a1ff:fe64:4b5a UDP 123
Apr 26 12:55:14 klapprad ntpd[204]: peers refreshed
Apr 26 12:55:14 klapprad ntpd[204]: new interface(s) found: waking up resolver
Apr 26 12:55:16 klapprad dhcpcd[369]: wlp2s0: sending IPv6 Router Solicitation
Apr 26 12:55:16 klapprad ntpd_intres[209]: host name not found: 0.de.pool.ntp.org
Apr 26 12:55:16 klapprad ntpd_intres[209]: host name not found: 1.de.pool.ntp.org
Apr 26 12:55:16 klapprad ntpd_intres[209]: host name not found: 2.de.pool.ntp.org
Apr 26 12:55:16 klapprad ntpd_intres[209]: host name not found: 3.de.pool.ntp.org
Apr 26 12:55:20 klapprad dhcpcd[369]: wlp2s0: sending IPv6 Router Solicitation
Apr 26 12:55:22 klapprad dhcpcd[369]: timed out
Apr 26 12:55:22 klapprad network[310]: DHCP IP lease attempt failed on interface 'wlp2s0'
Apr 26 12:55:22 klapprad kernel: wlp2s0: deauthenticating from 00:15:e9:09:49:14 by local choice (reason=3)
Apr 26 12:55:22 klapprad kernel: cfg80211: Calling CRDA to update world regulatory domain
Apr 26 12:55:22 klapprad network[310]: Failed to bring the network up for profile 'wlp2s0-DI-524'
Apr 26 12:55:22 klapprad systemd[1]: netctl@wlp2s0\x2dDI\x2d524.service: main process exited, code=exited, status=1/FAILURE
Apr 26 12:55:22 klapprad systemd[1]: Failed to start Networking for netctl profile wlp2s0-DI-524.
-- Subject: Unit netctl@wlp2s0\x2dDI\x2d524.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@wlp2s0\x2dDI\x2d524.service has failed.
-- 
-- The result is failed.
Apr 26 12:55:22 klapprad systemd[1]: Unit netctl@wlp2s0\x2dDI\x2d524.service entered failed state
Apr 26 12:55:22 klapprad systemd[1]: Starting Network.
-- Subject: Unit network.target has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.target has begun starting up.
Apr 26 12:55:22 klapprad systemd[1]: Reached target Network.
-- Subject: Unit network.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.target has finished starting up.
-- 
-- The start-up result is done.
Apr 26 12:55:22 klapprad sudo[303]: pam_unix(sudo:session): session closed for user root
Apr 26 12:55:23 klapprad ntpd[204]: Deleting interface #4 wlp2s0, fe80::72f1:a1ff:fe64:4b5a#123, interface stats: received=0, sent=0, dropped=0, active_time=9 secs
Apr 26 12:55:23 klapprad ntpd[204]: peers refreshed
Apr 26 12:55:27 klapprad sudo[445]: davidek : TTY=tty1 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Apr 26 12:55:27 klapprad sudo[445]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 12:56:34 klapprad sudo[445]: pam_unix(sudo:session): session closed for user root
Apr 26 12:56:35 klapprad sudo[456]: davidek : TTY=tty1 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Apr 26 12:56:35 klapprad sudo[456]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 12:56:43 klapprad sudo[456]: pam_unix(sudo:session): session closed for user root
Apr 26 12:56:44 klapprad sudo[467]: davidek : TTY=tty1 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -x
Apr 26 12:56:44 klapprad sudo[467]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 12:56:53 klapprad sudo[467]: pam_unix(sudo:session): session closed for user root
Apr 26 12:57:18 klapprad ntpd_intres[209]: host name not found: 0.de.pool.ntp.org
Apr 26 12:57:18 klapprad ntpd_intres[209]: host name not found: 1.de.pool.ntp.org
Apr 26 12:57:18 klapprad ntpd_intres[209]: host name not found: 2.de.pool.ntp.org
Apr 26 12:57:18 klapprad ntpd_intres[209]: host name not found: 3.de.pool.ntp.org
Apr 26 12:57:27 klapprad sudo[505]: davidek : TTY=tty1 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -xb
Apr 26 12:57:27 klapprad sudo[505]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 12:59:02 klapprad sudo[505]: pam_unix(sudo:session): session closed for user root
Apr 26 13:00:54 klapprad sudo[646]: davidek : TTY=pts/0 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -xb
Apr 26 13:00:54 klapprad sudo[646]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)
Apr 26 13:01:01 klapprad sudo[646]: pam_unix(sudo:session): session closed for user root
Apr 26 13:01:05 klapprad sudo[657]: davidek : TTY=pts/0 ; PWD=/home/davidek ; USER=root ; COMMAND=/usr/bin/journalctl -xb
Apr 26 13:01:05 klapprad sudo[657]: pam_unix(sudo:session): session opened for user root by davidek(uid=0)

Last edited by davidek (2013-04-26 11:05:27)

Offline

Board footer

Powered by FluxBB