Reputation: 693
I have provisioned Fabio job using Nomad as seen below:
job "fabio" {
datacenters = ["dc1"]
type = "system"
group "fabio" {
network {
port "lb" {
static = 9999
}
port "ui" {
static = 9998
}
}
task "fabio" {
driver = "docker"
config {
image = "fabiolb/fabio"
network_mode = "host"
ports = ["lb","ui"]
}
resources {
cpu = 200
memory = 128
}
}
}
}
Fabio UI is working on port 9998 on my IP
I have registered a service using consul and it shows up in my fabio UI just fine
My service is working just fine.. When I go to http://:29504, it shows up my service
When I go to http://:9999/emailhandler-api, it is not resolving at all.
Can someone assist me what I might be doing wrong?
Upvotes: 0
Views: 110
Reputation: 1
Try to add in task an arguments to tell fabio witch port they need to listen:
args = [
"-registry.backend=consul",
"-proxy.strategy=rnd",
"-registry.consul.checksRequired=all",
"-proxy.addr=127.0.0.1:${NOMAD_PORT_lb};proto=http;",
"-registry.consul.register.addr=:${NOMAD_PORT_ui}",
"-ui.addr=:${NOMAD_PORT_ui}"
]
Upvotes: 0