配置docker网络flannel时,配置etcd的key的时候出现如下错误docker
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused
; error #1: dial tcp 127.0.0.1:2379: getsockopt: connection refused
error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused
error #1: dial tcp 127.0.0.1:2379: getsockopt: connection refused
解决办法:vim
修改etcd的配置文件:网络
vim /etc/etcd/etcd.conftcp

在 第6行,后面配置http://127.0.0.1:2379,与本机本身进行通讯, ETCD_LISTEN_CLIENT_URLS="http://192.168.7.78:2379,http://127.0.0.1:2379"blog
而后重启etcd服务便可get