2

I am new to nomad. We are using nomad in production along with docker, consul, vault, ansible. When I run a nomad job from my local machine, Job registers successfully but show status as dead.

Roadrunner-2:nomad Shailesh$ nomad run -detach -address=http://nomad.example-private.com:4646 production/router.hcl 
Job registration successful
Evaluation ID: c9e77cb5-ef69-1c63-e926-f131b331d800

When I do nomad status

Roadrunner-2:nomad Shailesh$ nomad status
ID        Type     Priority  Status
metrics   system   50        running
registry  service  50        running
router    system   50        dead

And particularly when I check status of the job it gives error.

Roadrunner-2:nomad Shailesh$ nomad status router
ID          = router
Name        = router
Type        = system
Priority    = 50
Datacenters = us-east-1
Status      = dead
Periodic    = false
Error querying job summary: Unexpected response code: 404 (job not found)

I would highly appreciate any direction for troubleshooting above. Thanks

BMitch
  • 5,189
  • 1
  • 21
  • 30
Shailesh Sutar
  • 1,427
  • 4
  • 22
  • 40

1 Answers1

0

Did you try to verify whether your job is successful? $nomad eval-status c9e77cb5-ef69-1c63-e926-f131b331d800(your_eval_id)

  • `nomad eval-status c9e77cb5-ef69-1c63-e926-f131b331d800` shows `ID = c9e77cb5` `Status = complete` `Status Description = complete` `Type = service` `TriggeredBy = job-register` `Job ID = cloudwatch` `Priority = 50` `Placement Failures = false` – Shailesh Sutar Oct 13 '16 at 15:49
  • eval-status output shows that job is of type 'service' scheduler but nomad status shows it is of type 'system'. Do you have router.hcl contents posted somewhere? – chandru-ops Oct 13 '16 at 17:31
  • My mistake I gave the eval status of cloudwatch job. Below is the correct one for router job. `nomad eval-status c9d983cc-63b3-b95d-d09f-c35be2b461cb` `ID = c9d983cc Status = complete Status Description = complete Type = system TriggeredBy = job-register Job ID = router Priority = 50 Placement Failures = false` – Shailesh Sutar Oct 13 '16 at 17:38
  • You could also try "nomad status -verbose -eval router" – chandru-ops Oct 13 '16 at 17:40
  • `nomad status -verbose -eval router` doesn't work for me. – Shailesh Sutar Oct 13 '16 at 17:56
  • sorry thats a typo. it is -evals . Also check whether you are able to run that docker image independently. Sometime docker container exits when you have a foreground Job as ENTRYPOINT or CMD. I'm not sure about what your job specification is and why it is causing problems. – chandru-ops Oct 13 '16 at 18:00
  • Make sure you have same version of nomad running in server and nodes – chandru-ops Oct 13 '16 at 18:06
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/46757/discussion-between-shailesh-sutar-and-chandru-ops). – Shailesh Sutar Oct 13 '16 at 18:06