zenoh-python icon indicating copy to clipboard operation
zenoh-python copied to clipboard

[Bug] Zenoh Subscriber doesn't receive Published data

Open TheGoncaloSilva opened this issue 10 months ago • 1 comments

Describe the bug

Zenoh Pub/Sub not working, in client mode, with an intermediary router, when in separate LANs. The Publisher connects successfully, sends the data, but the Subscriber doesn't. Ports 7447 are used and open. Using configs similar to the Default Zenoh config.

To reproduce

I'm conducting two simple tests, both composed of 1 Subscriber, 1 Publisher and router that interconnects the two, allowing for message flowing.

Test 1

Composed of three separate Virtual Machines, each containing one of the programs, all in the same LAN. The test order is as follows:

  1. Zenoh-router located in VM1 starts and remains operational
  2. Zenoh-python subscriber, in VM2 connects to Zenoh-router and subscribes to the topic (VM1 logs confirm)
  3. Zenoh-python publisher, in VM3 connects to Zenoh-router and waits 5 seconds (VM1 logs confirm connection and VM3 logs show VM2 subscription to the topic)
  4. VM3 Publisher sends a burst of 10 messages, with the subscriber receiving all the messages correctly
  5. Test successfull

Test 2

2 separte Virtual Machines, each with a separate program, all in the same LAN, but a third device (DEV1) connects from a separate LAN. The test order is as follows:

  1. Zenoh-router located in VM1 starts and remains operational
  2. Zenoh-python subscriber, in VM2 connects to Zenoh-router and subscribes to the topic (VM1 logs confirm)
  3. Zenoh-python publisher, in DEV1 connects to Zenoh-router and waits 5 seconds (VM1 logs confirm connection and DEV1 logs show VM2 subscription to the topic)
  4. VM3 Publisher sends a burst of 10 messages
  5. The subscriber doesn't receive any message
  6. Wireshark logs show that DEV1 is sending the packets, but looks like the router isn't forwarding them
  7. Test Unsuccessfull

System info

  • Platform: Ubuntu 24
  • Environment: Docker containers, in host mode
  • Zenoh-python version: 1.2.1
  • Zenoh-router version: 1.2.1

TheGoncaloSilva avatar Mar 20 '25 14:03 TheGoncaloSilva

Can you please provide the logs?

gabrik avatar Mar 28 '25 13:03 gabrik

Hi @gabrik,

Thank you for the follow up and sorry for the delay in the response. In the meantime, i've noticed that Zenoh has had the v.1.3.0 release, so i've also conducted the tests with this new version in mind. Attached, you will find all the necessary files that i've used, as well as the logs. The order of application initiation was zenoh_router, subscriber_zenoh, publisher_zenoh. As the logs corroborate, connection was established to the router by both intervenients, but no message was received from the subscriber, in client mode (I've tested in peer and the program functions properly).

files_needed.zip

Best Regards

TheGoncaloSilva avatar Apr 01 '25 10:04 TheGoncaloSilva

even the example posted on the https://zenoh.io/docs/getting-started/first-app/ can't work which was normal.

FreshJude avatar Apr 07 '25 13:04 FreshJude

Hi @gabrik,

Can you please take a look at this issue

Best Regards

TheGoncaloSilva avatar Apr 23 '25 13:04 TheGoncaloSilva

@TheGoncaloSilva Could you try publishing smaller messages (i.e. up to 10 - 20 KB) and let us know if it works ? Could you also try publishing your bigger messages with CongestionControl::Block ?

DenisBiryukov91 avatar Apr 24 '25 10:04 DenisBiryukov91

Hi @DenisBiryukov91,

Thank you for the response. I have reduced the message sizes and they are transmitted without issues, whilst being routed by the router. Now i understand the issue. In my mind, it must be due to a bug for no message to be received, but it was because i was sending them in burst and the messages were taking too long to be sent, due to their size, thus probably "rewriting" the internal buffer for transmission. Adding a sleep between packet transmission also helped them not to be lost.

Best Regards, Gonçalo

TheGoncaloSilva avatar Apr 25 '25 10:04 TheGoncaloSilva