# Port 8500 not reachable - what is it?

**URL:** <https://discuss.hashicorp.com/t/port-8500-not-reachable-what-is-it/44766>\
**Category:** Nomad\
**Created:** [September 26, 2022, 7:55am UTC](https://discuss.hashicorp.com/t/port-8500-not-reachable-what-is-it/44766 "2022-09-26T07:55:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladaman](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/vladaman/32/30944_2.png) [@vladaman](https://discuss.hashicorp.com/u/vladaman)\
**Post date:** [September 26, 2022, 7:55am UTC](https://discuss.hashicorp.com/t/port-8500-not-reachable-what-is-it/44766/1 "2022-09-26T07:55:43Z")

</div>

I am trying to setup some basic Nomad service and I get following error:

`Template failed: health.service(global-redis-check|passing): Get "http://127.0.0.1:8500/v1/health/service/global-redis-check?passing=1&stale=&wait=60000ms": dial tcp 127.0.0.1:8500: connect: connection refused`

Where is this port 8500 coming from?

```auto
job "nginx" {
  datacenters = ["aws"]

  group "nginx" {
    count = 1

    network {
      port "http" {
        static = 8080
      }
    }

    service {
      name = "nginx"
      port = "http"
      provider = "nomad"
    }

    task "nginx" {
      driver = "docker"

      config {
        image = "nginx"

        ports = ["http"]

        volumes = [
          "local:/etc/nginx/conf.d",
        ]
      }

      template {
        data = <<EOF
upstream backend {
{{ range service "global-redis-check" }}
  server {{ .Address }}:{{ .Port }};
{{ else }}server 127.0.0.1:65535; # force a 502
{{ end }}
}

server {
   listen 8080;

   location / {
      proxy_pass http://backend;
   }
}
EOF

        destination = "local/load-balancer.conf"
        change_mode = "signal"
        change_signal = "SIGHUP"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![seth.hoenig](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/seth.hoenig/32/27213_2.png) [@seth.hoenig](https://discuss.hashicorp.com/u/seth.hoenig)\
**Post date:** [September 26, 2022, 3:18pm UTC](https://discuss.hashicorp.com/t/port-8500-not-reachable-what-is-it/44766/2 "2022-09-26T15:18:18Z")

</div>

Hi @vladaman, port 8500 is the default HTTP port for Consul. Since you have `provider = "nomad"`, it looks like you intend to use Nomad’s native service discovery instead of Consul. In that case, in the `template` block you’ll need to use `range nomadService` instead of where you have `range service`. The later is only for Consul services.
