Only loopback works for Cyclone DDS, no multicast
We have a bunch of very similar machines running Ubuntu 20.04 with Galactic in Ubuntu 20.04 Docker; all others work fine, but mine doesn't. With <NetworkInterfaceAddress>lo</NetworkInterfaceAddress>
, ros2 doctor --report
from inside Docker shows me this (skipping all but networks are the other bits are identical):
1635311346.774983 [0] ros2: selected interface "lo" is not multicast-capable: disabling multicast
1635311346.774983 [0] ros2: selected interface "lo" is not multicast-capable: disabling multicast
1635311347.624827 [0] ros2: selected interface "lo" is not multicast-capable: disabling multicast
1635311347.624827 [0] ros2: selected interface "lo" is not multicast-capable: disabling multicast
NETWORK CONFIGURATION
inet : 172.17.0.1
inet4 : ['172.17.0.1']
ether : **private**
netmask : 255.255.0.0
device : docker0
flags : 4099<UP,BROADCAST,MULTICAST>
mtu : 1500
broadcast : 172.17.255.255
inet : 10.208.6.84
inet4 : ['10.208.6.84']
ether : **private**
netmask : 255.255.255.0
device : enp4s0f2
flags : 4163<UP,BROADCAST,RUNNING,MULTICAST>
mtu : 1500
broadcast : 10.208.6.255
inet : 127.0.0.1
inet4 : ['127.0.0.1']
netmask : 255.0.0.0
device : lo
flags : 73<UP,LOOPBACK,RUNNING>
mtu : 65536
ether : **private**
device : wlp5s0
flags : 4098<BROADCAST,MULTICAST>
mtu : 1500
If I change to <NetworkInterfaceAddress>auto</NetworkInterfaceAddress>
, I get:
1635313433.420512 [0] ros2: using network interface enp4s0f2 (udp/10.208.6.84) selected arbitrarily from: enp4s0f2, docker0
1635313433.420512 [0] ros2: using network interface enp4s0f2 (udp/10.208.6.84) selected arbitrarily from: enp4s0f2, docker0
And then it hangs - Ctrl+C
doesn't work, but Ctrl-Z
then kill -9 %1
does. Of course, all other ROS2 features that require multicast fail, so what network issue should I be looking at?
What is your question exactly? Why everything hangs with
auto
, or how to get things working withlo
?Why it hangs on
auto
;lo
is never going to work for multicast.It's pedantic, but you can configure
lo
for multicast. You just need to add the route (see this for instance).But I guess you mean: "I cannot use
lo
for my use-cases / application".Checking the route would be something I'd do btw. Just having the
MULTICAST
flag is not always sufficient I've noticed.