wifi-ap.management-service[1604]: RTNETLINK answers: Name not unique on network

Bug #1860274 reported by bob adam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snappy-hwe-snaps
New
Undecided
Unassigned

Bug Description

$ sudo wifi-ap.config get
debug: true
dhcp.lease-time: 12h
dhcp.range-start: 10.0.60.2
dhcp.range-stop: 10.0.60.199
disabled: true
share.disabled: false
share.network-interface: wlp4s0
wifi.address: 10.0.60.1
wifi.channel: 11
wifi.country-code:
wifi.hostapd-driver: nl80211
wifi.interface: wlp4s0
wifi.interface-mode: virtual
wifi.netmask: 255.255.255.0
wifi.operation-mode: g
wifi.security: wpa2
wifi.security-passphrase: *********
wifi.ssid: *********

$ sudo wifi-ap.status
ap.active: false

$ journalctl --no-pager -u snap.wifi-ap.management-service
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: 2020/01/19 20:13:40 http: multiple response.WriteHeader calls
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + . /snap/wifi-ap/355/bin/helper.sh
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' false = true ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + DEFAULT_ACCESS_POINT_INTERFACE=ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + ip link show wlp4s0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: 3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: link/ether 28:e3:47:a7:c8:84 brd ff:ff:ff:ff:ff:ff
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + trap do_cleanup TERM
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + do_cleanup
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' -f /var/snap/wifi-ap/355/hostapd.pid ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' -f /var/snap/wifi-ap/355/dnsmasq.pid ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iface=wlp4s0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = virtual ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iface=ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' false = false ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iptables --table nat --delete POSTROUTING --out-interface wlp4s0 -j MASQUERADE
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: iptables: No chain/target/match by that name.
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + true
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iptables --delete FORWARD --in-interface ap0 -j ACCEPT
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: iptables: Bad rule (does a matching rule exist in that chain?).
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + true
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + sysctl -w net.ipv4.ip_forward=0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: net.ipv4.ip_forward = 0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + ip address flush ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: Device "ap0" does not exist.
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = virtual ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + /snap/wifi-ap/355/bin/iw dev ap0 del
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: command failed: No such device (-19)
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iface=wlp4s0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = virtual ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iface=ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: ++ /snap/wifi-ap/355/bin/iw dev wlp4s0 info
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: ++ awk '/channel/{print$2}'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + channel_in_use=11
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' -z 11 ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' 11 '!=' 11 ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = virtual ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + iface=ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + /snap/wifi-ap/355/bin/iw dev wlp4s0 interface add ap0 type __ap
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + wait_until_interface_is_available ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + does_interface_exist ap0
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' -d /sys/class/net/ap0 ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = direct ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + is_nm_running
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: ++ /snap/wifi-ap/355/bin/nmcli -t -f RUNNING general
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + nm_status=running
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' running = running ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + /snap/wifi-ap/355/bin/nmcli d set ap0 managed no
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + ip link set dev ap0 up
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: RTNETLINK answers: Name not unique on network
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + echo 'ERROR: Failed to enable WiFi network interface '\''ap0'\'''
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: ERROR: Failed to enable WiFi network interface 'ap0'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' virtual = virtual ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + /snap/wifi-ap/355/bin/iw dev ap0 del
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + is_nm_running
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: ++ /snap/wifi-ap/355/bin/nmcli -t -f RUNNING general
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + nm_status=running
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + '[' running = running ']'
1月 19 20:13:40 yly-Aspire wifi-ap.management-service[1604]: + /snap/wifi-ap/355/bin/nmcli d set ap0 managed yes
1月 19 20:13:41 yly-Aspire wifi-ap.management-service[1604]: Error: Device 'ap0' not found.
1月 19 20:13:41 yly-Aspire wifi-ap.management-service[1604]: + exit 1

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Maybe there was left-over from a previous run of wifi-ap? Which is the output of 'iw list' and 'ip link show? Also, what happens if you reboot the device?

Revision history for this message
bob adam (bobadam) wrote :
Download full text (9.6 KiB)

Same results after restarting the laptop.
$ iw list
Wiphy phy0
 max # scan SSIDs: 4
 max scan IEs length: 2257 bytes
 Retry short limit: 7
 Retry long limit: 4
 Coverage class: 0 (up to 0m)
 Device supports RSN-IBSS.
 Device supports AP-side u-APSD.
 Device supports T-DLS.
 Supported Ciphers:
  * WEP40 (00-0f-ac:1)
  * WEP104 (00-0f-ac:5)
  * TKIP (00-0f-ac:2)
  * CCMP (00-0f-ac:4)
  * 00-0f-ac:10
  * GCMP (00-0f-ac:8)
  * 00-0f-ac:9
  * CMAC (00-0f-ac:6)
  * 00-0f-ac:13
  * 00-0f-ac:11
  * 00-0f-ac:12
 Available Antennas: TX 0x3 RX 0x3
 Configured Antennas: TX 0x3 RX 0x3
 Supported interface modes:
   * IBSS
   * managed
   * AP
   * AP/VLAN
   * monitor
   * mesh point
   * P2P-client
   * P2P-GO
   * Unknown mode (11)
 Band 1:
  Capabilities: 0x11ef
   RX LDPC
   HT20/HT40
   SM Power Save disabled
   RX HT20 SGI
   RX HT40 SGI
   TX STBC
   RX STBC 1-stream
   Max AMSDU length: 3839 bytes
   DSSS/CCK HT40
  Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
  Minimum RX AMPDU time spacing: 8 usec (0x06)
  HT TX/RX MCS rate indexes supported: 0-15
  Bitrates (non-HT):
   * 1.0 Mbps
   * 2.0 Mbps (short preamble supported)
   * 5.5 Mbps (short preamble supported)
   * 11.0 Mbps (short preamble supported)
   * 6.0 Mbps
   * 9.0 Mbps
   * 12.0 Mbps
   * 18.0 Mbps
   * 24.0 Mbps
   * 36.0 Mbps
   * 48.0 Mbps
   * 54.0 Mbps
  Frequencies:
   * 2412 MHz [1] (20.0 dBm)
   * 2417 MHz [2] (20.0 dBm)
   * 2422 MHz [3] (20.0 dBm)
   * 2427 MHz [4] (20.0 dBm)
   * 2432 MHz [5] (20.0 dBm)
   * 2437 MHz [6] (20.0 dBm)
   * 2442 MHz [7] (20.0 dBm)
   * 2447 MHz [8] (20.0 dBm)
   * 2452 MHz [9] (20.0 dBm)
   * 2457 MHz [10] (20.0 dBm)
   * 2462 MHz [11] (20.0 dBm)
   * 2467 MHz [12] (20.0 dBm) (no IR)
   * 2472 MHz [13] (20.0 dBm) (no IR)
   * 2484 MHz [14] (disabled)
 Band 2:
  Capabilities: 0x11ef
   RX LDPC
   HT20/HT40
   SM Power Save disabled
   RX HT20 SGI
   RX HT40 SGI
   TX STBC
   RX STBC 1-stream
   Max AMSDU length: 3839 bytes
   DSSS/CCK HT40
  Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
  Minimum RX AMPDU time spacing: 8 usec (0x06)
  HT TX/RX MCS rate indexes supported: 0-15
  Bitrates (non-HT):
   * 6.0 Mbps
   * 9.0 Mbps
   * 12.0 Mbps
   * 18.0 Mbps
   * 24.0 Mbps
   * 36.0 Mbps
   * 48.0 Mbps
   * 54.0 Mbps
  Frequencies:
   * 5180 MHz [36] (23.0 dBm) (no IR)
   * 5200 MHz [40] (23.0 dBm) (no IR)
   * 5220 MHz [44] (23.0 dBm) (no IR)
   * 5240 MHz [48] (23.0 dBm) (no IR)
   * 5260 MHz [52] (23.0 dBm) (no IR, radar detection)
     DFS state: usable (for 9799 sec)
     DFS CAC time: 60000 ms
   * 5280 MHz [56] (23.0 dBm) (no IR, radar detection)
     DFS state: usable (for 9799 sec)
     DFS CAC time: 60000 ms
   * 5300 MHz [60] (23.0 dBm) (no IR, radar detection)
     DFS state: usable (for 9799 sec)
     DFS CAC time: 60000 ms
   * 5320 MHz [64] (23.0 dBm) (no IR, radar detection)
     DFS state: usable (for 9799 sec)
     DFS CAC time: 60000 ms
   * 5500 MHz [100] (disabled)
   * 5520 MHz [104] (disabled)
   * 5540 MHz [108] (disabled)
   * 5560 MHz [112] (disabled)
   * 5580 MHz [116] (disabled)
   * 5600 MHz [120] (disabled)
   * 5620 MHz [124] (disabled)
   * 5640 MHz [128] (disabled)
   * 5660 MHz [132] (disabled)
   ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.