home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.77k stars 648 forks source link

docker image not running - gives an error #4136

Closed ZAKhan closed 1 year ago

ZAKhan commented 1 year ago

Describe the issue you are experiencing

i am on arch linux and trying to run docker image (homeassistant/amd64-hassio-supervisor) but its giving me errors:

Can someone please help me out.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. docker pull homeassistant/amd64-hassio-supervisor
  2. docker run homeassistant/amd64-hassio-supervisor

I also tried to pass env variables but the result was the same, the cmd was as follows :

docker run -e SUPERVISOR_SHARE='${HASSIO_DATA}' -e SUPERVISOR_NAME='hassio_supervisor' -e SUPERVISOR_MACHINE='${MACHINE}' -p 8123:8123 homeassistant/amd64-hassio-supervisor

Anything in the Supervisor logs that might be useful for us?

sudo docker run -p 8123:8123 homeassistant/amd64-hassio-supervisor
Unable to find image 'homeassistant/amd64-hassio-supervisor:latest' locally
latest: Pulling from homeassistant/amd64-hassio-supervisor
ca7dd9ec2225: Pull complete 
e6d365cffc05: Pull complete 
25233afa79ae: Pull complete 
3672428e239a: Pull complete 
1ad69a6e86a8: Pull complete 
abb2341072b3: Pull complete 
219e719719e5: Pull complete 
4f4fb700ef54: Pull complete 
f32069fe1ef2: Pull complete 
f73ab1098ee6: Pull complete 
10b40f146b07: Pull complete 
f9fb68e960e4: Pull complete 
1ec4aebb4701: Pull complete 
32e645ef9d16: Pull complete 
Digest: sha256:d14209260f969434c28aa5bca575a0545c35facae3427c8c4a3cada87eb33e9b
Status: Downloaded newer image for homeassistant/amd64-hassio-supervisor:latest
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/udev.sh
[11:47:34] INFO: Setup udev backend inside container
starting version 3.2.11
[11:47:34] INFO: Update udev information
cont-init: info: /etc/cont-init.d/udev.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun supervisor (no readiness notification)
services-up: info: copying legacy longrun watchdog (no readiness notification)
[11:47:34] INFO: Starting local supervisor watchdog...
s6-rc: info: service legacy-services successfully started
23-02-09 11:47:35 CRITICAL (MainThread) [supervisor.bootstrap] Can't find 'SUPERVISOR_SHARE' environment variable!
23-02-09 11:47:35 CRITICAL (MainThread) [supervisor.bootstrap] Can't find 'SUPERVISOR_NAME' environment variable!
23-02-09 11:47:35 CRITICAL (MainThread) [supervisor.bootstrap] Can't find any kind of machine/homeassistant details!
23-02-09 11:47:35 CRITICAL (MainThread) [supervisor.bootstrap] Can't find Docker socket!
23-02-09 11:47:35 INFO (MainThread) [__main__] Initializing Supervisor setup
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/local/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/local/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/src/supervisor/supervisor/__main__.py", line 42, in <module>
    coresys = loop.run_until_complete(bootstrap.initialize_coresys())
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/usr/src/supervisor/supervisor/bootstrap.py", line 58, in initialize_coresys
    coresys.docker = DockerAPI(coresys)
  File "/usr/src/supervisor/supervisor/docker/manager.py", line 106, in __init__
    self.docker: DockerClient = DockerClient(
  File "/usr/local/lib/python3.10/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
23-02-09 11:47:35 ERROR (MainThread) [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f188c991f00>
[11:47:35] WARNING: Halt Supervisor
[11:47:35] INFO: Supervisor restart after closing
s6-rc: info: service legacy-services: stopping
[11:47:35] INFO: Watchdog restart after closing
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

System Health information

Since docker image is not running , cannot provide any system health information

Supervisor diagnostics

No response

Additional information

No response

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.