Fast-DDS icon indicating copy to clipboard operation
Fast-DDS copied to clipboard

Unable to recover communication after network disconnection

Open Jun1172 opened this issue 9 months ago • 4 comments

Is there an already existing issue for this?

  • [X] I have searched the existing issues

Expected behavior

Computer: WIN11&fastdds 2.14.0 ZYNQ: ubuntu22 arm&fastdds 2.14.0

The computer and ZYNQ can communicate normally, but when I disconnect the computer's network and reconnect, I cannot communicate. You must restart the software on your computer to reconnect to FastDDS.

Observing abnormal situations: 1.When there is an exception, the computer can send a message to ZYNQ and you can see the relevant print in the debug information. 2.When there is an exception, ZYNQ sends a message to the computer and uses a tool called WireShark to capture the data and send it to the computer. 3. When there is an exception, void fastdds subscriber:: SubListener:: on_data available (DataReader * reader) cannot enter the callback、

May I ask if there is a problem with my settings? Can fastdds automatically reconnect?

Current behavior

NULL

Steps to reproduce

Restart software

Fast DDS version/commit

2.14.0

Platform/Architecture

Ubuntu Focal 20.04 amd64, Other. Please specify in Additional context section.

Transport layer

UDPv4

Additional context

No response

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

Jun1172 avatar May 16 '24 00:05 Jun1172

Hi @Jun1172, thanks for using Fast DDS. Your router may assign different IP addresses to the devices when the network connection is restarted. In such case, as long as Fast DDS does not allow changing the configuration on execution time, the connection may not be reestablished. Can you confirm if it is happening in your scenario?

JesusPoderoso avatar May 17 '24 15:05 JesusPoderoso

The discovery mechanism of fastdds may affect the disconnection and reconnection; (rtps.builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(5, 0);) The same ip, if the network is disconnected for more than 5 minutes, it cannot be connected again;

wangzm-R avatar Jun 03 '24 06:06 wangzm-R

(rtps.builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(5, 0);) The same ip, if the network is disconnected for more than 5 minutes, it cannot be connected again;

In fact, that means 5 seconds @wangzm-R. Refer to lease duration docs here

JesusPoderoso avatar Jun 03 '24 14:06 JesusPoderoso

(rtps.builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(5, 0);) The same ip, if the network is disconnected for more than 5 minutes, it cannot be connected again;

In fact, that means 5 seconds @wangzm-R. Refer to lease duration docs here

Yes, if the subscriber is not disconnected for more than 3 minutes, it will probably be disconnected, but not for more than 5 minutes;

wangzm-R avatar Jun 05 '24 01:06 wangzm-R

I closing this thread for inactivity according to Fast DDS contributing guidelines. Please, feel free to reopen it if considered

JesusPoderoso avatar Aug 29 '24 06:08 JesusPoderoso