i run etcd as docker container ,and 10.132.41.234 is my host ip which i run docker container on ,and i get error info like this ,i do not know if it is right and i do now familiar with etcd,some one can help? thx!
2017-09-13 08:55:03.339612 I | etcdmain: etcd Version: 3.0.17
2017-09-13 08:55:03.339891 I | etcdmain: Git SHA: cc198e2
2017-09-13 08:55:03.339902 I | etcdmain: Go Version: go1.6.4
2017-09-13 08:55:03.339912 I | etcdmain: Go OS/Arch: linux/amd64
2017-09-13 08:55:03.339921 I | etcdmain: setting maximum number of CPUs to 2, total number of available CPUs is 2
2017-09-13 08:55:03.340059 I | etcdmain: peerTLS: cert = /etc/ssl/certs/server.pem, key = /etc/ssl/certs/server-key.pem, ca = , trusted-ca = /etc/ssl/certs/ca.pem, client-cert-auth = true
2017-09-13 08:55:03.342794 I | etcdmain: listening for peers on https://127.0.0.1:2380
2017-09-13 08:55:03.342844 I | etcdmain: clientTLS: cert = /etc/ssl/certs/server.pem, key = /etc/ssl/certs/server-key.pem, ca = , trusted-ca = /etc/ssl/certs/ca.pem, client-cert-auth = true
2017-09-13 08:55:03.345340 I | etcdmain: stopping listening for peers on https://127.0.0.1:2380
2017-09-13 08:55:03.345386 C | etcdmain: listen tcp 10.132.41.234:2379: bind: cannot assign requested address
docker run -d -v /opt/certs:/etc/ssl/certs -v /opt/etcd-data:/etcd-data -p 2380:2380 -p 2379:2379 \
--name etcd gcr.io/google_containers/etcd-amd64:3.0.17 \
/usr/local/bin/etcd \
--name etcd0 \
--data-dir=/etcd-data \
--advertise-client-urls https://10.132.41.234:2379,https://127.0.0.1:2379 \
--listen-client-urls https://10.132.41.234:2379,https://127.0.0.1:2379 \
--initial-advertise-peer-urls https://127.0.0.1:2380 \
--listen-peer-urls https://127.0.0.1:2380 \
--initial-cluster-token etcd-cluster-1 \
--initial-cluster etcd0=https://127.0.0.1:2380,etcd1=https://127.0.0.1:2380,etcd2=https://127.0.0.1:2380 \
--initial-cluster-state new \
--cert-file=/etc/ssl/certs/server.pem \
--key-file=/etc/ssl/certs/server-key.pem \
--peer-cert-file=/etc/ssl/certs/server.pem \
--peer-key-file=/etc/ssl/certs/server-key.pem \
--trusted-ca-file=/etc/ssl/certs/ca.pem \
--peer-trusted-ca-file=/etc/ssl/certs/ca.pem \
--peer-client-cert-auth=true \
--client-cert-auth=true
If you follow the etcd guide, check if this point to the machine you are running the command on:
Replace 4 with the correct number.