nats-streaming-operator: Failed to start: discovered another streaming server with cluster ID "example-stan"
I got error when I deploy NatsStreamingCluster
[1] 2019/12/26 07:16:45.762521 [FTL] STREAM: Failed to start: discovered another streaming server with cluster ID "example-stan"
I use GKE
full message
[1] 2019/12/26 07:16:45.747712 [INF] STREAM: ServerID: JTmPHIR4BFp2ZuAWkekcIl
[1] 2019/12/26 07:16:45.747715 [INF] STREAM: Go version: go1.11.13
[1] 2019/12/26 07:16:45.747717 [INF] STREAM: Git commit: [910d6e1]
[1] 2019/12/26 07:16:45.760913 [INF] STREAM: Recovering the state...
[1] 2019/12/26 07:16:45.761073 [INF] STREAM: No recovered state
[1] 2019/12/26 07:16:45.762399 [INF] STREAM: Shutting down.
[1] 2019/12/26 07:16:45.762521 [FTL] STREAM: Failed to start: discovered another streaming server with cluster ID "example-stan"
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 8
- Comments: 25 (7 by maintainers)
Commits related to this issue
- workaround issue #61 - adding missing configs in order for the code correctly set cluster-node-id for cluster mode — committed to hbobenicio/nats-streaming-operator by hbobenicio 4 years ago
- Merge pull request #76 from hbobenicio/fix-examples-always-define-configs workaround issue #61 - adding missing configs to all examples of cluster mode — committed to nats-io/nats-streaming-operator by wallyqs 4 years ago
I change to KubeMQ
I have temporary solution: I made
nat-streaming-cluster.yaml
and inside a file I addednat-streaming-cluster.yaml
I downloaded the code, changed
o.Name
forpod.Name
and then I’ve put some logs to compare both values. I docker built the image and redeploy the operator in my minikube… this is what follows:$
kubectl logs -n poc nats-streaming-operator-5d4777f476-2wf7n
now the cluster id is correctly set for the pods:
$
kubectl logs -n poc stan-cluster-2 # stan-cluster-2 is the correct cluster-id!
and all servers are ready.
maybe this line can be a clue what’s happening: https://github.com/nats-io/nats-streaming-operator/blob/079120fc31b6c10d041c4f594d9d4bd9d78ededa/internal/operator/controller.go#L379
isn’t it supposed to be
pod.Name
or something?the same issue for me
Any update on this issue? The same behaviour on EKS. If I keep retrying it works eventually, however, when there is a pod restart it starts happening again.