有阳光的第一个清晨
2021-09-30 18:25
采纳率: 0%
浏览 111

etcd集群搭建过程中, etcd启动报错, master和node节点都报错

安装k8s过程中搭建etcd集群, 启动etcd的时候报错日志如下, 帮忙看看是怎么回事

Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.150+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40256","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.155+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40258","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.181+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43228","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.184+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43230","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.262+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40264","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.293+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40266","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.298+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43236","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.301+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43238","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.351+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40272","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.355+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40274","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.382+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43244","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.386+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43246","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.450+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40280","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.455+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40282","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.481+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43252","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.486+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43254","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.551+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40288","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.555+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40290","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.582+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43260","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.583+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43262","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"info","ts":"2021-09-30T18:12:40.590+0800","caller":"raft/raft.go:923","msg":"47b450770cd24a87 is starting a new election at term 2131"}
Sep 30 18:12:40 master etcd[3144]: {"level":"info","ts":"2021-09-30T18:12:40.590+0800","caller":"raft/raft.go:713","msg":"47b450770cd24a87 became candidate at term 2132"}
Sep 30 18:12:40 master etcd[3144]: {"level":"info","ts":"2021-09-30T18:12:40.590+0800","caller":"raft/raft.go:824","msg":"47b450770cd24a87 received MsgVoteResp from 47b450770cd24a87 at term 2132"}
Sep 30 18:12:40 master etcd[3144]: {"level":"info","ts":"2021-09-30T18:12:40.590+0800","caller":"raft/raft.go:811","msg":"47b450770cd24a87 [logterm: 1, index: 3] sent MsgVote request to 6b135269d36a1814 at term 
Sep 30 18:12:40 master etcd[3144]: {"level":"info","ts":"2021-09-30T18:12:40.590+0800","caller":"raft/raft.go:811","msg":"47b450770cd24a87 [logterm: 1, index: 3] sent MsgVote request to 7d45cd0b56b45a3e at term 
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.651+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40296","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.655+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.13:40298","server-name":"","er
Sep 30 18:12:40 master etcd[3144]: {"level":"warn","ts":"2021-09-30T18:12:40.682+0800","caller":"embed/config_logging.go:279","msg":"rejected connection","remote-addr":"192.168.182.12:43268","server-name":"","er

/opt/etcd/cfg/etcd.conf配置内容如下:

ETCD_NAME="etcd-1"
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="https://192.168.182.11:2380"
ETCD_LISTEN_CLIENT_URLS="https://192.168.182.11:2379"
#[Clustering]
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://192.168.182.11:2380"
ETCD_ADVERTISE_CLIENT_URLS="https://192.168.182.11:2379"
ETCD_INITIAL_CLUSTER="etcd-1=https://192.168.182.11:2380,etcd-2=https://192.168.182.12:2380,etcd-3=https://192.168.182.13:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
ETCD_INITIAL_CLUSTER_STATE="new"

/usr/lib/systemd/system/etcd.service文件内容如下

#[Member]
ETCD_NAME="etcd-1"
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="https://192.168.182.11:2380"
ETCD_LISTEN_CLIENT_URLS="https://192.168.182.11:2379"
#[Clustering]
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://192.168.182.11:2380"
ETCD_ADVERTISE_CLIENT_URLS="https://192.168.182.11:2379"
ETCD_INITIAL_CLUSTER="etcd-1=https://192.168.182.11:2380,etcd-2=https://192.168.182.12:2380,etcd-3=https://192.168.182.13:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
ETCD_INITIAL_CLUSTER_STATE="new"
[root@master ~]# cat  /usr/lib/systemd/system/etcd.service
[Unit]
Description=Etcd Server
After=network.target
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
EnvironmentFile=/opt/etcd/cfg/etcd.conf
ExecStart=/opt/etcd/bin/etcd --cert-file=/opt/etcd/ssl/server.pem --key-file=/opt/etcd/ssl/server-key.pem --peer-cert-file=/opt/etcd/ssl/server.pem --peer-key-file=/opt/etcd/ssl/server-key.pem --trusted-ca-file=/opt/etcd/ssl/ca.pem --peer-trusted-ca-file=/opt/etcd/ssl/ca.pem --logger=zap
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target

自己排查了, selinux已经关闭, swap分区也关闭了, 网络互相都能ping通, iptables -F清空了规则之后, 再启动还是报这个错
谢帮忙, , 感激不尽

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题