-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Connection between Leafnode and Core NATS over satellite link fails to get established #5417
Labels
defect
Suspected defect such as a bug or regression
Comments
kozlovic
added a commit
that referenced
this issue
May 15, 2024
For the solicit side, we were using a constant of 1 second as a tcp connection deadline waiting to receive the INFO protocol. I made the change to be the same than for routes and gateways by using the ping timer to detect a stale connection. In the handshake process, the ping timer will be used to close the connection as stale if the timer fires after the amount of time based on the ping interval and max pings out. If the INFO is received and the handshake proceeds, the ping timer is then set as usual to perform the regular PING tasks. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
kozlovic
added a commit
that referenced
this issue
May 15, 2024
For the solicit side, we were using a constant of 1 second as a tcp connection deadline waiting to receive the INFO protocol. I made the change to be the same than for routes and gateways by using the ping timer to detect a stale connection. In the handshake process, the ping timer will be used to close the connection as stale if the timer fires after the amount of time based on the ping interval and max pings out. If the INFO is received and the handshake proceeds, the ping timer is then set as usual to perform the regular PING tasks. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
kozlovic
added a commit
that referenced
this issue
May 15, 2024
Added the leafnode remote configuration parameter `first_info_timeout` which is the amount of time that a server creating a leafnode connection will wait for the initial INFO from the remote server. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
derekcollison
added a commit
that referenced
this issue
May 16, 2024
Added the leafnode remote configuration parameter `first_info_timeout` which is the amount of time that a server creating a leafnode connection will wait for the initial INFO from the remote server. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
neilalexander
pushed a commit
that referenced
this issue
May 16, 2024
Added the leafnode remote configuration parameter `first_info_timeout` which is the amount of time that a server creating a leafnode connection will wait for the initial INFO from the remote server. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
wallyqs
pushed a commit
that referenced
this issue
May 16, 2024
Added the leafnode remote configuration parameter `first_info_timeout` which is the amount of time that a server creating a leafnode connection will wait for the initial INFO from the remote server. Resolves #5417 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Observed behavior
Siden is running into an odd issue with NATS Leafnode not being able to connect to our Core NATS server.
After TCP 3-way handshake Core NATS sends INFO message and then NATS Leafnode responds with INFO and 400+ms later sends closes connection (sends TCP FIN).
The latency of connection is 500ms.
Here are packets exchanged. Packets with P flag are INFO messages, followed by FIN packet
in the console the NATS Leafnode outputs the following:
[7] [INF] 3.13.54.170:7422 - lid:53 - Leafnode connection closed: Read Error - Account: $G
[7] [INF] 3.13.54.170:7422 - lid:54 - Leafnode connection created for account: $G
[7] [INF] 3.13.54.170:7422 - lid:54 - Leafnode connection closed: Read Error - Account: $G
After investigation the issue is caused by too short timeout DEFAULT_LEAFNODE_INFO_WAIT, which is hardcoded to 1s.
Unfortunately it's a constant and not configurable,
We changed the timeout value in the vendor directory to 3s and that resolved the issue.
Please make this parameter configurable.
Expected behavior
NATS connection can be established successfully
Server and client version
v2.10.10
Host environment
No response
Steps to reproduce
Test NATS Leafnode - Server connection over high latency link.
The text was updated successfully, but these errors were encountered: