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

Display a better error message when Docker Desktop is not running #268

Open
johnbillion opened this issue Mar 4, 2021 · 0 comments
Open
Labels
developer advocacy Developer Advocacy related tasks

Comments

@johnbillion
Copy link
Member

When running composer server for the first time on a project and Docker Desktop is not running, there's a rather cryptic error. It would be great if the command first checked to see if Docker is running, and display a user friendly message if not.

The error shown is:

> composer server
Starting...
Traceback (most recent call last):
  File "site-packages/docker/api/client.py", line 259, in _raise_for_status
  File "site-packages/requests/models.py", line 941, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/version

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages/docker/api/client.py", line 205, in _retrieve_server_version
  File "site-packages/docker/api/daemon.py", line 181, in version
  File "site-packages/docker/api/client.py", line 265, in _result
  File "site-packages/docker/api/client.py", line 261, in _raise_for_status
  File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'dial unix docker.raw.sock: connect: connection refused'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 67, in main
  File "compose/cli/main.py", line 123, in perform_command
  File "compose/cli/command.py", line 69, in project_from_options
  File "compose/cli/command.py", line 132, in get_project
  File "compose/cli/docker_client.py", line 43, in get_client
  File "compose/cli/docker_client.py", line 170, in docker_client
  File "site-packages/docker/api/client.py", line 188, in __init__
  File "site-packages/docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: 500 Server Error: Internal Server Error ("b'dial unix docker.raw.sock: connect: connection refused'")
[30221] Failed to execute script docker-compose
Could not start traefik proxy.
@missjwo missjwo added the developer advocacy Developer Advocacy related tasks label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer advocacy Developer Advocacy related tasks
Projects
None yet
Development

No branches or pull requests

2 participants