How to fix etcd cluster misconfigured error

12,645 views
Skip to first unread message

Abra Kadabraa

unread,
Jul 1, 2017, 4:03:53 AM7/1/17
to etcd-dev
Have two servers:
pg1: 10.80.80.195 and pg2: 10.80.80.196

Version of etcd : 


    etcd
Version: 3.2.0
   
Git SHA: 66722b1
   
Go Version: go1.8.3
   
Go OS/Arch: linux/amd64


I'm trying to run like this :

pg1 server :

etcd --name infra0 --initial-advertise-peer-urls http://10.80.80.195:2380   --listen-peer-urls http://10.80.80.195:2380   --listen-client-urls http://10.80.80.195:2379,http://127.0.0.1:2379   --advertise-client-urls http://10.80.80.195:2379   --initial-cluster-token etcd-cluster-1   --initial-cluster infra0=http://10.80.80.195:2380,infra1=http://10.80.80.196:2380   --initial-cluster-state new

pg2 server :


    etcd
--name infra1 --initial-advertise-peer-urls http://10.80.80.196:2380   --listen-peer-urls http://10.80.80.196:2380   --listen-client-urls http://10.80.80.196:2379,http://127.0.0.1:2379   --advertise-client-urls http://10.80.80.196:2379   --initial-cluster-token etcd-cluster-1   --initial-cluster infra0=http://10.80.80.195:2380,infra1=http://10.80.80.196:2380   --initial-cluster-state new


When trying to cherck health state on `pg1`:

    etcdctl cluster-health

have an error :

cluster may be unhealthy: failed to list members
   
Error:  client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint http://127.0.0.1:2379 exceeded header timeout
   
; error #1: dial tcp 127.0.0.1:4001: getsockopt: connection refused
   
    error
#0: client: endpoint http://127.0.0.1:2379 exceeded header timeout
    error
#1: dial tcp 127.0.0.1:4001: getsockopt: connection refused


What I'm doing wrong and how to fix it ?
Both servers run on virtual machines with Bridged Adapter

Abra Kadabraa

unread,
Jul 1, 2017, 7:33:40 AM7/1/17
to etcd-dev
Problem was with my firewall ,i solve it

kundan atre

unread,
May 16, 2018, 6:17:43 AM5/16/18
to etcd-dev
How did you solve it?

Sam Batschelet

unread,
May 16, 2018, 7:28:11 AM5/16/18
to etcd-dev
Kundarn,
You have the same issue? Have you tried setting the --endpoints flag?

ETCDCTL_API=3 etcdctl --endpoints=http://10.80.80.195:2379,http://10.80.80.196:2379 endpoint health

Although in this case below it appears that etcd is listening on 127.0.0.1 port 2379 it is unclear to me where the etcdctl command is being run. You can verify that etcd is listening locally with something like netstat -tln | grep 2379. If the endpoint IP's are static perhaps consider setting them with ENV variable ETCDCTL_ENDPOINTS.

I hope that is useful.

-Sam

Niranjan Kolly

unread,
Jun 28, 2018, 4:41:38 AM6/28/18
to etcd-dev
Hello Brother,

How did you solve the issue. we are facing similar issue.


Thanks,
Niranjan


On Saturday, July 1, 2017 at 5:03:40 PM UTC+5:30, Abra Kadabraa wrote:

Sam Batschelet

unread,
Jun 28, 2018, 7:17:31 AM6/28/18
to etcd-dev
Niranjan,
Please provide your etcd configuration and the exact etcdctl command and response.

-Sam

Joe Betz

unread,
Jun 28, 2018, 1:41:17 PM6/28/18
to s...@hexfusion.com, etcd-dev
> error #1: dial tcp 127.0.0.1:4001: getsockopt: connection refused

Your don't have any etcd members are not running on that ip:port, right?  Do you have a pre-existing default.etcd directory where you are starting the etcd servers that was previously configured differently?


--
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.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages