-
Notifications
You must be signed in to change notification settings - Fork 44
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
Failed to start: discovered another streaming server with cluster ID "example-stan" #61
Comments
I'm getting the same error, on a dev k3d cluster. |
I'm also seeing this error when installing via the instructions here: https://github.com/nats-io/nats-streaming-operator#deploying-a-nats-streaming-cluster |
Is not working any more. same error |
Stuck with the same problem, only one replica is nats streaming pod is working. All other exit wit the same error.
|
Having the same issue |
Same |
I have temporary solution: I made
nat-streaming-cluster.yaml
|
I change to KubeMQ |
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. |
the same issue for me |
After trying the config above I get the error: |
Same problem, and adding the "debug: true" worked for me once, but unpredictably on the next few attempts (had to delete and apply the cluster a few times). For my configuration I suspect that it may be a timing issue with NATS Streaming racing my Envoy proxy sidecar (I have Istio installed in my cluster) and that by adding the "debug: true" NATS Streaming takes a bit longer to boot up, giving Envoy enough time to be ready. Bit of a tricky one to debug as the images are based on scratch with no real ability to inject a sleep as part of the image cmd. Am I the only one using Istio, or is this a common theme? |
I have the same issue, is there anyone can help.
|
Same issue here. describing the pods created by the nats-streaming-operator, I see the cli command line args setting the cluster-id as follows: $ kubectl describe -n mynamespace stan-cluster-2
pod 1 runs ok. Then pod 2 and 3 try to run with the same cluster-id and fails because it's already in use (by pod 1). What is the correct way the nats-streaming-operator should assign the cluster-id's to the cluster servers? is it some config I'm missing here? PS.: I'm not mounting any volume yet on the pod spec. |
maybe this line can be a clue what's happening:
isn't it supposed to be |
I downloaded the code, changed $
now the cluster id is correctly set for the pods: $
and all servers are ready. |
@hbobenicio that is what I have done and it seem to work although I am not sure how to validate that all 3 nodes are functioning correctly. I can see 3 nodes been connected but that is about is Is there a way to check which nodes is receiving? |
@lanox there are some ways to test it... a quick test would be running nats-box on the cluster and sending/receiving some messages, or maybe writing some test app and running it on your cluster. try checking logs and trying some caos testing at last. Good to know that it worked for you too |
My bad... I mixed up the concept of cluster_id (
my yaml describing NatsStreamingCluster doesn't have a config entry, so |
Thanks for looking into this. I think it looked like it was working because it was working as an individual node and not clustered nodes? , hence I was saying I am not sure if this worked as it supposes to, however, I could be wrong in what I am saying. |
@hbobenicio so this is what fixed the problem for me, I added this This is what I did to test.
then
Then I deleted Then I checked which other nodes have become master
and stan-service-1 is showing standby. I think the documentation needs to be updated as well as the example deployments. |
oh and it seems you can only run it in cluster mode or FT mode, but can't be together. |
Yeah, they are mutually exclusive modes. My use case is for cluster mode. I think those checks for modes could be improved or, if the config object for the spec is really necessary, then a validation to check if this is missing would be a better error report. But I still think the best approach is that it works even without the config entry. So, until de fix is made, this is the workaround: If you have a yaml without a config entry like this, just put an empty config entry then: apiVersion: "streaming.nats.io/v1alpha1"
kind: "NatsStreamingCluster"
metadata:
name: "my-stan-cluster"
namespace: ${NAMESPACE}
spec:
size: ${CLUSTER_SIZE}
image: "nats-streaming:0.18.0"
natsSvc: ${NATS_CLUSTER_NAME}
# Here... without a config entry, isClustered is false even with spec.Size > 1.
# Just put an empty config
config: {} |
… code correctly set cluster-node-id for cluster mode
…figs workaround issue #61 - adding missing configs to all examples of cluster mode
@hbobenicio @wallyqs Hello. I'am getting same error using STAN helm chart
stan:
replicas: 3
nats:
url: nats://nats.nats:4222
store:
...:
cluster:
enabled: true
sql:
...: |
Hi @sergeyshaykhullin I think this is an error from the helm charts? Btw I think the error is that it missing defining ft:
group: "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
The text was updated successfully, but these errors were encountered: