# Client.rpc: error performing RPC to server: error="rpc error: Permission denied" rpc=Variables.Read

**URL:** <https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708>\
**Category:** Nomad\
**Created:** [February 3, 2023, 8:27am UTC](https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708 "2023-02-03T08:27:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenjpu1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/chenjpu1/32/19661_2.png) [@chenjpu1](https://discuss.hashicorp.com/u/chenjpu1)\
**Post date:** [February 3, 2023, 8:27am UTC](https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708/1 "2023-02-03T08:27:05Z")

</div>

Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.108+0800 [ERROR] client.rpc: error performing RPC to server: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.108+0800 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.115+0800 [ERROR] client.rpc: error performing RPC to server: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.115+0800 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.116+0800 [ERROR] client.rpc: error performing RPC to server: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.116+0800 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.116+0800 [ERROR] client.rpc: error performing RPC to server: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.116+0800 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647  
Feb 03 16:26:23 ai-149 nomad[32564]: 2023-02-03T16:26:23.118+0800 [ERROR] client.rpc: error performing RPC to server: error=“rpc error: Permission denied” rpc=Variables.Read server=172.17.22.151:4647

---

<div class="post-metadata">

**Author:** ![jrasell](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jrasell/32/5500_2.png) [@jrasell](https://discuss.hashicorp.com/u/jrasell)\
**Post date:** [February 3, 2023, 10:46am UTC](https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708/2 "2023-02-03T10:46:50Z")

</div>

Hi @chenjpu1,

Would you be able to provide some more context around what is causing this error, any configuration involved, and what your expected result is please?

Thanks,  
jrasell and the Nomad team

---

<div class="post-metadata">

**Author:** ![chenjpu1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/chenjpu1/32/19661_2.png) [@chenjpu1](https://discuss.hashicorp.com/u/chenjpu1)\
**Post date:** [March 2, 2023, 6:37am UTC](https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708/3 "2023-03-02T06:37:33Z")

</div>

Access noamd vars in template defined by job

```auto
      template {
        change_mode = "restart"
        data = "{{with nomadVar \"dapr/config\"}}{{range .Tuples}}#{{.K}}\n{{base64Decode .V}}\n---\n{{end}}{{end}}"
        destination = "local/.dapr/config.yaml"
      }

     template {
        change_mode = "restart"
        data = "{{with nomadVar \"dapr/components\"}}{{range .Tuples}}#{{.K}}\n{{base64Decode .V}}\n---\n{{end}}{{end}}"
        destination = "local/.dapr/components/config.yaml"
      }

```

---

<div class="post-metadata">

**Author:** ![chenjpu1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/chenjpu1/32/19661_2.png) [@chenjpu1](https://discuss.hashicorp.com/u/chenjpu1)\
**Post date:** [March 2, 2023, 6:42am UTC](https://discuss.hashicorp.com/t/client-rpc-error-performing-rpc-to-server-error-rpc-error-permission-denied-rpc-variables-read/49708/4 "2023-03-02T06:42:55Z")

</div>

Referring to the `https://developer.hashicorp.com/nomad/docs/concepts/variables#task-access-to-variables` documentation, the problem has been resolved.
