ETCD cluster fails to start

518 views
Skip to first unread message

Dāvids Vikmanis

unread,
Oct 2, 2023, 2:37:57 AM10/2/23
to etcd-dev
Hallo!

I have etcd cluster with 3 nodes. I'm trying to start main node but keep getting error
couldn't find local name "" in the initial cluster configuration

This my configuration, what am I missing here?

ETCD_LISTEN_PEER_URLS="http://127.0.0.1:2380, http://10.33.1.50:2380"
ETCD_LISTEN_CLIENT_URLS="http://127.0.0.1:2379, http://10.33.1.50:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://10.33.1.50:2380"
ETCD_INITIAL_CLUSTER="etcd=http://127.0.0.1:2380,node1=http://10.33.1.47:2380,node2=http://10.33.1.48:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://10.33.1.50:2379"
ETCD_INITIAL_CLUSTER_TOKEN="node3"
ETCD_INITIAL_CLUSTER_STATE="new"

James Blair

unread,
Oct 2, 2023, 5:43:56 PM10/2/23
to etcd-dev
Hi - Thanks for your question

It looks as though you are missing configuration for the member name.

Based on your ETCD_INITIAL_CLUSTER you have three members:


You need to supply a --name / ETCD_NAME parameter with a value that matches one of those defined members, "etcd", "node1" or "node2".   Refer: https://etcd.io/docs/v3.5/op-guide/configuration




Kind regards
James

Dāvids Vikmanis

unread,
Oct 3, 2023, 2:07:04 AM10/3/23
to James Blair, etcd-dev
Good Morning!

Thanks for your answer!
I figured out how to set up two working nodes however when I try to add them to cluster I'm getting an error:
etcdctl member list
Failed to get leader:  client: etcd cluster is unavailable or misconfigured; error #0: client: etcd member http://10.33.1.50:2379 has no leader.

The command for adding a node was
etcdctl member add etcd2 http://10.33.1.48:2379
>Added member named etcd2 with ID f94373f82350e232 to cluster

And in this situation the only way out is to remove /var/lib/etcd* and return to start point. 

Dāvids



--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/etcd-dev/ab3b0448-ce57-4606-b828-cbcac34f4834n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages