zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

Can't connect to windows zenohd router

Open knmcguire opened this issue 7 months ago • 2 comments

Describe the bug

During the Kilted Kajiu tutorial party I noticed that I can't connect to a TCP address a Zenohd router on a Windows 11 machine from an external host.

Here is the issue I worked with https://github.com/ros2/kilted_tutorial_party/issues/404

To reproduce

  1. Turn off Windows firewall: Settings->firewall & network protection->Private Network->Microsoft Defender Firewall -> slide to 'off'
  2. Start up a Zenohd router in ROS2 on the windows machine (host 1) with ROS2 sourced with a commandprompt
set RUST_LOG=debug
ros2 run rmw_zenoh_cpp rmw_zenohd
  1. Startup a Zenohd router in ROS2 on the RP5 (hos2) with ROS2 sourced and Zenoh config connect including with host 1's IP address
RUST_LOG=debug ZENOH_CONFIG_OVERRIDE='connect/endpoints=["tcp/192.168.0.1:7447"]' ros2 run rmw_zenoh_cpp rmw_zenohd
  1. Observe in the logs that Host2 keeps retrying to connect to the tcp socket but there is no response:

2025-05-12T15:17:57.807697Z DEBUG net-0 ThreadId(03) zenoh::net::runtime::orchestrator: Unable to connect to configured peer tcp/192.168.0.1:7447! deadline has elapsed at /home/buildfarm/.cargo/git/checkouts/zenoh-cc237f2570fab813/7425cc7/io/zenoh-transport/src/unicast/manager.rs:745.. Retry in 4s.
  1. Do the same but on reverse order of hosts (so that the windows zenoh router connect to the rp5). Here you see that the windows router is able to connect to the RP5
2025-05-12T16:06:33.462147Z DEBUG net-0 ThreadId(03) zenoh::net::runtime::orchestrator: Successfully connected to configured peer tcp/192.168.0.02:7447
  1. Turn Windows firewall back to on

Here are the logs for when the RP5 tried to establish the connection with the zenoh router on Windows

host2_rp5_zenohd_log_250512_ipchanged.txt host1_win11_zenohd_log_250512_ipchanged.txt

Things I've tried (next to the reproduce steps and didn't work):

  • Change the window listen endpoint to "tcp/0.0.0.0:7447" (from https://github.com/eclipse-zenoh/zenoh/issues/1589)
  • Turn off and on the firewall on windows
  • Connect to WLS2 ip instead
  • Included all addresses to the zenoh endpoint config of the external host the windows zenohd router is accessible at

System info

  • Host1: Windows 11 machine (Version 24H2, OS Build 26100.3775)
    • AMD Ryzen 7 (5000 series)
  • Host2: RP5 with Ubuntu noble (24.04.02LTS, 64-bit, Kernel 6.8.0-1024-raspi)
  • Framework: ROS2 Kilted (only a week old)
  • Firewall off (however the same issue exists also with firewall on)

knmcguire avatar May 13 '25 08:05 knmcguire

Hello @knmcguire, thanks for letting us know. We'll look into this.

kydos avatar May 14 '25 07:05 kydos

I forgot to add, if you do it the other way around (having the windows zenohd router connect to the one on RP5), that does work. It just doesn't work from the RP5 to the windows router

knmcguire avatar May 15 '25 08:05 knmcguire