Issues with using Nomad variables

Hi,

I have a problem with using Nomad variables. I run 3 nodes with Nomad 1.4.4 using the exact same (generated) configuration file. I’ve created a variable in nomad/jobs/test and then try to access it from a template block in job test. This works on 2 of 3 nodes, but on the other node I get

Template     Missing: nomad.var.block(nomad/jobs/test@test.global)

From the node’s log:

request failed: method=GET path="/v1/var/nomad/jobs/test?index=1&namespace=test&stale=&wait=60000ms" error="Permission denied" code=403

The variable exists (checked with nomad var get -namespace test nomad/jobs/test). This does not happen randomly, but I can reproduce this repeatedly on the particular node every time.

Any idea what could go wrong here? This is the job definition: nomad-variables-issue · GitHub

Thanks!

I had the same problem,

Problem resolved after setting up NOMAD _ TOKEN in the nomad.env profile,

Not knowing if it is the right way

Thanks, I put a (newly created) management token in NOMAD_TOKEN, but the issue persists. Also, updating to 1.4.5 doesn’t help.