[Bug] Unable to commission from the docker container
Describe the bug
Running chip-tool from the container, to attempt commissioning, causes a failure and a crash.
Steps to reproduce the behavior
- ssh to the TH
- this works: ./apps/chip-tool pairing onnetwork 0x12344321 20202021 --paa-trust-store-path /home/ubuntu
- then try the same from the docker container:
- export PATH_TO_PAA_ROOTS=/home/ubuntu
- docker container run -v $PATH_TO_PAA_ROOTS:/home/ubuntu -it 7466f9da6703 /bin/bash
- (from the container) ./chip-tool pairing onnetwork 0x12344321 20202021 --paa-trust-store-path /home/ubuntu
- this fails with " Failed to get WiFi interface" and various other errors and then chip-tool crashes
Expected behavior
No response
Log files
[1723542772.475] [17:17] [DL] ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_tool_kvs [1723542772.476] [17:17] [DL] ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs [1723542772.476] [17:17] [DL] ChipLinuxStorage::Init: Attempt to re-initialize with KVS config file: /tmp/chip_kvs [1723542772.482] [17:17] [DL] ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini [1723542772.482] [17:17] [DL] ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini [1723542772.482] [17:17] [DL] ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini [1723542772.483] [17:17] [DL] writing settings to file (/tmp/chip_counters.ini-tyr8CZ) [1723542772.483] [17:17] [DL] renamed tmp file to file (/tmp/chip_counters.ini) [1723542772.484] [17:17] [DL] NVS set: chip-counters/reboot-count = 2 (0x2) [1723542772.484] [17:17] [DL] Got Ethernet interface: eth0 [1723542772.485] [17:17] [DL] Found the primary Ethernet interface:eth0 [1723542772.485] [17:17] [DL] Failed to get WiFi interface [1723542772.485] [17:17] [DL] Failed to reset WiFi statistic counts [1723542772.485] [17:17] [IN] UDP::Init bind&listen port=0 [1723542772.485] [17:17] [IN] UDP::Init bound to port=47288 [1723542772.486] [17:17] [IN] BLEBase::Init - setting/overriding transport [1723542772.486] [17:17] [IN] TransportMgr initialized [1723542772.486] [17:17] [FP] Initializing FabricTable from persistent storage [1723542772.493] [17:17] [TS] Last Known Good Time: 2023-10-14T01:16:48 [1723542772.496] [17:17] [ZCL] Using ZAP configuration... [1723542772.496] [17:17] [-] src/platform/Linux/DnssdImpl.cpp:341: CHIP Error 0x000000AD: Open file failed at ../../examples/chip-tool/commands/common/CHIPCommand.cpp:159 [1723542772.496] [17:17] [TOO] Run command failure: src/platform/Linux/DnssdImpl.cpp:341: CHIP Error 0x000000AD: Open file failed [1723542772.527] [17:17] [SPT] HeapObjectPool: 1 allocated [1723542772.527] [17:17] [SPT] VerifyOrDie failure at src/lib/support/Pool.h:405: Allocated() == 0 Aborted (core dumped)
=======
on the TH (outside the docker container):
ubuntu@ubuntu:~/apps$ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether e4:5f:01:7e:73:aa brd ff:ff:ff:ff:ff:ff 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000 link/ether e4:5f:01:7e:73:ac brd ff:ff:ff:ff:ff:ff 4: br-293495df0184: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 02:42:75:d5:b2:69 brd ff:ff:ff:ff:ff:ff 5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default link/ether 02:42:31:4a:62:a9 brd ff:ff:ff:ff:ff:ff 6: br-a703e98dca06: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 02:42:49:51:32:ec brd ff:ff:ff:ff:ff:ff 8: veth3a82a66@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-293495df0184 state UP mode DEFAULT group default link/ether c2:4d:49:b4:fb:8a brd ff:ff:ff:ff:ff:ff link-netnsid 1 10: veth618e750@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a703e98dca06 state UP mode DEFAULT group default link/ether 02:b0:70:23:ac:b7 brd ff:ff:ff:ff:ff:ff link-netnsid 0 12: vethfe8427a@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a703e98dca06 state UP mode DEFAULT group default link/ether 26:02:08:7a:4b:3f brd ff:ff:ff:ff:ff:ff link-netnsid 1 14: veth4373373@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a703e98dca06 state UP mode DEFAULT group default link/ether ca:5e:03:2c:69:84 brd ff:ff:ff:ff:ff:ff link-netnsid 2 16: veth4b289ea@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a703e98dca06 state UP mode DEFAULT group default link/ether 9a:28:77:94:b5:39 brd ff:ff:ff:ff:ff:ff link-netnsid 3 ubuntu@ubuntu:~/apps$
from the container:
root@2d44b0122344:~# ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 19: eth0@if20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0 root@2d44b0122344:~#
PICS file
No response
Screenshots
No response
Environment
using RasPI 4, Ubuntu 24.04 server, and TH v2.11-beta2+fall2024
Additional Information
No response
The RasPI was flashed with Ubuntu 24.04 using the default settings, while the RasPI was connected using Ethernet. The wifi interface was not configured.
Hi @plauric,
The Failed to get WiFi interface error is kind of misleading in this case. The real problem is probably another indeed.
The TH creates the SDK container properly configured to use the chip-tool app. Since you're trying to configure it manually, I tried to create the container with the same configurations as TH does.
Please, try the following steps:
-
export PATH_TO_PAA_ROOTS=/home/ubuntu -
docker run --privileged --network host -v $PATH_TO_PAA_ROOTS:/home/ubuntu -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket -it 7466f9da6703 /bin/bash - (from the container)
./chip-tool pairing onnetwork 0x12344321 20202021 --paa-trust-store-path /home/ubuntu
Let me know if that helps.
PS: You may refer to the SDK Python Tests - Common Steps section of the User Guide for the suggested creation of the SDK container.
Seems originator has lost interest. Please reopen if you are still facing the problem.
@antonio-amjr @fabiowmm Apologies for not replying sooner, due to the TE2, SVE and many other things that were happening at the same time :)
I was able to successfully do commissioning from the docker container using the TH image used at SVE.
Thank you for helping clarify the reason why I couldn't get this to work initially.