no known leader error forever #629
-
I started 3 nodes and stopped them later. Now I'm starting again only the first node but it displays forever:
How to restore the functionality of this single node again? Is this an error which will now be displayed forever or is the node even dysfunctional? How can this automatically healed? When the other nodes are also starting again, will this be also automatically handled? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The first node that you restarted---call it A---is still operating with a configuration that includes all three nodes. Since it can't contact the other two nodes it can't win an election and become leader. For A to resume operating on its own you have to force it to commit a new configuration that cuts out the other two nodes. Instructions on how to do that are here (written from the MicroK8s perspective but should be generally applicable, assuming you're using go-dqlite). Note that this will lead to data loss if A didn't have the latest database state when you took the cluster offline!
Yes, when the other nodes are restarted, they will find each other using the three-node configuration and eventually one of them will be able to win an election. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick response. |
Beta Was this translation helpful? Give feedback.
The first node that you restarted---call it A---is still operating with a configuration that includes all three nodes. Since it can't contact the other two nodes it can't win an election and become leader. For A to resume operating on its own you have to force it to commit a new configuration that cuts out the other two nodes. Instructions on how to do that are here (written from the MicroK8s perspective but should be generally applicable, assuming you're using go-dqlite). Note that this will lead to data loss if A didn't have the latest database state when you took the cluster offline!
Yes, when the …