First I was trying to implement it for my own application but was not able to so, then I cloned the this template repo https://github.com/Jille/raft-grpc-example/tree/master but this all gives the same error.
./raft-grpc-example --raft_bootstrap --raft_id=nodeA --address=localhost:50051 --raft_data_dir /tmp/my-raft-cluster
this commands runs successfully and leader is elected but when I start the other node using
./raft-grpc-example --raft_id=nodeB --address=localhost:50052 --raft_data_dir /tmp/my-raft-cluster
I get this:
2023-07-05T09:58:32.797+0530 [INFO] raft: entering follower state: follower="Node at localhost:50052 [Follower]" leader-address= leader-id=
2023-07-05T09:58:34.629+0530 [WARN] raft: no known peers, aborting election
Why the subsequent nodes are not able to connect to raft cluster? Why the leader address is empty for them and not connecting to cluster.