-
Notifications
You must be signed in to change notification settings - Fork 288
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
400 Bad Request: malformed Host header #448
Comments
This is in the readme. Update excon. |
@tlunter I'm lost as to how this is fixed. I'm getting this using the Chef Docker cookbook which relies on this gem to perform a docker registry login. I've linked to this item from that issue. Can you please elaborate what you mean by "This is in the readme" and "Update excon"? |
Are you positive this is not your issue from the readme in the Known Issues section?
|
Running the latest version of this gem. Is it not installing excon as a dependency? Edit: the gem for docker-api is getting installed via the Chef gem call which might not be installing dependencies. I'm looking into this as a potential issue with the cookbook. |
That's may be it. The docker api version getting installed is actuall docker-api-1.22.4 and thus excon is excon-0.45.4. |
This problem is because of a change in the docker engine. Excon is a dependency of docker-api. We do not force you to upgrade excon because docker engine doesn't consider whether or not they break things in their API. This has been noted in the README because it affected multiple people. Did upgrading excon not fix your problem? |
docker-api v1.22.4 has this for its excon requirement: https://github.com/swipely/docker-api/blob/5dee4c3cadce8ff52922515749aa37e742936470/docker-api.gemspec#L17 . You should be able to update excon just fine. |
Unfortunately I don't have control over this. The gems are installed embedded as part of the Chef execution and not globally. The docker cookbook may need to be modified to support this. |
I have no idea how chef cookbooks work, so I can't really help there. If you don't have access to a Gemfile somewhere, then you'll need to find another way to specify that your chef setup use excon 0.46+ |
@eric-tucker Probably, you are not logged in to the repository, when you are not logged in (have no permissions) you get this error. If you are using private repository try logging in. |
@jaydipdave this is on the Chef call to docker_registry which performs the login. :) |
Oops. If you are getting the error at the time of login, then it is some other issue. But if you are getting this error after login, may be you want to check the session stuff?!! You might want to consider opening a ticket here: https://github.com/chef-cookbooks/docker? |
Already done. Link is above where I've referenced this item on the ticket on the Chef Docker cookbook. |
Cool. |
Well once I got issues around the excon version:
This is a tricky one. |
If you add |
It is required to have "Host:" header in docker_api, even when you request though "unix:///var/run/docker.sock", when you use HTTP/1.1.
issue:
================================================================================ Error executing action
create` on resource 'docker_network[mesos_network]'================================================================================
I added a dummy "Host" header in : docker-api-1.31.0/lib/docker/connection.rb
And it worked!!!! Thanks.
The text was updated successfully, but these errors were encountered: