weixin_42226741
西门吹雪@
2021-01-17 20:30

k8s 安装etcd 报错

  • linux

错误信息:

● etcd.service - Etcd Server
   Loaded: error (Reason: Invalid argument)
   Active: failed (Result: start-limit) since 一 2021-01-18 03:51:17 CST; 29min ago
 Main PID: 13599 (code=killed, signal=SEGV)

1月 18 03:51:17 k8sm systemd[1]: start request repeated too quickly for etcd.service
1月 18 03:51:17 k8sm systemd[1]: Failed to start Etcd Server.
1月 18 03:51:17 k8sm systemd[1]: Unit etcd.service entered failed state.
1月 18 03:51:17 k8sm systemd[1]: etcd.service failed.
1月 18 03:51:21 k8sm systemd[1]: [/usr/lib/systemd/system/etcd.service:10] Trailing garbage, ignoring.
1月 18 03:51:21 k8sm systemd[1]: [/usr/lib/systemd/system/etcd.service:11] Unknown lvalue '--initial-cluster-state' in section 'Service'
1月 18 03:51:21 k8sm systemd[1]: etcd.service lacks both ExecStart= and ExecStop= setting. Refusing.
1月 18 04:20:29 k8sm systemd[1]: [/usr/lib/systemd/system/etcd.service:10] Trailing garbage, ignoring.
1月 18 04:20:29 k8sm systemd[1]: [/usr/lib/systemd/system/etcd.service:11] Unknown lvalue '--initial-cluster-state' in section 'Service'
1月 18 04:20:29 k8sm systemd[1]: etcd.service lacks both ExecStart= and ExecStop= setting. Refusing.

 

 

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 \
--name=${ETCD_NAME} \
--data-dir=${ETCD_DATA_DIR} \
--listen-client-urls=${ETCD_LISTEN_CLIENT_URLS} \
--listen-peer-urls=${ETCD_LISTEN_PEER_URLS} \
--advertise-client-urls=${ETCD_ADVERTISE_CLIENT_URLS} \
--initial-advertise-peer-urls=${ETCD_INITIAL_ADVERTISE_PEER_URLS} \
--initial-cluster=${ETCD_INITIAL_CLUSTER} \
--initial-cluster-token=${ETCD_INITIAL_CLUSTER} \
--initial-cluster k8s-master=https://192.168.150.134:2380,k8s-node1=https://192.168.150.139:2380,k8s-node2=https://192.168.150.140:2380 \
--initial-cluster-state=existing  \
--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
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
 

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答