-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad error message on alloc exec when streaming through ELB #6545
Labels
Comments
Adding some more details example curl to nomad fronted w/ ELB curl -v "$NOMAD_ADDR/v1/client/allocation/14df86fb-b7b2-b429-6150-68e6fe251865/exec?task=cache&command=%5B%22bin%22%2C%22bash%22%5D"
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain; charset=utf-8
< Date: Thu, 07 Nov 2019 18:53:45 GMT
< Sec-Websocket-Version: 13
< Vary: Accept-Encoding
< Vary: Origin
< X-Content-Type-Options: nosniff
< Content-Length: 149
< Connection: keep-alive
<
Bad Request
* Connection #0 to host nomad-server-lb-1857302615.us-east-1.elb.amazonaws.com left intact
failed to upgrade connection: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header% |
error on master:
|
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Nomad version
Nomad v0.10.0-rc1 (c49bf41)
Operating system and Environment details
Linux in AWS EC2
Issue
Nomad alloc exec does not work through EC2 Classic ELB. However, the error message returned in this scenario is not human-readable, complicating the ability for operators to diagnose this issue.
Reproduction steps
/terraform
)HTTP/4646
(Layer 7)alloc fs
commands work.alloc exec
commands do not:Nomad Server log
When encountering the error, the server emits the following error message:
Summary
The root cause is that Level 7 (HTTP) ELBs in EC2 do not support WebSockets. Readers should note that there are multiple approaches to resolving this: change the listener to Level 4 (TCP); or use the newer EC2 Application Load Balancer (ALB). Regardless, the error message emitted by the CLI should propagate the error from the server, if possible.
The text was updated successfully, but these errors were encountered: