Skip to content
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

Docker not available or failed to start after new version of requests #55

Open
nbonnotte opened this issue May 21, 2024 · 5 comments · May be fixed by #57
Open

Docker not available or failed to start after new version of requests #55

nbonnotte opened this issue May 21, 2024 · 5 comments · May be fixed by #57

Comments

@nbonnotte
Copy link

Today composer-dev failed to start with a message

Docker not available or failed to start. Please ensure docker service is installed and running.

It seems to come from the recent release of requests 2.32. It is a bug in the docker python library that is already traced, see docker/docker-py#3256

Pinning requests to a previous version solves the issue

@GabrielBoninUnity
Copy link

GabrielBoninUnity commented May 29, 2024

same issue! pinning requests to version 2.31 in the dependency in setup.py is fixing the issue

dependencies = [
"click>=7.0",
"google-auth==2.27.",
"google-cloud-orchestration-airflow>=1.2.0",
"google-cloud-artifact-registry>=1.2.0",
"rich_click==1.4.0",
"docker==6.
",
"requests==2.31"
]

@nbonnotte nbonnotte linked a pull request May 30, 2024 that will close this issue
@nbonnotte
Copy link
Author

nbonnotte commented May 30, 2024

Alternatively, we can bump the version of docker following the release of 7.1.0. I have opened a PR #57

@giuseppe-russo
Copy link

same issue, is it possible to merge that PR ? Thanks

@csoare7
Copy link

csoare7 commented Jul 30, 2024

EDIT

Pinning docker to 7.1.0 works 🎉

If you are getting the error:

Docker not available or failed to start. Please ensure docker service is installed and running.
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')

On macOS with Docker Desktop, check Enable default docker socket in Settings -> Advanced section - that should fix it.

@ivan-toriya
Copy link

ivan-toriya commented Aug 26, 2024

Pinning docker to 7.1.0 doesn't work for me.
Same error.

                    DEBUG    docker.utils.config:Trying paths: ['/home/ivan/.docker/config.json', '/home/ivan/.dockercfg']                                      config.py:21
                    DEBUG    docker.utils.config:Found file at path: /home/ivan/.docker/config.json                                                             config.py:25
                    DEBUG    docker.auth:Found 'credsStore' section                                                                                              auth.py:177
                    DEBUG    root:Docker not found.                                                                                                       environment.py:470

**Traceback ommited**

╭─ Error ───────────────────────────────────────────────────────────────────────────╮
│ Docker not available or failed to start. Please ensure docker service is          │
│ installed and running. Error: Error while fetching server API version:            │
│ ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))        │
│                                                                                   │
│ To print debug messages please add --debug flag.                                  │
╰───────────────────────────────────────────────────────────────────────────────────╯

EDIT:
Now it's working. I was using the Docker Desktop version which runs in VM. The problem was in the socket, so I just installed the Docker Engine from apt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants