Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./etcdctl cluster-health error #10521

Closed
JasonNum1 opened this issue Mar 4, 2019 · 2 comments
Closed

./etcdctl cluster-health error #10521

JasonNum1 opened this issue Mar 4, 2019 · 2 comments

Comments

@JasonNum1
Copy link

etcd cluster
enable etcd as follow
in docker-node1:
nohup ./etcd --name docker-node1 --initial-advertise-peer-urls http://192.168.33.11:2380
--listen-peer-urls http://192.168.33.11:2380
--listen-client-urls http://192.168.33.11:2379,http://127.0.0.1:2379
--advertise-client-urls http://192.168.33.11:2379
--initial-cluster-token etcd-cluster
--initial-cluster docker-node1=http://192.168.33.11:2380,docker-node2=http://192.168.192.168.33.12:2380
--initial-cluster-state new&

in docker-node2:
nohup ./etcd --name docker-node2 --initial-advertise-peer-urls http://192.168.33.12:2380
--listen-peer-urls http://192.168.33.12:2380
--listen-client-urls http://192.168.33.12:2379,http://127.0.0.1:2379
--advertise-client-urls http://192.168.33.12:2379
--initial-cluster-token etcd-cluster
--initial-cluster docker-node1=http://192.168.33.11:2380,docker-node2=http://192.168.33.12:2380
--initial-cluster-state new&

execute "./etcdctl cluster-health",An error is as follows:
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

how can i fix the error

@hexfusion
Copy link
Contributor

execute "./etcdctl cluster-health",An error is as follows:
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

@JasonNum1 first of all cluster-health is v2 command, try endpoint health. Also notice below you need to pass the endpoints of the cluster to etcdctl otherwise it will use the defaults which is 127.0.0.1:{2379,4001} for cluster-health.

ETCDCTL_API=3 etcdctl --endpoints http://192.168.33.12:2379,http://192.168.33.11:2379 endpoint health

Please let us know if you still have issues.

@Boruson
Copy link

Boruson commented Jan 25, 2022

ETCDCTL_API=3 etcdctl --endpoints http://192.168.33.12:2379,http://192.168.33.11:2379 endpoint health
sorry, I want to know that:
if evey etcd-node is heathy ,could it prove that etcd-cluster is healthy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants