hashicorp / hashicorp/nomad

Error 500 on restarting allocation of stopped job

Open
#7,604 3 comments 1 reaction 0 assignees View on GitHub
theme/api type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Hi guys,
When you call "/v1/client/allocation/:alloc_id/restart" on an outdated allocation, the server waits 10min to respond 500 internal server error.
It should return a regular error, like a bad request.
My cluster is running nomad 0.9.5.
```
curl -vvv --request POST -H "X-Nomad-Token: MYTOKEN" mynomadclusterurl:4646/v1/client/allocation/1f6f900a-daeb-0946-b98a-6962cb76f146/restart
* About to connect() to mynomadclusterurl port 4646 (#0)
* Trying 10.231.16.254...
* Connected to mynomadclusterurl (10.231.16.254) port 4646 (#0)
> POST /v1/client/allocation/1f6f900a-daeb-0946-b98a-6962cb76f146/restart HTTP/1.1
> User-Agent: curl/7.29.0
> Host: mynomadclusterurl:4646
> Accept: */*
> X-Nomad-Token: MYTOKEN
>
< HTTP/1.1 500 Internal Server Error
< Vary: Accept-Encoding
< Vary: Origin
< Date: Thu, 02 Apr 2020 16:32:21 GMT
< Content-Length: 14
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host mynomadclusterurl left intact
rpc error: EOF
```
Sincerly,
Anthony

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.