• 安装部署
  • All-in-One安装时候etcd的2379一直被拒绝

单机模式下也会有防火墙拒绝端口么。。。

  • xudongyang1809
    磁盘可以稍微弄大点,直接放在根目录即可。
    上午看的是机器的磁盘满了,导致etcd安装不成功。

@xudongyang 把报错日志发出来看一下吧, @Forest-L 有空了帮忙看看这个问题

[root@ks-allinone yum.repos.d]# 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: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
上面是etcd的问题,安装kubesphere时候也是etcd的2379过不去@Forest-L

中途有一次etcd显示正常,但是telnet ip 2379不行,但是localhost 2379和127.0.0.1 2379都可以,之后我改了/etc/etcd/etcd.conf添加了ip 2379后etcd就起不来了

[root@ks-allinone scripts]# systemctl status etcd
● etcd.service - Etcd Server
Loaded: loaded (/usr/lib/systemd/system/etcd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2019-12-16 14:11:11 CST; 53s ago
Main PID: 8947 (etcd)
Memory: 17.4M
CGroup: /system.slice/etcd.service
└─8947 /usr/bin/etcd –name=default –data-dir=/var/lib/etcd/default.etcd –listen-client-urls=http://localhost:2379

Dec 16 14:11:11 ks-allinone etcd[8947]: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 2
Dec 16 14:11:11 ks-allinone etcd[8947]: setting up the initial cluster version to 3.3
Dec 16 14:11:11 ks-allinone etcd[8947]: set the initial cluster version to 3.3
Dec 16 14:11:11 ks-allinone etcd[8947]: enabled capabilities for version 3.3
Dec 16 14:11:11 ks-allinone etcd[8947]: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
Dec 16 14:11:11 ks-allinone etcd[8947]: ready to serve client requests
Dec 16 14:11:11 ks-allinone systemd[1]: Started Etcd Server.
Dec 16 14:11:11 ks-allinone etcd[8947]: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!
Dec 16 14:11:12 ks-allinone bash[8947]: proto: no coders for int
Dec 16 14:11:12 ks-allinone bash[8947]: proto: no encoder for ValueSize int [GetProperties]
./uninstall卸载了kubesphere,重新安装了etcd,启动是成功的,之后./install,再次安装kubesphere2379端口还是过不去。

kubesphere安装前是这样
[root@ks-allinone ]# etcdctl cluster-health
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured; error #0: malformed HTTP response “\x15\x03\x01\x00\x02\x02”
; error #1: dial tcp 127.0.0.1:4001: getsockopt: connection refused

error #0: malformed HTTP response “\x15\x03\x01\x00\x02\x02”

error #1: dial tcp 127.0.0.1:4001: getsockopt: connection refused

kubesphere安装中途
[root@ks-allinone ]# 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: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
RUNNING HANDLER [etcd : wait for etcd up] *********************************************************************************************
Monday 16 December 2019 14:24:06 +0800 (0:00:02.726) 0:04:11.915 *******
FAILED - RETRYING: wait for etcd up (60 retries left).

FAILED - RETRYING: wait for etcd up (1 retries left).
fatal: [ks-allinone]: FAILED! => {
“attempts”: 60,
“changed”: false,
“content”: "",
“redirected”: false,
“status”: -1,
“url”: “https://172.18.248.238:2379/health
}

MSG:

Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>

之前安装一直是在检查etcd健康时候报错,后来有一次这里过去了,restart etcd也过去了,最后reload etcd时候2379又被拒绝了

`TASK [etcd : Configure | Check if etcd cluster is healthy] ****************************************************************************
Monday 16 December 2019 14:43:42 +0800 (0:00:00.197) 0:04:11.017 *******
FAILED - RETRYING: Configure | Check if etcd cluster is healthy (4 retries left).
FAILED - RETRYING: Configure | Check if etcd cluster is healthy (3 retries left).
FAILED - RETRYING: Configure | Check if etcd cluster is healthy (2 retries left).
FAILED - RETRYING: Configure | Check if etcd cluster is healthy (1 retries left).
fatal: [ks-allinone -> ks-allinone]: FAILED! => {
“attempts”: 4,
“changed”: false,
“cmd”: “/usr/local/bin/etcdctl –no-sync –endpoints=https://172.18.248.238:2379 cluster-health | grep -q ‘cluster is healthy’”,
“delta”: “0:00:00.240749″,
“end”: “2019-12-16 14:43:57.047583″,
“rc”: 1,
“start”: “2019-12-16 14:43:56.806834”
}

STDERR:

Error: client: etcd cluster is unavailable or misconfigured; error #0: EOF

error #0: EOF

MSG:

non-zero return code`

[root@ks-allinone etcd]# etcdctl cluster-health
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

    Forest-L
    重新打开的窗口确保防火墙已开闭,是用什么机器安装的呢?

    Forest-L 卸载安装好几次了,现在的问题是,etcdctl cluster-health结果是“cluster is health”,但是平台安装验证etcd是否健康,报错说不健康,报错信息就是上面那些,只有EOF

      Forest-L 大佬,上午那个image一直下载不下来,我从另一个机器导进来了,但是安装程序还是卡在那里不继续,需要重新安装么?
      [root@ks-allinone logs]# docker images | grep cni
      calico/cni v3.7.3 1a6ade52d471 6 months ago 135MB

      TASK [download : download_container | Download image if required ( calico/cni:v3.7.3 )] ***********************************************
      Tuesday 17 December 2019 11:46:10 +0800 (0:00:00.219) 0:22:46.205 ******
      FAILED - RETRYING: download_container | Download image if required ( calico/cni:v3.7.3 ) (4 retries left).