-
Notifications
You must be signed in to change notification settings - Fork 123
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
community.docker.docker_host_info : Error connecting: Error while fetching server API version: Not supported URL scheme http+docker #868
Comments
Maybe this issue is because of the requests upgrade |
if I force |
I guess you are using community.docker before 3.10.2. (You only provided the community.general version.) Either upgrade community.docker to the latest version (it fixed this issue yesterday), or stick to Also please consider searching for similar error messages in the repository before creating a new issue the next time. You would have found two closed issues. |
I'm using the latest version |
Same here, i just did a completely fresh install and this issue appears. I did, however, notice that i am using Interestingly this issue is indexed by google, whereas the other two you are referring to are not |
Apparently the latest Ansible docs weren't rebuilt for the Ansible 9.6.0 release. The docs here: https://docs.ansible.com/ansible/devel/collections/community/docker/docker_compose_module.html#deprecated and here: https://ansible-collections.github.io/community.docker/branch/main/docker_compose_module.html#deprecated show that warning.
Which is not surprising, since that module calls the |
In that case I have no idea what's going wrong in your case, since everything works both fine in CI and on my local machine with the latest requests. Are you using a special way to talk to the Docker daemon, or are you using the default way (default Unix socket)? |
@D0wn3r just to make sure, are you sure that you got the error with docker_host_info on community.docker 3.10.2? Or did you got it with some other modules, for example docker_swarm or docker_swarm_*? |
@timon-michel-scopevisio also note that docker_compose requires Docker SDK for Python < 7.0.0 (it will crash and burn with 7.0.0), and that will never receive a fix for requests 2.32.x. If you want to stick to using docker-compose v1 (that has been End of Life for several years now) with the docker_compose module, you have to make sure you use requests < 2.32.0. Better use docker_compose_v2 though :) |
FYI, the Ansible 9 docsite has been rebuilt, now it's also in the |
@felixfontein |
I have nothing special. It's a fresh install. I will try more tests. I expected to fall on people that have the same issue |
I tried again today and it works like a charm ... I close this issue so I don't know what did change since my last test. I'm not able to make it bugs |
see ansible-collections/community.docker#868 Signed-off-by: Boris Glimcher <[email protected]>
…s package A bug in the requests package v2.32.0 that causes the CI and Ansible docker module to fail with "Error connecting: Error while fetching server API version: Not supported URL scheme http+docker" msg, to reconcile this we either have to downgrade and pin the pip docker package to v7.1.0 or the requests packages to <2.32 until an offical fix is released Source 1: docker/docker-py#3256 Source 2:ansible-collections/community.docker#868 Source 3: https://www.reddit.com/r/docker/comments/1cwx3pg/issue_with_python_docker_sdk/ All these sources are within the same timeframe
I suspect this is related to the latest patch release of requests, 2.32.2. I've tested with the following: ansible [core 2.16.7] ansible-galaxy collection list On the managed node:
|
community.docker 3.10.1 only works with requests up to 2.32.1, it does not work with requests 2.32.2 and further. You need community.docker 3.10.2 for that. |
Ahh, I was just installing everything with (basically) 'pip install ansible==9.6.0 ', which of course has 3.10.1 of community.docker. Thank you for the clarification! :) |
You unfortunately have to wait for Ansible 9.7.0 then, which should be there in a bit less than 3 weeks. Or wait for Ansible 10.0.0, which is likely out next Tuesday (assuming that no blockers show up). Ansible 10.0.0rc1 (released two days ago) already has community.docker 3.10.3. |
see ansible-collections/community.docker#868 Signed-off-by: Boris Glimcher <[email protected]>
see ansible-collections/community.docker#868 Signed-off-by: Boris Glimcher <[email protected]>
Verified updating the In case someone is wondering how to do that: |
Ansible 10.0.0 is out now btw (uploaded to PyPI 33 minutes ago =) ). |
It looks like it was fixed in community.docker:3.10.2, current stable version is 3.10.3. |
Should we also update to 3.10.3 in Ansible 9 ? - https://github.com/ansible-community/ansible-build-data/blob/main/9/ansible-9.6.1.yaml#L89-L91 |
Periodic jobs are failing because Zuul Ansible executor runs with Ansible 8 which uses community.docker collection that needs requests<2.32. Revert this patch when Zuul supports Ansible 10, and/or Ansible 9 gets fixed community.docker collection. [1] [1] ansible-collections/community.docker#868 Related-Bug: #2066364 Change-Id: I1dda73b0bc9a9f57ec8fda3f2234449b04906410
* Update kolla from branch 'master' to 428f37124986019bedc897469f9b1f3470b62082 - CI: Pin requests to <2.32 for publish jobs Periodic jobs are failing because Zuul Ansible executor runs with Ansible 8 which uses community.docker collection that needs requests<2.32. Revert this patch when Zuul supports Ansible 10, and/or Ansible 9 gets fixed community.docker collection. [1] [1] ansible-collections/community.docker#868 Related-Bug: #2066364 Change-Id: I1dda73b0bc9a9f57ec8fda3f2234449b04906410
@bbezak the next regular Ansible 9 release (should be 9.7.0, and should be released in ~one week) will include it. Ansible 9.6.1 has been a hotfix for 9.6.0 to remove suspicious Windows binaries that were accidentally included in two collections. There was no other change in 9.6.1 compared to 9.6.0. |
Periodic jobs are failing because Zuul Ansible executor runs with Ansible 8 which uses community.docker collection that needs requests<2.32. Revert this patch when Zuul supports Ansible 10, and/or Ansible 9 gets fixed community.docker collection. [1] [1] ansible-collections/community.docker#868 Related-Bug: #2066364 Change-Id: I1dda73b0bc9a9f57ec8fda3f2234449b04906410 (cherry picked from commit 428f371)
Periodic jobs are failing because Zuul Ansible executor runs with Ansible 8 which uses community.docker collection that needs requests<2.32. Revert this patch when Zuul supports Ansible 10, and/or Ansible 9 gets fixed community.docker collection. [1] [1] ansible-collections/community.docker#868 Related-Bug: #2066364 Change-Id: I1dda73b0bc9a9f57ec8fda3f2234449b04906410 (cherry picked from commit 428f371)
SUMMARY
I'm trying to get docker info through Ansible with the module
community.docker.docker_host_info
but it doesn't work anymore.It's on a fresh install (fresh ubuntu 22.04 with docker 26.0.X and also tried with 25.0.4)
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Fresh instance ubuntu 22.04 from the cloud provider Scaleway
STEPS TO REPRODUCE
with docker_version: "5:25.0.4-1
ubuntu.20.04focal"EXPECTED RESULTS
I expect to get docker info
ACTUAL RESULTS
This error happened on my 3 servers
The text was updated successfully, but these errors were encountered: