Closed crystalin closed 7 months ago
does it work before?
thats looks like the relevant errors..
Jan 18 10:25:53 otbr-agent[259]: [WARN]-MDNS----: DNSServiceProcessResult failed: Service Not Running (serviceRef = 0x5606e1a4c0c0)
Jan 18 10:25:53 otbr-agent[259]: [WARN]-MDNS----: Need to reconnect to mdnsd
Jan 18 10:25:53 otbr-agent[259]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mdnsd Socket:20 Err:-1 Errno:111 Connection refused
Jan 18 10:25:53 otbr-agent[259]: [ERR ]-MDNS----: Failed to register service Home Assistant Silicon Labs Multiprotocol #4AC7._meshcop._udp: Service Not Running
Jan 18 10:25:53 otbr-agent[259]: [WARN]-BA------: Result of publish meshcop service Home Assistant Silicon Labs Multiprotocol #4AC7._meshcop._udp.local: Invalid state
Jan 18 10:25:53 s6-rc: info: service legacy-cont-init successfully stopped
Jan 18 10:25:53 s6-rc: info: service fix-attrs: stopping
Jan 18 10:25:53 s6-ipcclient: info: s6-ipcclient: connected to /run/s6-rc/servicedirs/s6rc-oneshot-runner/s
Jan 18 10:25:53 s6-rc: info: service fix-attrs successfully stopped
Jan 18 10:25:53 �[32m2024-01-18 10:25:53 [INFO] zigbeed ended with exit code 256 (signal 15)...�[0m
Jan 18 10:25:53 �[32m2024-01-18 10:25:53 [INFO] otbr-web ended with exit code 0 (signal 0)...�[0m
Jan 18 10:25:53 s6-rc: info: service zigbeed successfully stopped
Jan 18 10:25:53 �[32m2024-01-18 10:25:53 [INFO] mDNS ended with exit code 4 (signal 0)...�[0m
so some questions:
The error you pointed are probably not related, as they appear after s6 stops the services. So I suspect it is normal the agent complains the mdns is not reachable after having been stopped.
What I don't understand is why the s6 is stopping the services once they all start.
The docker image also stops without obvious error if I use OTBR_ENABLE=0
I found the issue.
When starting cpcd
the configuration is not yet initialize so it fails
Jan 18 10:25:49 [2024-01-18T10:25:48.088979Z] WARNING : In function 'main' in file /usr/src/cpc-daemon/main.c at line #187 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
Jan 18 10:25:49 [2024-01-18T10:25:48.088986Z] Info : Reading cli arguments
Jan 18 10:25:49 [2024-01-18T10:25:48.088989Z] Info : /usr/local/bin/cpcd
Jan 18 10:25:49 [2024-01-18T10:25:48.089037Z] *** ASSERT *** : FATAL in function 'config_validate_configuration' in file /usr/src/cpc-daemon/misc/config.c at line #967 : Use of encryption was requested, but the daemon was not compiled with -DENABLE_ENCRYPTION
Jan 18 10:25:49 [2024-01-18T10:25:49.089121Z] Info : Daemon exiting with status EXIT_FAILURE
Jan 18 10:25:49 Logger buffer size = 28672, highwater mark = 844 : 2.94%. Lost logs : 0
Jan 18 10:25:49 �[32m2024-01-18 10:25:49 [INFO] CPC ended with exit code 1 (signal 0)...�[0m
which is fine because it then restart after the configuration has been done
but the script https://github.com/b2un0/silabs-multipan-docker/blob/main/rootfs/etc/s6-overlay/s6-rc.d/cpcd/finish#L12 forces s6 to halt
have you seen the VERSIONS.md?
I'm using NabuCasa_SkyConnect_RCP_v4.4.0_rcp-uart-hw-802154_460800.gbl
and 2.4.3 yes
I think this bug only happens if you have a powerful setup that allows cpcd to run before the configuration gets generated. I'll try to make a PR to fix it later today
in the HA community was the same problem by another user https://community.home-assistant.io/t/skyconnect-silabs-multiprotocol-and-docker/526779/116
it's strange that this happens to you with the same setup as it does to me. Except that everything works for me. I also integrade the zigbeed als ZHA Integration for testing purposes.
The issue in that case is not that the encryption is disable, but it is the fact that the conf file, that contains the flag about encryption is generated (see https://github.com/b2un0/silabs-multipan-docker/blob/main/rootfs/etc/cont-init.d/config.sh#L39-L43) after cpcd is executed. So the first execution of cpcd doesn't have the correct conf file and fails.
I'm sure you can trigger the same bug if you put a sleep 3
before the cp command in that file.
I'm not home, but I'll work on a quick fix later (I tested to remove the halt and it worked locally but I want a better fix)
thank your for your fix!
the 2.4.3(latest) and 2.4.2 image are rebuilded and pushed to the registries
I confirm it fixed it
The docker execution exists without showing relevant error. Running on a Ubuntu machine (managing services with nomad, running home assistant, matter server and many other images...)
Command:
docker run -it -e 'DEVICE=/dev/ttyUSB0' -e "BAUDRATE=460800" -e "FLOW_CONTROL=true" -e "BACKBONE_IF=enp86s0" -v '/dev/ttyUSB0:/dev/ttyUSB0' -v "/var/run/dbus:/var/run/dbus" -v "/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket" --privileged --cap-add 'SYS_ADMIN' --cap-add 'NET_ADMIN' --network host -v '/extra/home-assistant/multiplan:/data' b2un0/silabs-multipan-docker:latest 2>&1 | ts | tee docker-multipan.log
Logs:
After the legacy-services started, s6 brings the services down, not sure why