FPrime/GDS Connection failing due to stale port binding #3704
Unanswered
LornDMiller
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi @LornDMiller I took a quick look at the F' code and we aren't currently calling setsockopt when we are creating those TCP sockets so you're right, currently there is no way for you to enable that option. We could make a change to F' to expose setting that as an option potentially, and maybe even extend that to allow setting other socket options. Pasting the full set of options here:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with an F' topology that's set up to have F' run as the TCP Server and GDS as the TCP Client. Occasionally if I shut down and restart too quickly (on the order of minutes), The new F' instance is unable to bind to port 50000 and as a result F' GDS cannot connect.
I know that this is due to the OS leaving the port from the previous instance "open" for some time after F' shuts down. I've worked around this on previous programs by setting SO_REUSEADDR on that port (insert obvious security implications here).
Is there any way to get F' to set SO_REUSEADDR on this TCP server port so that I don't have to wait several minutes when this happens? I've reviewed the code and don't see a mechanism to insert this short of modifying fprime or replacing the comDriver with my own version, neither of which I really want to do.
Related but much lower priority, when this happens F' GDS spins. I'm assuming it's trying to connect but not sleeping after a failure. Is there a mechanism by which I can force F' GDS to sleep for a second after a connection refused error on that connect attempt? Whenever my processor gets railed like this I immediately start looking for a misbehaving FSW task!
Beta Was this translation helpful? Give feedback.
All reactions