I have problem when trying to enable multi-host networking by following the UCP documentation site.
My setup is below:
- IP Address: 18.104.22.168
- Domain name: ucp.skywidesoft.com (I entered this as the SAN during installation)
- SSL: I am using my own cert which is a wildcard certificate (please see attached image on the alternative name of the cert)
- Network interface: em2
- OS: CentOS 7.1 (kernel 4.3.0)
In the docker.service file, I added the following options:
–cluster-advertise em2:12376 --cluster-store etcd://ucp.skywidesoft.com:12379 --cluster-store-opt kv.cacertfile=/var/lib/docker/discovery_certs/ca.pem --cluster-store-opt kv.certfile=/var/lib/docker/discovery_certs/cert.pem --cluster-store-opt kv.keyfile=/var/lib/docker/discovery_certs/key.pem
- For the option “–cluster-advertise”, I found that I can only start docker engine when using the network interface name (i.e. em2), docker engine fail to start when I use either the IP (22.214.171.124) or SAN (ucp.skywidesoft.com)
- For the option “–cluster-store”, I found that no matter I use the IP address or SAN, I still found errors in the docker service log indicates that there is error in connecting to etcd
level=error msg="Registering as “126.96.36.199:12376” in discovery failed: client: etcd cluster is unavailable o
950968618+08:00" level=error msg=“discovery error: Unexpected watch error”
I also suspect that since I am using my own cert, I should use my own cert for docker engine to use. So I also tried to copy my certificates to the above folder and restart docker. However, the same error happens.
I check the log of the controller container and find that it’s working properly, don’t know why can’t connect from docker engine.