Load Balancing with NGINX Exmaple not Working

Hi, I tried load-balancing-nginx on my local maschine:

Linux: 5.11.11-arch1-1
Docker: 20.10.5

I started Consul and Nomad in Dev mode. When I read the rendered config I see:

nomad alloc fs acb nginx/local/load-balancer.conf


upstream backend {





server {
listen 8080;

location / {
proxy_pass http://backend;

That obviously does not work. Tthe forward in the Ngix contianer does not work because it is trying to forward to

Does anyone has an idea how to solve that?


1 Like

Hi @Alfred,

When running Nomad and Consul in dev mode, they both will bind and advertise on localhost which is causing the problems you are seeing. In order to update this and thus resolve the problem I would suggest passing the Nomad bind_addr and Consul bind_addr when starting the applications. Alternatively the Learn guide details this Terraform setup that will provide you with a cluster configured in the desired manner.

jrasell and the Nomad team

1 Like


I’m in the early stages of evaluating nomad so I’m a “noob” (something my 2 young boys would say).

I binded to for both nomad & consul so they aren’t using the loopback address but I too cannot get the example to work. I understand why but is there something I can do locally to get beyond this?

Warmest regards,