Connection issues in FT mode
See original GitHub issueHi all 👋
I’m having an issue with the clients ability to establish an initial connection when running in fault tolerance (FT) mode within a k8s cluster.
Behavior
- Run Node.js server, nats client connects to FT leader
- Delete leader pod, client re-connects = expected/perfect
- Restart Node.js server
Result
- Client connection is closed on startup.
error
event fires with the following message:
{
"name": "NatsError",
"message": "stan: connect request timeout",
"code": "stan: connect request timeout",
"chainedError": {
"name": "NatsError",
"message": "The request timed out for subscription id: -1",
"code": "REQ_TIMEOUT"
}
}
close
event fires,process.exit()
is called, server restarts over and over again repeating the above resulted steps until a connection can be established.
Expected Result Client connects first time without having to restart multiple times until a connection is established.
Nats Streaming Version
Docker Image nats-streaming:latest
Embedded Nats Server
Client Version
latest (v0.3.3-0)
I’ve been combing through the docs, github issues, as well as experimenting with various settings on both the deployment and the client. Any ideas on how to solve this?
Thank you in advance for your help.
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Wi-Fi Dropping Issues: 2022's Real Tips - Dong Knows Tech
Having trouble staying connected? Here are a collection of tips to likely fix those annoying Wi-Fi dropping, disconnection, and other common ...
Read more >Issues when 802.11r mixed mode enabled - Cisco Community
Hi, We have enabled mixed mode 802.11r this weekend, and now many users are complaining that they cant connect to both our SSIDs....
Read more >Wi-Fi calling and browsing troubleshooting | T-Mobile Support
Get help with using your Wi-Fi connection for calls and web browsing.
Read more >Step By Step How to Setup TIBCO EMS In Fault Tolerant Mode
In this TIBCO EMS tutorial, I will explain how you can configure Setup TIBCO EMS In Fault Tolerant Mode with a primary and...
Read more >Troubleshooting Connection Issues - Verizon
Learn more about solutions for solving common connection issues. Verizon Small Business Support offers Fios internet connection troubleshooting tips and more.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s because this is more of a NATS Server configuration. NATS Streaming does not repeat all config that are available to NATS Server. Sorry about that.
Not really. Again, this is low-level NATS Server. What that does is that if a client connect to 1 server that is clustered (here server means either NATS Server or NATS Streaming Server in your case since you run the embedded version), that server will return to the client library the list of URLs of the other servers, so that if the client were to be disconnected, it could try to reconnect to any of the URLs. Once you have a cluster of servers, it doesn’t matter really which server a client connects to, servers will route the traffic appropriately. For sure, if a client connects directly to the Streaming active server, there is a bit of an advantage in reducing the number of hop the messages have to go through.
@demelvin current clients have started to support bare host:port for the URL - this makes sense (with the exception that
url
option is a misnomer). This may make it simpler and prevent that type of error.