Skip to content

Problem using templates after Nomad update #27431

@uranru

Description

@uranru

Hi there,

I updated Consul on my servers from version 1.20.4 to version 1.22.3.
I updated Nomad from version 1.9.6 to version 1.11.1.

These templates stopped working for me.

      template {
        data = <<EOH
          {{ range service "server.zabbix" }}
          ZBX_SERVER_HOST={{ .Address }}:{{ .Port }}
          {{ end }}
          EOH
        destination = "local/env"
        env         = true
      }
      template {
        data = <<EOH
          {{ range service "java-gateway.zabbix" }}
          ZBX_JAVAGATEWAY     = {{ .Address }}
          ZBX_JAVAGATEWAYPORT = {{ .Port }}
          {{ end }}
          EOH
        destination = "local/env"
        env         = true
      }

At the same time, I see that the services are registered in Сosnul

consul catalog services -tags

consul
consul-dns        primary
nomad             http,rpc,serf
nomad-client      http
zabbix            balancer,db-restapi,haproxy,java-gateway,master,node0,node1,pgbouncer,postgres,primary,proxy,proxy-tools,replica,server,web

It's very sad that this functionality stopped working.

Nomad version

Nomad v1.11.1
BuildDate 2025-12-09T20:10:56Z
Revision 5b76eb0

Operating system and Environment details

Issue

Reproduction steps

Expected Result

Actual Result

Job file (if appropriate)

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Triaging

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions