Skip to content
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

NATS client reconenction issue #1873

Closed
kripanshdevtron opened this issue Jun 14, 2022 · 2 comments · Fixed by #1916
Closed

NATS client reconenction issue #1873

kripanshdevtron opened this issue Jun 14, 2022 · 2 comments · Fixed by #1916
Assignees
Labels
bug Something isn't working

Comments

@kripanshdevtron
Copy link
Contributor

No description provided.

@kripanshdevtron kripanshdevtron self-assigned this Jun 14, 2022
@anupdhiran anupdhiran added the bug Something isn't working label Jun 14, 2022
@kripanshdevtron
Copy link
Contributor Author

kripanshdevtron commented Jun 20, 2022

Whenever Nats pod gets restarted, its client subscribers' stream is not able to reconnect.

To Reproduce

  1. Restart Nat Server Pod. make sure it is not running in cluster mode. if that is the case then restart all the pods.
  2. CI/CD events are stuck on Ui because those event listeners are not subscribed back.

Expected behavior

By any chance, Nats-server pod gets restarted then its client should be able to reconnect back.

Current behavior

whenever Nats pod gets restarted. Its Client is able to reconnect back but subscribers are not able to listen to its events

@kripanshdevtron
Copy link
Contributor Author

kripanshdevtron commented Jun 20, 2022

Whenever nats-server pods get restarted. streams got deleted so once its clients are connected back, no streams are present due to which nats client don't find any stream to connect back. The reason for data deletion is we have not mounted any external volume for data backup, another solution for this is to run the Nats server in cluster mode with stream replica count of 3.

** References **

  1. PullSubscribe does not support reconnection nats-io/nats.go#890 (comment)
  2. https://docs.nats.io/using-nats/developer/connecting/reconnect/buffer
  3. https://docs.nats.io/using-nats/developer/connecting/reconnect/events
  4. https://docs.nats.io/using-nats/developer/connecting/cluster
  5. https://docs.nats.io/nats-concepts/jetstream/streams
  6. https://docs.nats.io/running-a-nats-service/nats-kubernetes/helm-charts#logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants