在CoreOS中启动etcd时,它不会侦听端口4001。
只有从提示符开始时:
$ sudo systemctl start etcd.service $ ps aux|grep etcd etcd 9364 0.1 0.8 267980 4880 ? Ssl 05:43 0:00 /usr/bin/etcd $ sudo lsof -i|grep LISTEN systemd 1 root 26u IPv6 14958 0t0 TCP *:ssh (LISTEN) $ sudo -u etcd /usr/bin/etcd $ sudo lsof -i|grep LISTEN systemd 1 root 26u IPv6 14958 0t0 TCP *:ssh (LISTEN) etcd 9387 etcd 6u IPv6 194642 0t0 TCP *:4001 (LISTEN) etcd 9387 etcd 7u IPv6 194643 0t0 TCP *:afs3-callback (LISTEN)
如果在cloud-config参数中指定,etcd和fleet只能默认启动:
#cloud-config coreos: units: - name: etcd.service command: start - name: fleet.service command: start
如果你已经在你的cloud-config中有这个,journalctl -u etcd应该指出原因。