TLS issue when connecting to swarm 1.12.1 by docker client using docker -H

Dear all,

Try to connect to swarm 1.12.1 manager by a docker client

$ docker -H tcp://MY_MANAGER_1_IP:2377 info

got

Are you trying to connect to a TLS-enabled daemon without TLS?

Anyone has idea, thank you in advance.

I am encountering the same issue. Were you able to figure this out?

Just figured it out. You have to enable the tcp port when you start the docker daemon. I did this by adding the following

OPTIONS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"

to /etc/sysconfig/docker to my Centos 7.2 system. I then created a file which contained

[Service]
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=
ExecStart=/usr/bin/dockerd $OPTIONS

in the /etc/systemd/system/docker.service.d directory. I then needed to run

systemctl daemon-reload

Then I started docker again and was able to get the desired info using the docker -H :2375 info

HTH