I’m able to run docker without port mapping, but this is the first time I’m trying to get port mapping working… If I remove the ports label, it passes the syntax check. Any ideas how to fix this? Thanks
2020-08-19T08:47:14-05:00 Failed Validation 2 errors occurred:
* failed to parse config:
* Invalid label: No argument or block type is named “ports”.
For the network->port arg, I’ve also tried ‘static’ instead of ‘to’ with the same results…
job…
group “influx_runner” {
network {
port "influxdb" {
to = 8086
}
}
task "influx_db" {
driver = "docker"
config {
image = "influxdb"
ports = ["influxdb", ] #- also tried without the comma, but docs have the comma
}
}
$ nomad alloc status 41b66252
ID = 41b66252-8b3c-29d9-3a61-dd4cc7edf7a9
Eval ID = 1c7ac6ba
Name = influx_dev.influx_runner[0]
Node ID = cd444b89
Node Name = XXXYYY
Job ID = influx_dev
Job Version = 15
Client Status = failed
Client Description = Failed tasks
Desired Status = run
Desired Description =
Created = 24s ago
Modified = 20s ago
Deployment ID = aae536b9
Deployment Health = unhealthy
Reschedule Eligibility = 15m36s from now
Task “influx_db” is “dead”
Task Resources
CPU Memory Disk Addresses
100 MHz 300 MiB 300 MiB
Task Events:
Started At = N/A
Finished At = 2020-08-19T14:03:26Z
Total Restarts = 0
Last Restart = N/A
Recent Events:
Time Type Description
2020-08-19T09:03:28-05:00 Killing Sent interrupt. Waiting 5s before force killing
2020-08-19T09:03:26-05:00 Alloc Unhealthy Unhealthy because of failed task
2020-08-19T09:03:26-05:00 Not Restarting Error was unrecoverable
2020-08-19T09:03:26-05:00 Failed Validation 2 errors occurred:
* failed to parse config:
* Invalid label: No argument or block type is named “ports”.
2020-08-19T09:03:26-05:00 Task Setup Building Task Directory
2020-08-19T09:03:26-05:00 Received Task received by client
Ok, after having tried to resolve this for 2 hours, I made this post.
2 minutes later, I restarted the nomad clients on my machines thinking it might not have restarted them after upgrade.
Tada, all works. Sorry for resurrecting this thread for nothing.