我正在尝试使用Consul作为密钥库在EC2中手动部署Swarm。 这是我的Consul创业公司:
sudo docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
sudo docker -H tcp://54.218.52.98:2375 run -d -p 8500:8500 -h consul progrium/consul -server -bootstrap
我正在使用以下命令在Swarm主服务器上启动docker守护程序。我使用Ubuntu 15.04在EC2中运行。
任何帮助都将不胜感激。
sudo docker daemon --cluster-store=consul:///54.218.52.98:8500 --cluster-advertise=eth0:2375 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
启动主守护程序时出现以下错误:
ubuntu@ip-172-31-12-164:~$ WARN[0000] /!\ DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING /!\
INFO[0000] [graphdriver] using prior storage driver "aufs"
INFO[0000] Initializing discovery without TLS
INFO[0000] API listen on [::]:2375
INFO[0000] API listen on /var/run/docker.sock
ERRO[0000] discovery error: Unexpected watch error
ERRO[0000] Registering as "172.31.12.164:2375" in discovery failed: cannot set or renew session for ttl, unable to operate on sessions
INFO[0000] Firewalld running: false
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.1/16. Daemon option --bip can be used to set a preferred IP address
WARN[0000] Your kernel does not support swap memory limit.
INFO[0000] Loading containers: start.
..
INFO[0000] Loading containers: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=a34a1d5 execdriver=native-0.2 graphdriver=aufs version=1.9.1
答案 0 :(得分:0)
您是否检查了aws ifconfig,您会注意到您的外部IP没有直接链接到eth接口。
我建议--cluster-store consul://127.0.0.1:8500