Hi,
We are unable to submit any Nomad jobs using JSON but HCL/Nomad jobs work as expected. Here are some of our attempts unsuccessful attempts:
- nomad run -address=http://<ipaddr_of_master> -verbose job.json
Error parsing job file job.json: 1 error(s) occurred:
* invalid key: Job
- curl -vX POST http://<ipaddr_of_master>/v1/jobs -d @job.json
* Trying...
* Connected to "master" (ipaddr_of_master) port 4646 (#0)
> POST /v1/jobs HTTP/1.1
> Host: xx.xx.xx.xx:4646
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 36998
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 06 Jul 2016 18:30:52 GMT
< Content-Length: 173
< Content-Type: text/plain; charset=utf-8
<
1 error(s) occurred:
* Task group 1 validation failed: 1 error(s) occurred:
* Task 1 validation failed: 2 error(s) occurred:
* Missing task resources
* Connection #0 to host xx.xx.xx.xx left intact
- Couple of notes that might help reproduce this issue:
Nomad version: v0.3.2
JSON file validates successfully (confirmed using jsonlint)
nomad validate jobRhozet.json
Error parsing job file jobRhozet.json: 1 error(s) occurred:
* invalid key: Job
Please point me in the right direction on how to successfully submit (JSON) jobs and let me know if you have any questions.