Strange behaviour with clustering in docker swarm #4024
Unanswered
sistemicasagit
asked this question in
Q&A
Replies: 1 comment
-
Better place to ask this question is in the general slack channel for NATS.io or the k8s one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a test swarm made by one node and I'm trying to deploy a nats cluster behind swarm balancer. I have created a seed service with one instance which initialize the cluster and a two node service with the servers which I expose externally. All services share a custom overlay network named public_network. When I tried to connect a client to the cluster and use request/reply I had a strange behaviour: one call was ok and one call in timeout, repeatedly. Manager start and work as expected, every container (cluster 1, 2) connects successfully to manager but cluster2 tries to establish a connection to an IP which refuses connection. So the mesh is incomplete.
The problem I can see is that both servers connect to manager with the same IP which is not the specific one of the container but the one of the endpoint lb-public_network. Maybe this IP is sent by manager to cluster2 as IP of cluster1..
I would appreciate some help.
Thanks in advance
Simone
(I have post the same question yesterday on Stackoverflow)
Here the compose file I use for deploy (through Portainer):
And the various logs:
Container manager:
Container cluster1:
Container cluster2:
I would expect everything working as expected. I find strange that each cluster container presents itself with lb ip address than its own. I supposed lb as an incoming mechanism, not outcoming.
Beta Was this translation helpful? Give feedback.
All reactions