Unable to join a host by using join code for ROS2

Server: DigitalOcean
Operating System: Ubuntu 20.04
ROS version: Foxy

Hi there. I am trying to use the join code command husarnet join <your-join-code> <device-hostname> provided in the installation guide. Apparently it keeps on repeating the “joining” message as shown below,

[2473196] joining...
[2475196] joining...
[2477197] joining...
[2479197] joining...
[2481198] joining...
[2483199] joining...
[2485199] joining...
[2487200] joining...
[2489201] joining...
[2491202] joining...
[2493202] joining...
[2495203] joining...
[2497204] joining...
[2499204] joining...
[2501205] joining...
[2503206] joining...
[2505206] joining...
[2507207] joining...
[2509208] joining...
[2511208] joining...
[2513209] joining...
[2515210] joining...
[2517210] joining...
[2519211] joining...
[2521212] joining...
[2523212] joining...
[2525213] joining...

In the web app I am not able to see the device joining into the network. I have checked the ufw status and get these results and I believe that the ports are enabled by default by Husarnet.

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
443                        ALLOW       Anywhere
Husarnet                   ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)
Husarnet (v6)              ALLOW       Anywhere (v6)

Using husarnet status I have gotten these results,

Profile: Husarnet
Title: Husarnet
Description: Secure P2P network layer

Port:
  5581:5587/udp

Using journalctl --unit husarnet--since "1 hour ago" and gotten these results,

Jul 15 06:13:16 Cloud husarnet[781]: [2549221] control command: join
Jul 15 06:13:16 Cloud husarnet[781]: [2549221] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:18 Cloud husarnet[781]: [2551221] control command: has-received-init-response
Jul 15 06:13:18 Cloud husarnet[781]: [2551221] control command: join
Jul 15 06:13:18 Cloud husarnet[781]: [2551222] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:20 Cloud husarnet[781]: [2553222] control command: has-received-init-response
Jul 15 06:13:20 Cloud husarnet[781]: [2553222] control command: join
Jul 15 06:13:20 Cloud husarnet[781]: [2553222] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:22 Cloud husarnet[781]: [2555223] control command: has-received-init-response
Jul 15 06:13:22 Cloud husarnet[781]: [2555223] control command: join
Jul 15 06:13:22 Cloud husarnet[781]: [2555223] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:24 Cloud husarnet[781]: [2557223] control command: has-received-init-response
Jul 15 06:13:24 Cloud husarnet[781]: [2557223] control command: join
Jul 15 06:13:24 Cloud husarnet[781]: [2557223] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:26 Cloud husarnet[781]: [2559224] control command: has-received-init-response
Jul 15 06:13:26 Cloud husarnet[781]: [2559224] control command: join
Jul 15 06:13:26 Cloud husarnet[781]: [2559224] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:28 Cloud husarnet[781]: [2561225] control command: has-received-init-response
Jul 15 06:13:28 Cloud husarnet[781]: [2561225] control command: join
Jul 15 06:13:28 Cloud husarnet[781]: [2561225] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:30 Cloud husarnet[781]: [2563225] control command: has-received-init-response
Jul 15 06:13:30 Cloud husarnet[781]: [2563225] control command: join
Jul 15 06:13:30 Cloud husarnet[781]: [2563225] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:32 Cloud husarnet[781]: [2565226] control command: has-received-init-response
Jul 15 06:13:32 Cloud husarnet[781]: [2565226] control command: join
Jul 15 06:13:32 Cloud husarnet[781]: [2565226] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:34 Cloud husarnet[781]: [2567227] control command: has-received-init-response
Jul 15 06:13:34 Cloud husarnet[781]: [2567227] control command: join
Jul 15 06:13:34 Cloud husarnet[781]: [2567227] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:36 Cloud husarnet[781]: [2569227] control command: has-received-init-response
Jul 15 06:13:36 Cloud husarnet[781]: [2569227] control command: join
Jul 15 06:13:36 Cloud husarnet[781]: [2569227] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:37 Cloud husarnet[781]: [2569862] HELLO from [137.117.229.110]:5582 (id: fc94:b01d:1803:8dd8:b293:5c7d:7639:932a, active: YES)
Jul 15 06:13:37 Cloud husarnet[781]: [2569862] HELLO from [137.117.229.110]:5582 (id: fc94:b01d:1803:8dd8:b293:5c7d:7639:932a, active: YES)
Jul 15 06:13:38 Cloud husarnet[781]: [2571228] control command: has-received-init-response
Jul 15 06:13:38 Cloud husarnet[781]: [2571228] control command: join
Jul 15 06:13:38 Cloud husarnet[781]: [2571228] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:39 Cloud husarnet[781]: [2572230] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:13:39 Cloud husarnet[781]: [2572231] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:13:39 Cloud husarnet[781]: [2572392] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:13:39 Cloud husarnet[781]: [2572392]  - using this address as target (reply received after 162 ms)
Jul 15 06:13:39 Cloud husarnet[781]: [2572392] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:13:40 Cloud husarnet[781]: [2572468] received base UDP address: [188.165.23.196]:5582
Jul 15 06:13:40 Cloud husarnet[781]: [2572468] received base transient range: 5600 5620
Jul 15 06:13:40 Cloud husarnet[781]: [2573229] control command: has-received-init-response
Jul 15 06:13:40 Cloud husarnet[781]: [2573229] control command: join
Jul 15 06:13:40 Cloud husarnet[781]: [2573229] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:42 Cloud husarnet[781]: [2575229] control command: has-received-init-response
Jul 15 06:13:42 Cloud husarnet[781]: [2575229] control command: join
Jul 15 06:13:42 Cloud husarnet[781]: [2575230] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:44 Cloud husarnet[781]: [2577230] control command: has-received-init-response
Jul 15 06:13:44 Cloud husarnet[781]: [2577230] control command: join
Jul 15 06:13:44 Cloud husarnet[781]: [2577230] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:46 Cloud husarnet[781]: [2579231] control command: has-received-init-response
Jul 15 06:13:46 Cloud husarnet[781]: [2579231] control command: join
Jul 15 06:13:46 Cloud husarnet[781]: [2579231] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:48 Cloud husarnet[781]: [2581231] control command: has-received-init-response
Jul 15 06:13:48 Cloud husarnet[781]: [2581231] control command: join
Jul 15 06:13:48 Cloud husarnet[781]: [2581231] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:13:50 Cloud husarnet[781]: [2583232] control command: has-received-init-response
Jul 15 06:13:50 Cloud husarnet[781]: [2583232] control command: join
Jul 15 06:13:50 Cloud husarnet[781]: [2583232] sending join request to fc94:b01d:1803:8dd8:b293:5c7d:7639:932a
Jul 15 06:14:04 Cloud husarnet[781]: [2597374] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:14:04 Cloud husarnet[781]: [2597375] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:14:05 Cloud husarnet[781]: [2597538] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:05 Cloud husarnet[781]: [2597538]  - using this address as target (reply received after 164 ms)
Jul 15 06:14:05 Cloud husarnet[781]: [2597538] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:05 Cloud husarnet[781]: [2597612] received base UDP address: [188.165.23.196]:5582
Jul 15 06:14:05 Cloud husarnet[781]: [2597612] received base transient range: 5600 5620
Jul 15 06:14:30 Cloud husarnet[781]: [2622524] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:14:30 Cloud husarnet[781]: [2622525] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:14:30 Cloud husarnet[781]: [2622688] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:30 Cloud husarnet[781]: [2622688]  - using this address as target (reply received after 164 ms)
Jul 15 06:14:30 Cloud husarnet[781]: [2622688] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:30 Cloud husarnet[781]: [2622762] received base UDP address: [188.165.23.196]:5582
Jul 15 06:14:30 Cloud husarnet[781]: [2622762] received base transient range: 5600 5620
Jul 15 06:14:55 Cloud husarnet[781]: [2648176] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:14:55 Cloud husarnet[781]: [2648177] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:14:55 Cloud husarnet[781]: [2648339] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:55 Cloud husarnet[781]: [2648339]  - using this address as target (reply received after 163 ms)
Jul 15 06:14:55 Cloud husarnet[781]: [2648340] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:14:55 Cloud husarnet[781]: [2648414] received base UDP address: [188.165.23.196]:5582
Jul 15 06:14:55 Cloud husarnet[781]: [2648414] received base transient range: 5600 5620
Jul 15 06:15:20 Cloud husarnet[781]: [2673436] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:15:20 Cloud husarnet[781]: [2673437] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:15:21 Cloud husarnet[781]: [2673600] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:15:21 Cloud husarnet[781]: [2673600]  - using this address as target (reply received after 164 ms)
Jul 15 06:15:21 Cloud husarnet[781]: [2673601] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:15:21 Cloud husarnet[781]: [2673674] received base UDP address: [188.165.23.196]:5582
Jul 15 06:15:21 Cloud husarnet[781]: [2673674] received base transient range: 5600 5620
Jul 15 06:15:46 Cloud husarnet[781]: [2698914] reestablish connection to [fc94:b01d:1803:8dd8:b293:5c7d:7639:932a]
Jul 15 06:15:46 Cloud husarnet[781]: [2698915] addresses: [10.1.1.4]:5582, [127.0.0.1]:5582, [137.117.229.110]:5582, [172.17.0.1]:5582, [172.18.0.1]:5582, [172.19.0.1]:5582,
Jul 15 06:15:46 Cloud husarnet[781]: [2699077] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:15:46 Cloud husarnet[781]: [2699077]  - using this address as target (reply received after 163 ms)
Jul 15 06:15:46 Cloud husarnet[781]: [2699078] HELLO-REPLY from [137.117.229.110]:5582 (fc94b01d18038dd8b2935c7d7639932a)
Jul 15 06:15:46 Cloud husarnet[781]: [2699152] received base UDP address: [188.165.23.196]:5582
Jul 15 06:15:46 Cloud husarnet[781]: [2699152] received base transient range: 5600 5620
Jul 15 06:16:12 Cloud husarnet[781]: [2724521] received base UDP address: [188.165.23.196]:5582
Jul 15 06:16:12 Cloud husarnet[781]: [2724521] received base transient range: 5600 5620
Jul 15 06:16:37 Cloud husarnet[781]: [2749782] received base UDP address: [188.165.23.196]:5582
Jul 15 06:16:37 Cloud husarnet[781]: [2749782] received base transient range: 5600 5620
Jul 15 06:17:02 Cloud husarnet[781]: [2775040] received base UDP address: [188.165.23.196]:5582
Jul 15 06:17:02 Cloud husarnet[781]: [2775040] received base transient range: 5600 5620

May I know are there any ways that I can troubleshoot this issue? Is it because of blocked UDP or I have missed out on any installation steps? I have followed the installation guide based on this link https://husarnet.com/docs/tutorial-ros2/#ros-2-and-dds-implementation. Appreciate any suggestions or advice. Thank you.

Hi destkk,

Thanks for your reply to my answer at Unable to join a host by using join code for ROS2 · Issue #1 · husarnet/husarnet · GitHub .

You wrote:

There are a total number of 2 devices in my network excluding the one that I am having trouble joining with.

OK, so you have 2 other devices that can communicate fine, and you have an issue only with the Husarnet VPN Client working on DigitalOcean server?

Have you followed this guide: https://husarnet.com/docs/tutorial-troubleshooting ?

Also you wrote that husarnet status gives this output:

Profile: Husarnet
Title: Husarnet
Description: Secure P2P network layer

Port:
  5581:5587/udp

But it should look like this:

$ sudo husarnet status
Husarnet IP address: fc94:7196:e39f:23ff:fe45:81aa:39e4:b224
UDP connection to base: [::ffff:188.165.23.196]:5582
Peer fc94:9e5d:fef0:7bb4:00f1:fcb7:d85:fdaf
  tunelled
  secure connection established
Peer fc94:a2e4:7b6b:322b:b200:97fa:e32f:a867
  target=[::ffff:10.0.0.15]:5582
  secure connection established

Could you check Husarnet status once more using that command?

Thanks!
Dominik