Openshift : etcdctl cluster-health fails with "etcd cluster is unavailable or misconfigured
Openshift : etcdctl cluster-health fails with "etcd cluster is unavailable or misconfigured
Issue
When I execute etcdctl cluster-health, it always fail with below error.
# etcdctl cluster-health
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 192.168.2.4:2379: getsockopt: connection refused
; error #1: dial tcp 192.168.2.4:4001: getsockopt: connection refused
error #0: dial tcp 192.168.2.4:2379: getsockopt: connection refused
error #1: dial tcp 192.168.2.4:4001: getsockopt: connection refused
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 192.168.2.4:2379: getsockopt: connection refused
; error #1: dial tcp 192.168.2.4:4001: getsockopt: connection refused
error #0: dial tcp 192.168.2.4:2379: getsockopt: connection refused
error #1: dial tcp 192.168.2.4:4001: getsockopt: connection refused
Resolution
You need to specify --peers or (-C) and certs. Please use following command.
# export `cat /etc/etcd/etcd.conf |grep ETCD_LISTEN_CLIENT_URLS`
# etcdctl -C ${ETCD_LISTEN_CLIENT_URLS} --ca-file=/etc/etcd/ca.crt \
--cert-file=/etc/etcd/peer.crt \
--key-file=/etc/etcd/peer.key cluster-health
# etcdctl -C ${ETCD_LISTEN_CLIENT_URLS} --ca-file=/etc/etcd/ca.crt \
--cert-file=/etc/etcd/peer.crt \
--key-file=/etc/etcd/peer.key cluster-health
No comments