Closed levino closed 6 years ago
This has been fixed. The problem was that I secured the docker daemon on the server to access it remotely. So I changed my /etc/docker/daemon.json
to this
{
"tlsverify": true,
"tlscacert": "/var/docker/ca.pem",
"tlscert": "/var/docker/server-cert.pem",
"tlskey": "/var/docker/server-key.pem",
"hosts": ["tcp://0.0.0.0:2376"]
}
But dockercloud/haproxy
wants to communicate via the unix socket at /var/run/docker.sock
which my dockerd
would not be using to any more. So changing the file to the following worked:
{
"tlsverify": true,
"tlscacert": "/var/docker/ca.pem",
"tlscert": "/var/docker/server-cert.pem",
"tlskey": "/var/docker/server-key.pem",
"hosts": ["tcp://0.0.0.0:2376","unix:///var/run/docker.sock"]
}
Fortunately the connection on the unix port does not require tls authentication. I wonder how I would set that in dockercloud/haproxy
:relieved:
I try to set up load balancing for a docker swarm stack. Here is the logs from haproxy:
Here is my loadbalancer stackfile:
And here is the service I want to connect to:
When I try to access http://app.blooks.io nothing works. "Refused to connect". When I access http://app.blooks.io:8080 it works. What am I doing wrong?
The swarm only has one node.