Rejoining Cluster with new id ?!

Hello,

This is my first Topic since I’m a beginner on CockcroachDB.
I’m following Cockroach University and during Cluster failover parts, I’m faced with strange behaviors.

Each times I stop a server (kill ), I can see it becoming Suspect or Dead (if time exceeds server.time_until_store_dead). But when I restart this server, I would expect it to rejoin the cluster with the same ID as before the kill.

But the old server become Dead and stay Dead.
The restarted server just join the cluster with new ID affected…

Any idea why ?
Philippe

Hello Philippe,
Make sure to specify original node data directory with “–store” flag when re-starting the node.
CockroachDB stores metadata in the data directory.

If you re-start node in different workspace (pwd) without specify --store flag, CockroachDB cannot find the original node information and instead starting new node with default data directory called “cockroach-data”.

Hope this can help.

Nathan

Fixed.

My Bad.
It’s just because I was in the wrong directory when I relaunched the Suspect Server start command.
It’s normal that the server was seen as new node since no data was available.