Problem is, I’m unable to remotely connect to it. I’m using the same ports as in the example, and the client simply responds with a "malformed HTTP response “\x15\x03\x01\x00\x02\x02” when attempting to connect.
My manager node is configured with ssh password rather than key, so at this point I have no idea where (if it even exists) I can find the key that lets me connect. Am I stupid or are the docs missing something?
@trondhindenes , what do you mean you’re unable to remotely connect to the machine? What command are you running and where?
You need to SSH into your manager machine and run docker swarm init locally to the machine.
Also you need to have Docker Engine 1.12 installed on the manager machine.
I have the same issue, I’m running 1 manager and 2 workers on EC2 instances.
Which certificate do I need to use in order to connect my client (export DOCKER_CERT_PATH=)
I guess that when I ran the docker swarm init command it created the certificate…
[root@swarm-manger01 ~]# docker version
Client:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built:
OS/Arch: linux/amd64
Experimental: true
@charlessmith what do you mean when you say: “you run the commands on the manager”? Does it mean that I need to ssh my swarm-manger01 and then to run docker commands?
What about exporting the DOCKER_HOST environment variable? Can’t I use it?
The TLS for swarm mode is for node to node communication internally to the swarm. You can’t use that to connect from a remote client.
The tutorial is written from the perspective of SSH-ing into the machine and running the commands locally there.
If you want to connect a remote client to the manager node, you would need to set that up the same way as you would before in Docker 1.11.
Jus to be sure I verified with engineering. If docker version is not working between the client and the remote manager, this is not a swarm mode-specific issue.
You can bind the docker daemon running on your swarm manager nodes to a TCP port and communicate with it insecurely via docker -H tcp://x.x.x.x:2375 but is it not recommended for production. For testing it should be ok.
I’m try to setup CI & CD for my dev server using gitlab.com, but i could not make it. Getting the below error.
Environment : AWS EC2
OS : Ubuntu 16.
ubuntu@bookeiz:~/swarm$ sudo docker --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem -H=localhost:2377 version
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 08:01:32 2017
OS/Arch: linux/amd64
error during connect: Get https://localhost:2377/v1.26/version: x509: certificate is valid for swarm-manager, rocu0uma3ty5mqvz3hkbdhdjn, swarm-ca, not localhost