我正在启动核心OS群集。
3个节点已经启动,可以 curl
到https://discovery.etcd.io/XYZ,每个节点都可以查看其他节点,YAML看起来像这样:
curl https://discovery.etcd.io/*****70c50e2e9efb644
"action":"get","node":{"key":"/_etcd/registry/****8070c50e2e9efb644","dir":true,"nodes":[{"key":"/_etcd/registry/*****38070c50e2e9efb644/****fb2be24","value":"4e0f92950de64ebe8f343fd99eafc784=http://*****:2380","modifiedIndex":990603568,"createdIndex":990603568},{"key":"/_etcd/registry/862080a02e3e8f38070c50e2e9efb644/*****2930998b","value":"****91d8f554955e=http://******:2380","modifiedIndex":990612624,"createdIndex":990612624},{"key":"/_etcd/registry/*****c50e2e9efb644/***1257987a","value":"****c994f6493e0ff9214f22c2b=http://******:2380","modifiedIndex":990618969,"createdIndex":990618969}],"modifiedIndex":990598000,"createdIndex":990598000
journalctl -u etcd2 -f
两个节点显示:
the server is already initialized as member before, starting as etcd member...
虽然第三个节点只显示它实际上正在做某事:
Jan 31 10:52:58 core-os03 etcd2[723]: ***1257987a [logterm: 1, index:
3] sent vote request to ****30998b at term 3727 Jan 31 10:52:58
core-os03 etcd2[723]: ***257987a [logterm: 1, index: 3] sent vote
request to ******2be24 at term 3727 Jan 31 10:52:58 core-os03
etcd2[723]: failed to write *****e2930998b on pipeline (dial tcp
10.200.92.51:2380: connection refused) Jan 31 10:52:58 core-os03 etcd2[723]: publish error: etcdserver: request timed out Jan 31
10:52:59 core-os03 etcd2[723]: ****257987a is starting a new election
at term 3727
当我尝试时 etcdctl cluster-health 两个给出:
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured
error #0: dial tcp 127.0.0.1:2379: connection refused
error #1: dial tcp 127.0.0.1:4001: connection refused
第三个显示:
member 4ae0613e2930998b is unreachable: no available published client urls
member 69304b9c1257987a is unreachable: no available published client urls
member e00193231fb2be24 is unreachable: no available published client urls
cluster is unhealthy
有什么想法吗?运行私有ETCD2服务听起来不是一个好主意,因为每个人都可以访问discovery.etcd.io。
谢谢!