shunfei/cronsun

etcd停止集群中某一节点后启动node报错

Closed this issue · 1 comments

我的etcd集群配置了三个etcd节点,etcd.json配置如下
{
"Endpoints":[
"http://10.19.199.x:2379",
"http://10.19.68.x:2379",
"http://10.19.45.19.x:2379"
],
"Username":"root",
"Password":"xxxx",
"#DialTimeout":"单位秒",
"DialTimeout": 2
}
我将第一个节点(10.19.199.x)etcd服务关闭后,启动node报错:
2018-04-24T18:02:33.096+0800 ERROR node/server.go:37 Connect to ETCD [http://10.19.199.xx:2379 http://10.19.68.xx:2379 http://10.19.45.1xx:2379] failed: grpc: timed out when dialing
github.com/shunfei/cronsun/log.Errorf
/Users/Doflatango/go/src/github.com/shunfei/cronsun/log/log.go:39
main.main
/Users/Doflatango/go/src/github.com/shunfei/cronsun/bin/node/server.go:37
runtime.main
/usr/local/go/src/runtime/proc.go:198

我在虚拟机中有一套相同的环境,当我关闭etcd.json配置中任意一个etcd节点的服务时,却能正常启动node,为什么呢?

对于上面那套环境,你关了一个 etcd 节点之后要看看 etcd 集群的状态,应该是不正常的。