canonical / openthread-border-router-snap

BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Unable to start on 24.04 #50

Open baylf2000 opened 4 months ago

baylf2000 commented 4 months ago

After following the directions at https://github.com/canonical/openthread-border-router-snap on Ubuntu 24.04, attempting to start using the command sudo snap start openthread-border-router results in the following error:

root@L-PC:~# sudo snap start openthread-border-router
error: cannot perform the following tasks:
- Run service command "start" for services ["otbr-agent" "otbr-setup" "otbr-web"] of snap "openthread-border-router" (systemctl command [start snap.openthread-border-router.otbr-setup.service] failed with exit status 1: stderr:
Job for snap.openthread-border-router.otbr-setup.service failed because the control process exited with error code.
See "systemctl status snap.openthread-border-router.otbr-setup.service" and "journalctl -xeu snap.openthread-border-router.otbr-setup.service" for details.)
root@L-PC:~# snap logs -n 10 -f openthread-border-router
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5486]: + ipset create -exist otbr-ingress-allow-dst hash:net family inet6
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5486]: + ipset create -exist otbr-ingress-allow-dst-swap hash:net family inet6
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5486]: + ip6tables -N OTBR_FORWARD_INGRESS
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5486]: + ip6tables -I FORWARD 1 -o wpan0 -j OTBR_FORWARD_INGRESS
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5486]: + ip6tables -A OTBR_FORWARD_INGRESS -m pkttype --pkt-type unicast -i wpan0 -j DROP
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5506]: ip6tables v1.8.7 (nf_tables): Couldn't load match `pkttype':No such file or directory
2024-07-12T11:44:04+10:00 openthread-border-router.otbr-setup[5506]: Try `ip6tables -h' or 'ip6tables --help' for more information.
2024-07-12T11:44:04+10:00 systemd[1]: snap.openthread-border-router.otbr-setup.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
2024-07-12T11:44:04+10:00 systemd[1]: snap.openthread-border-router.otbr-setup.service: Failed with result 'exit-code'.
2024-07-12T11:44:04+10:00 systemd[1]: Failed to start snap.openthread-border-router.otbr-setup.service - Service for snap application openthread-border-router.otbr-setup.
jpm-canonical commented 4 months ago

Thanks for the report @baylf2000. I'm trying to track down what is causing this error.

Could you give us some more details on your setup? Are you using an AMD64 computer, or aarch64 like a Raspberry Pi? Did you install any custom kernel or updated iptables to any other version?

Please give use the output of these two commands:

ip6tables --version
uname -a
baylf2000 commented 3 months ago

@jpm-canonical Install is x86 Ubuntu Desktop 24.04 100% vanilla fresh install.

Output of commands as requested:

root@L-PC:~# ip6tables --version
ip6tables v1.8.10 (nf_tables)
root@L-PC:~# uname -a
Linux L-PC 6.8.0-39-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul  5 21:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Hope that helps.

jpm-canonical commented 3 months ago

I tried replicating your setup in a VM running Ubuntu 24.04 Desktop. It's exactly the same kernel and iptables version as you have. So far no luck hitting the same error. Are you using the snap from the beta or edge channel?

For a sanity check, could you run sudo snap get openthread-border-router and make sure infra-if is set to the correct interface name. In other words the same interface name ip addr lists for it.

Another thing we could do to debug this is to check the output of snappy-debug while the error occurs. So install and run snappy-debug in one terminal, while starting openthread-border-router in another.

The systemd journal would give more detail, so you can do this in another terminal:

journalctl -a -f --since "$(date -Iseconds)" | grep "openthread"

Please upload the logs to https://pastebin.ubuntu.com/ or attach here.