Arch Linux에서 NetworkManager를 사용하여 랩톱에서 핫스팟을 호스팅할 계획입니다. 핫스팟 구성을 만드는 것은 어렵지 않습니다. 그런데 생성된 핫스팟 연결을 활성화하려고 하면 오류가 발생합니다.
Error: Connection activation failed: 802.1X supplicant took too long to authenticate
Hint: use 'journalctl -xe NM_CONNECTION=b9ecc651-d491-414d-9c26-a3800cf2c9fd + NM_DEVICE=wlp3s0' to get more details.
확인을 제안한 저널을 찾아서 다음 위치에 붙여넣었습니다.
-- Logs begin at Sat 2019-10-12 06:59:32 UTC, end at Sat 2020-09-26 23:29:53 UTC. --
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.0692] device (wlp3s0): set-hw-addr: set MAC address to D2:D0:FE:25:82:24 (scanning)
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1337] device (wlp3s0): Activation: starting connection 'Hotspot' (b9ecc651-d491-414d-9c26-a3800cf2c9fd)
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1349] device (wlp3s0): supplicant interface state: completed -> disconnected
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1526] device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1611] device (wlp3s0): set-hw-addr: set-cloned MAC address to 7C:7A:91:3D:C5:ED (stable)
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1639] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1643] device (wlp3s0): Activation: (wifi) access point 'Hotspot' has security, but secrets are required.
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1643] device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1749] device (wlp3s0): supplicant interface state: disconnected -> interface_disabled
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1769] device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1781] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1785] device (wlp3s0): Activation: (wifi) connection 'Hotspot' has security, and secrets exist. No new secrets needed.
Sep 26 23:29:23 ArchPad NetworkManager[1201]: <info> [1601162963.1817] device (wlp3s0): supplicant interface state: interface_disabled -> disconnected
Sep 26 23:29:48 ArchPad NetworkManager[1201]: <warn> [1601162988.5177] device (wlp3s0): Activation: (wifi) Hotspot network creation took too long, failing activation
Sep 26 23:29:48 ArchPad NetworkManager[1201]: <info> [1601162988.5178] device (wlp3s0): state change: config -> failed (reason 'supplicant-timeout', sys-iface-state: 'managed')
Sep 26 23:29:48 ArchPad NetworkManager[1201]: <warn> [1601162988.5199] device (wlp3s0): Activation: failed for connection 'Hotspot'
Sep 26 23:29:48 ArchPad NetworkManager[1201]: <info> [1601162988.5215] device (wlp3s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Sep 26 23:29:48 ArchPad NetworkManager[1201]: <info> [1601162988.5263] device (wlp3s0): set-hw-addr: set MAC address to 6E:7F:89:23:28:29 (scanning)
wpa_supplicant가 핫스팟 설정에 너무 많은 시간을 소비하는 것 같습니다. 핫스팟 연결 구성을 확인했는데 요청자 시간 초과와 관련된 내용이 없는 것 같습니다.
connection.id: Hotspot
connection.uuid: b9ecc651-d491-414d-9c26-a3800cf2c9fd
connection.stable-id: --
connection.type: 802-11-wireless
connection.interface-name: wlp3s0
connection.autoconnect: no
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
connection.wait-device-timeout: -1
802-11-wireless.ssid: TP-Link
802-11-wireless.mode: ap
802-11-wireless.band: a
802-11-wireless.channel: 7
802-11-wireless.bssid: --
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address: --
802-11-wireless.cloned-mac-address: stable
802-11-wireless.generate-mac-address-mask:FE:FF:FF:00:00:00
802-11-wireless.mac-address-blacklist: --
802-11-wireless.mac-address-randomization:default
802-11-wireless.mtu: auto
802-11-wireless.seen-bssids: --
802-11-wireless.hidden: no
802-11-wireless.powersave: 0 (default)
802-11-wireless.wake-on-wlan: 0x1 (default)
802-11-wireless-security.key-mgmt: wpa-psk
802-11-wireless-security.wep-tx-keyidx: 0
802-11-wireless-security.auth-alg: --
802-11-wireless-security.proto: rsn
802-11-wireless-security.pairwise: ccmp
802-11-wireless-security.group: ccmp
802-11-wireless-security.pmf: 0 (default)
802-11-wireless-security.leap-username: --
802-11-wireless-security.wep-key0: <hidden>
802-11-wireless-security.wep-key1: <hidden>
802-11-wireless-security.wep-key2: <hidden>
802-11-wireless-security.wep-key3: <hidden>
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type: unknown
802-11-wireless-security.psk: <hidden>
802-11-wireless-security.psk-flags: 0 (none)
802-11-wireless-security.leap-password: <hidden>
802-11-wireless-security.leap-password-flags:0 (none)
802-11-wireless-security.wps-method: 0x0 (default)
802-11-wireless-security.fils: 0 (default)
ipv4.method: shared
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: --
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.routing-rules: --
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-iaid: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.dhcp-hostname-flags: 0x0 (none)
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: ignore
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: --
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.routing-rules: --
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.ra-timeout: 0 (default)
ipv6.dhcp-duid: --
ipv6.dhcp-iaid: --
ipv6.dhcp-timeout: 0 (default)
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.dhcp-hostname-flags: 0x0 (none)
ipv6.token: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
또한 내 노트북의 무선 카드 모델은 Intel Wireless-AC 7260으로 핫스팟을 호스팅할 수 있다고 가정합니다. 누구든지 이 문제에 대해 어떤 생각을 가지고 있습니까?
고쳐 쓰다802-11-wireless.channel
: 적절한 값으로 변경한 후에도 문제가 여전히 존재하며 다음 로그
-- Journal begins at Mon 2020-12-14 23:36:12 UTC, ends at Fri 2021-01-29 00:07:08 UTC. --
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3131] device (wlp3s0): Activation: starting connection 'Hotspot' (1b0ceabe-4f67-4b5a-8e09-6924744535d4)
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3134] device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3527] device (wlp3s0): set-hw-addr: reset MAC address to 7C:7A:91:A2:BB:B5 (preserve)
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3564] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3573] device (wlp3s0): Activation: (wifi) access point 'Hotspot' has security, but secrets are required.
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3575] device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3598] device (wlp3s0): supplicant interface state: inactive -> interface_disabled
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3632] device (wlp3s0): supplicant interface state: interface_disabled -> inactive
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3649] device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3675] device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3679] device (wlp3s0): Activation: (wifi) connection 'Hotspot' has security, and secrets exist. No new secrets needed.
Jan 29 00:05:05 ArchPad NetworkManager[1175]: <info> [1611878705.3911] device (wlp3s0): supplicant interface state: inactive -> disconnected
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <warn> [1611878730.5137] device (wlp3s0): Activation: (wifi) Hotspot network creation took too long, failing activation
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <info> [1611878730.5138] device (wlp3s0): state change: config -> failed (reason 'supplicant-timeout', sys-iface-state: 'managed')
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <warn> [1611878730.5159] device (wlp3s0): Activation: failed for connection 'Hotspot'
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <info> [1611878730.5163] device (wlp3s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <info> [1611878730.5230] device (wlp3s0): set-hw-addr: set MAC address to B6:1B:A6:1C:81:BD (scanning)
Jan 29 00:05:30 ArchPad NetworkManager[1175]: <info> [1611878730.5280] device (wlp3s0): supplicant interface state: disconnected -> inactive
답변1
Ubuntu 21.10에서도 이 문제가 발생했습니다.
>nmcli connection up bridge-slave-wlp4s0
Error: Connection activation failed: 802.1X supplicant took too long to authenticate
궁극적으로 도움이 된 유일한 방법은 로그를 켜는 것이었습니다 wpa_supplicant
.
>wpa_cli -i wlp4s0 log_level debug
OK
debug
그 후에는 로그인이 표시되기 시작합니다 journalctl -f
. 이제 로그를 필터링하고 추적합니다.
journalctl -f -u wpa_supplicant -u NetworkManager -u systemd-networkd
이것을 열어두고 다른 세션에서 연결을 활성화해 보십시오.
제 경우에는 채널과 관련된 다양한 문제로 밝혀졌습니다. 예를 들어 다른 답변에서 제안한 채널 120도 마찬가지입니다.
wpa_supplicant[1030]: Channel 120 (primary) not allowed for AP mode, flags: 0x17b NO-IR RADAR
wpa_supplicant[1030]: hostapd_logger: Configured channel (120) not found from the channel list of current mode (2) IEEE 802.11a
wpa_supplicant[1030]: hostapd_logger: Hardware does not support configured channel
효과적인 채널은 국가를 포함한 다양한 요인에 따라 달라진다는 점을 기억해야 합니다.
iw reg get
내 경우에는 두 가지 항목이 있습니다.
global
country 00: DFS-UNSET
(2402 - 2472 @ 40), (N/A, 20), (N/A)
...
phy#0 (self-managed)
country CA: DFS-UNSET
(2402 - 2437 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ
...
다음을 사용하여 전역을 내 국가로 수정했습니다.
iw reg set CA
귀하의 지역에 적합한 주파수 세트를 얻게 되며 다음과 페어링할 수 있습니다.https://en.wikipedia.org/wiki/List_of_WLAN_channels동등한 채널을 찾으십시오.
지금은 그게 전부가 아닙니다. 유효한 것으로 보고된 채널(예: 42)도 결국 실패합니다.
wpa_supplicant[1030]: nl80211: Set freq 5210 (ht_enabled=0, vht_enabled=0, he_enabled=0, bandwidth=0 MHz, cf1=0 MHz, cf2=0 MHz)
wpa_supplicant[1030]: * freq=5210
wpa_supplicant[1030]: * he_enabled=0
wpa_supplicant[1030]: * vht_enabled=0
wpa_supplicant[1030]: * ht_enabled=0
wpa_supplicant[1030]: * channel_type=0
wpa_supplicant[1030]: nl80211: kernel reports: Channel is disabled
wpa_supplicant[1030]: nl80211: Failed to set channel (freq=5210): -22 (Invalid argument)
(나중에 "핫스팟 네트워크 생성에 시간이 너무 오래 걸립니다"라는 무서운 문제가 발생함)
iw reg get
내 지역을 정확하게 추측했음에도 불구하고 다음 파일이 설정되지 않은 것으로 나타났습니다 .
> cat /etc/default/crda
# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
# the initial regulatory domain setting for IEEE 802.11 devices which operate
# on this system.
#
# Governments assert the right to regulate usage of radio spectrum within
# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
# country code suitable for your location or you may infringe on local
# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
# descriptions containing ISO/IEC 3166-1 alpha2 country codes.
REGDOMAIN=
내 경우에는 조정 REGDOMAIN=CA
하고 다시 시작했습니다.
하지만 여전히 실패했습니다.
마지막으로 로그에서 다음 디버그 항목을 발견했습니다.
wpa_supplicant[1029]: P2P: Add operating class 81
wpa_supplicant[1029]: P2P: Channels - hexdump(len=13): 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d
wpa_supplicant[1029]: P2P: Add operating class 124
wpa_supplicant[1029]: P2P: Channels - hexdump(len=4): 95 99 9d a1
wpa_supplicant[1029]: P2P: Add operating class 125
wpa_supplicant[1029]: P2P: Channels - hexdump(len=5): 95 99 9d a1 a5
wpa_supplicant[1029]: P2P: Add operating class 126
wpa_supplicant[1029]: P2P: Channels - hexdump(len=2): 95 9d
wpa_supplicant[1029]: P2P: Add operating class 127
wpa_supplicant[1029]: P2P: Channels - hexdump(len=2): 99 a1
wpa_supplicant[1029]: P2P: Update channel list
wpa_supplicant[1029]: P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11,12,13 124:149,153,157,161 125:149,153,157,161,165 126:149,157 127:153,161
그래서 나열된 채널 중 하나를 사용해 보았습니다.
>nmcli connection modify bridge-slave-wlp4s0 wifi.channel 161
>nmcli connection up bridge-slave-wlp4s0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/19)
즉시 작동했습니다.
따라서 내 채널 중 일부가 왜 제한되는지 여전히 잘 모르겠지만, Journalctl을 보고 wpa 로그를 디버깅하도록 설정하면 작업 채널 목록을 찾을 수 있습니다.
[편집] 좀 더 검색한 결과 일부 채널을 사용할 수 없는 이유를 발견했습니다. 내 인텔 카드는 20Mhz 이외의 대역을 지원하지 않습니다.
다음은 클라이언트 모드에서만 지원되는 채널을 나열합니다.
>iw phy phy0 info | grep "no IR"
phy phy0 info | grep "no IR"
* 5180 MHz [36] (22.0 dBm) (no IR)
* 5200 MHz [40] (22.0 dBm) (no IR)
* 5220 MHz [44] (22.0 dBm) (no IR)
* 5240 MHz [48] (22.0 dBm) (no IR)
* 5260 MHz [52] (22.0 dBm) (no IR, radar detection)
* 5280 MHz [56] (22.0 dBm) (no IR, radar detection)
* 5300 MHz [60] (22.0 dBm) (no IR, radar detection)
* 5320 MHz [64] (22.0 dBm) (no IR, radar detection)
* 5500 MHz [100] (22.0 dBm) (no IR, radar detection)
* 5520 MHz [104] (22.0 dBm) (no IR, radar detection)
* 5540 MHz [108] (22.0 dBm) (no IR, radar detection)
* 5560 MHz [112] (22.0 dBm) (no IR, radar detection)
* 5580 MHz [116] (22.0 dBm) (no IR, radar detection)
* 5600 MHz [120] (22.0 dBm) (no IR, radar detection)
* 5620 MHz [124] (22.0 dBm) (no IR, radar detection)
* 5640 MHz [128] (22.0 dBm) (no IR, radar detection)
* 5660 MHz [132] (22.0 dBm) (no IR, radar detection)
* 5680 MHz [136] (22.0 dBm) (no IR, radar detection)
* 5700 MHz [140] (22.0 dBm) (no IR, radar detection)
* 5720 MHz [144] (22.0 dBm) (no IR, radar detection)
해당 목록의 다른 채널은 다음과 같이 표시됩니다 disabled
. 따라서 결국 사용 가능한 채널을 나열하는 데 사용되는 것은 다음과 같습니다.
iw phy phy0 info | grep "MHz \[" | grep -v "no IR" | grep -v "disabled"
* 2412 MHz [1] (22.0 dBm)
* 2417 MHz [2] (22.0 dBm)
* 2422 MHz [3] (22.0 dBm)
* 2427 MHz [4] (22.0 dBm)
* 2432 MHz [5] (22.0 dBm)
* 2437 MHz [6] (22.0 dBm)
* 2442 MHz [7] (22.0 dBm)
* 2447 MHz [8] (22.0 dBm)
* 2452 MHz [9] (22.0 dBm)
* 2457 MHz [10] (22.0 dBm)
* 2462 MHz [11] (22.0 dBm)
* 2467 MHz [12] (22.0 dBm)
* 2472 MHz [13] (22.0 dBm)
* 5745 MHz [149] (22.0 dBm)
* 5765 MHz [153] (22.0 dBm)
* 5785 MHz [157] (22.0 dBm)
* 5805 MHz [161] (22.0 dBm)
* 5825 MHz [165] (22.0 dBm)
답변2
이 질문이 오래되었다는 것을 알고 있지만 Ubuntu 21.10에서 이 오류가 발생했으며 해결 방법도 찾았습니다.
이 문제는 WiFi MAC 무작위화로 인해 발생합니다. 즉, 새 AP로 전환할 때마다(핫스팟 생성 포함) WiFi 인터페이스를 껐다가 켜야 함을 의미합니다. 이로 인해 사용 가능한 AP가 다시 검색되어 시간 초과가 발생합니다.
해결 방법은 다음을 포함하는 파일을 추가하여 MAC 무작위화를 비활성화하는 것입니다 /etc/NetworkManager/conf.d/99-wifi.conf
.
[device-wifi-no-scan-mac-rand]
wifi.scan-rand-mac-address=no
다음:
$ sudo systemctl restart NetworkManager
$ sudo systemctl restart wpa_supplicant
가셔도 좋습니다. 솔직히 말해서 위 중 어느 것이 필요한지는 모르겠지만(있는 경우) 무해하며 사용 가능한 Wi-Fi 핫스팟을 제공합니다.