How to map the port with instead of default mapping

Port is mapped with instead of as below while running the container, so that application is unable to access from browser.
What configuration is required to map instead of>38085/tcp,>38085/udp,>51126/tcp,>51126/udp,>51127/tcp,>51127/udp

See Binding ports to · Issue #12106 · hashicorp/nomad · GitHub , Nomad can’t use But it is anyway odd that Nomad is choosing instead of some external ip address. Check default network in your client configuration.

Hi, is binding by default if run as docker container as below

f77b6ebfd5b0 “/opt/recipe-centos/…” 3 days ago Up 10 seconds>22/tcp, :::51127->22/tcp,>1521/tcp, :::51126->1521/tcp,>8085/tcp, :::38085->8085/tcp,>8111/tcp, :::49160->8111/tcp,>8161/tcp, :::49159->8161/tcp,>8222/tcp, :::49158->8222/tcp,>27017/tcp, :::49157->27017/tcp plab is binding by default if run as nomad job as below. We are running singe node cluster.

d4f3eddada5b “/opt/recipe-centos/…” 10 seconds ago Up 8 seconds 22/tcp, 1521/tcp, 8085/tcp, 8111/tcp, 8161/tcp, 8222/tcp, 27017/tcp,>38085/tcp,>38085/udp,>51126/tcp,>51126/udp,>51127/tcp,>51127/udp ms-instance-task-7755b36c-bb94-cc44-cb19-da26aaea02d1

We are not familiar on nomad. We just started learning. From where the (localhost) is picking in the nomad job. It could be helpful if you point out the right file to check the same.

@grvenkatesan can you post your nomad configuration and your job configuration?


Find the below nomad and job configuration. By default allocation address bind with instead of ip address. I observed that it is happening in ubuntu OS only and the same is working in the Amazon Linux OS.

Allocation Addresses (mode = “bridge”):
Label Dynamic Address
*http yes


data_dir = “/opt/nomad/data”
bind_addr = “”

advertise {

Defaults to the first private IP address.

http = “” # must be reachable by Nomad CLI clients
rpc = “” # must be reachable by Nomad client nodes
serf = “” # must be reachable by Nomad server nodes

server {

license_path is required as of Nomad v1.1.1+

#license_path = “/opt/nomad/license.hclic”
enabled = true
bootstrap_expect = 1

client {
enabled = true
servers = [“”]



job “nginx” {
datacenters = [“dc1”]
type = “service”
group “nginx” {
count = 1 # number of instances

network {
  mode = "bridge"
  port "http" {
    static = 80

task "nginx-task" {
  driver = "docker"

  config {
    image = "nginx:1.23"
    force_pull = false
    auth_soft_fail = true

    ports = [