Error in documentation regarding load balacing


I tried following this tutorial, but I only got 502 Gateway Error from nginx. I ran nomad exec $alloc /bin/bash and inspected the config file. All backend IP addresses were with their corresponding port number. This doesn’t work from inside the container, but it would have worked from outside the container.

After a little poking around the documentation, I tried to move the service stanza into the task stanza so that I could add address_mode = "driver" to the service stanza. After doing this, I checked in Consul, and now it appeared to use an internal IP address which docker has assigned. I tested this configuration and it worked.

Just writing to let someone with editing capabilities know. I’m not sure how to contact those responsible for the tutorial.

Versions used:

$ nomad -v
Nomad v1.1.4

$ consul -v
Consul v1.10.2
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)