-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCP connection lost: trying to reconnect #146
Comments
Hi @gnssTim, which driver version are you using and are you connected with real Ethernet or via USB? |
Hi Thomas, I use the ros2 driver version tag V1.4.1 over a real Ethernet network. launch with "ros2 septentrio_gnss_driver rover_node.launch.py" under linux. The gnss device is "AsteRx SBi3 Pro+". |
Hi Tim, ok thanks. I will look into it. Actually, the driver should detect a disconnect and try to reconnect. What happens, when you reconnect physically? |
When i reconnect physically nothing happend, no new data was publish to dds. |
For additional informations, I have enable DEBUG the log, the last message i see is "AsyncManager sync read error: Connection reset by peer" more log : [septentrio_gnss_driver_node-1] 1734612188.761326482: [septentrio_gnss_driver] [INFO] Connecting to tcp://192.168.122.113:2002... |
This looks like it was disconnected before setting up the RX completely. This case is not handled explicitly. You should just restart the driver if this happens. |
I will look into it. But it might take some time. |
Hello Thomas, OK, thanks for Rx configuration. I'm able to detect the deconnection event on “async_manager.hpp” line 630 node_->log(log_level::DEBUG, "AsyncManager string read fault, wrong number of bytes read: " + std::to_string(numBytes)); by adding this line I suppose the reconnection need to be done into class TcpIO ? |
I am sorry but I was not able to reproduce your problem. I can unplug and replug the ethernet cable and the data stream is re-established immediately. I can confirm your findings insofar that the disconnect is not recognized. This should be ok, since a disconnect on the physical connection (layer 1) is not immediately propagated to TCP (layer 4). Your statement about TCP2Way made me wonder if you have some other setup issues. Could you please share your |
Thank you for doing the test on your side. Your help was very helpful. I tested on another hardware and it works, it seems that the problem comes from the virtualization. With virtualization, the connection is closed when the cable is disconnected (“RST” reset flag capture with wireshark). The problem come from the virtualization, I didn't find any solution for the moment. Thanks a lot Thomas. |
Thanks for reporting back. Good to know it works on the other hardware. I also did some more tests and after several minutes, the connection loss is detected. The reconnection attempts after that are not successful. I will investigate further. I think this will take some time but I hope this will also fix your problems with virtualization. |
If a tcp device is physically disconnected after the connection has been established. It remains in a running state indefinitely and does not try to reconnect.
The function “AsyncManager::runWatchdog” is call cyclically and “running_” Boolean stay true.
The text was updated successfully, but these errors were encountered: