You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues making this trivial config to execute:
(Nomad 0.12.7)
job "example" {
datacenters = ["dc1"]
group "webGroup" {
network {
port "http" { to = 80 }
}
task "webTask" {
driver = "docker"
config {
image = "nginxdemos/hello"
ports = ["http"]
}
service {
port = "http"
check {
type = "tcp"
interval = "10s"
timeout = "2s"
port = "http"
}
}
resources {
cpu = 500
memory = 256
}
}
}
}
Getting back:
Error submitting job: Unexpected response code: 500 (1 error occurred:
* Task group webGroup validation failed: 1 error occurred:
* Task webTask validation failed: 1 error occurred:
* 1 error occurred:
* port label "http" referenced by services example-webGroup-webTask does not exist
After fiddling around with it I realized that moving the service stanza up into the task group does the trick.
I can't understand or find the relevant reference in the docs to why this doesn't work in the first place. This doc seems to have exact same config.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I'm having issues making this trivial config to execute:
(Nomad 0.12.7)
Getting back:
After fiddling around with it I realized that moving the
service
stanza up into the task group does the trick.I can't understand or find the relevant reference in the docs to why this doesn't work in the first place. This doc seems to have exact same config.
The text was updated successfully, but these errors were encountered: