How i can stop nomad job with name "%NAME%-%ENVIRONMENT%-%VERSION%"
Unfortunatelly command 'nomad stop %NAME%-%ENVIRONMENT%-%VERSION%'
doen't work in this case
Please help me
So, I've done the following:
1) I've created job.hcl
------------------
job "zabbix-ui-dev" {
# Service type jobs optimize for long-lived services. This is
# the default but we can change to batch for short-lived tasks.
type = "service"
....
------------------
2) nomad validate job.hcl
Job validation successful
3) run this job in nomad.
# nomad run job.hcl
==> Monitoring evaluation "1d80ee97"
Evaluation triggered by job "%NAME%-%ENVIRONMENT%-%VERSION%"
Allocation "bd4c7b1f" created: node "1449a01e", group "zabbix-ui-dev-group"
Evaluation status changed: "pending" -> "complete"
==>
Evaluation "1d80ee97" finished with status "complete"
4) get nomad status
# nomad status
ID Type Priority Status
%NAME%-%ENVIRONMENT%-%VERSION% service 50 running
5) Try to stop this nomad job
---------------------------------------------------
[root@ip-192-168-15-111 ec2-user]# nomad stop %NAME%-%ENVIRONMENT%-%VERSION%
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x53add5]
goroutine 1 [running]:
panic(0xfbb780, 0xc4200100d0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
main.RunCustom(0xc42000c130, 0x2, 0x2, 0xc420202540, 0x0)
main.Run(0xc42000c130, 0x2, 0x2, 0xc420000340)
main.main()
---------------------------------------------------
Also I've tried these command and get the same result:
#nomad stop "%NAME%-%ENVIRONMENT%-%VERSION%"
#nomad stop '%NAME%-%ENVIRONMENT%-%VERSION%'