gefyrahq / gefyra

Blazingly-fast :rocket:, rock-solid, local application development :arrow_right: with Kubernetes.
https://gefyra.dev
Apache License 2.0
692 stars 28 forks source link

Check of docker daemon is running #47

Closed SteinRobert closed 2 years ago

SteinRobert commented 2 years ago

Commands do not work when the docker daemon is not running. This causes an unreadable stacktrace.

Schille commented 2 years ago

Just out of curiosity: what is the output of gefyra check in this case?

SteinRobert commented 2 years ago
Traceback (most recent call last):
  File "urllib3.connectionpool", line 703, in urlopen
  File "urllib3.connectionpool", line 398, in _make_request
  File "http.client", line 1279, in request
  File "http.client", line 1325, in _send_request
  File "http.client", line 1274, in endheaders
  File "http.client", line 1034, in _send_output
  File "http.client", line 974, in send
  File "docker.transport.unixconn", line 30, in connect
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests.adapters", line 440, in send
  File "urllib3.connectionpool", line 785, in urlopen
  File "urllib3.util.retry", line 550, in increment
  File "urllib3.packages.six", line 769, in reraise
  File "urllib3.connectionpool", line 703, in urlopen
  File "urllib3.connectionpool", line 398, in _make_request
  File "http.client", line 1279, in request
  File "http.client", line 1325, in _send_request
  File "http.client", line 1274, in endheaders
  File "http.client", line 1034, in _send_output
  File "http.client", line 974, in send
  File "docker.transport.unixconn", line 30, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker.api.client", line 214, in _retrieve_server_version
  File "docker.api.daemon", line 181, in version
  File "docker.utils.decorators", line 46, in inner
  File "docker.api.client", line 237, in _get
  File "requests.sessions", line 542, in get
  File "requests.sessions", line 529, in request
  File "requests.sessions", line 645, in send
  File "requests.adapters", line 501, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "gefyra.__main__", line 6, in <module>
  File "gefyra.configuration", line 89, in <module>
  File "gefyra.configuration", line 22, in __init__
  File "docker.client", line 96, in from_env
  File "docker.client", line 45, in __init__
  File "docker.api.client", line 197, in __init__
  File "docker.api.client", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
Schille commented 2 years ago

That helps a lot. File "gefyra.configuration", line 22, in __init__ :+1: https://github.com/gefyrahq/gefyra/blob/3613b533309e6413fdabeb33cbd9ad172fc75b41/client/gefyra/configuration.py#L22

Schille commented 2 years ago

This has been fixed in version 0.6.7