Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Confused about running the proxy on non-manager nodes #215

Open
samattridge opened this issue Jul 24, 2017 · 0 comments
Open

Confused about running the proxy on non-manager nodes #215

samattridge opened this issue Jul 24, 2017 · 0 comments

Comments

@samattridge
Copy link

samattridge commented Jul 24, 2017

Sorry if I've missed something obvious but I'm a bit confused with the approach of running the proxy on non-manager nodes while in Swarm Mode. The documentation says the following:

For dockercloud/haproxy service: If you mount /var/run/docker.sock, it can only be run on swarm manager nodes. If you want the haproxy service to run on worker nodes, you need to setup DOCKER_HOST envvar that points to the manager address.

So I set the DOCKER_HOST envvar on the haproxy service I created to point to a manager node but get the following error:

Haproxy is running using legacy link, loading HAProxy definition from environment variables: unable to get dockercloud/haproxy container inspect information, 404 Client Error: Not Found ("{"message":"No such container: 8ee8f211b858"}")

Looking at the source code, it seems that it attempts to determine which mode it is running it automatically by inspecting the docker configuration by the id of the container. So when I set the DOCKER_HOST envvar to a management node which isn't running the container, unsurprisingly, it is unable to find the container by its id and falls back to legacy mode.

Any ideas?

Many thanks in advance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant