Supervisor: connection refused to hassio

Created on 13 Aug 2018  ·  59Comments  ·  Source: home-assistant/supervisor

any idea why there is no access to the service from the hassio-CLI?

hassio > ha info
The HTTP request failed with the error: Get http://hassio/homeassistant/info: dial tcp 192.168.1.226:80: getsockopt: connection refused

hassio > ne info
The HTTP request failed with the error: Get http://hassio/network/info: dial tcp 192.168.1.226:80: getsockopt: connection refused

stale

Most helpful comment

I'm encountering this same issue. I'm unable to ssh into my Raspberry Pi at all, I had to plug it into a monitor and keyboard and access the console directly. Which reminds me, for anyone else that comes along, and is frustrated by the console spam do the following:

  1. Enter root as the login
  2. Press enter a second time to skip the empty password.
  3. login to get access to a shell prompt.
  4. dmesg -n 1 will stop the spam.
  5. exit will put you back into the hassio login.

When I do journalctl -fu hassos-supervisor I get output very similar to @Megachip, but the version is 165 and not 155. That is, hassos-supervisor.service is constantly existing with status=1/FAILURE and restarting.

My /mnt/data/hassos.json is identical to the one posted by @dzerovibe.

All the hassos/hassio commands in the console (like supervisor logs fail with Get http://hassio/supervisor/logs: dial tcp 192.168.1.34:80: connect: connection refused.

date returns the correct date and time.

I'm able to ping IP addresses and domain names, so I've got DNS and wireless connectivity.

At this point I have no idea what else to do other than pop in a new microSD card and start over. Open to suggestions!

All 59 comments

look like your docker resolve hassio not to internal address. That is strange, since we set this into host over docker run command.

is that over tty1 or ssh?

I get this error over ssh and tty

Same here, CLI can't resolve DNS.

I'm having the same issue. I even just booted up a brand new image of hassos_rpi3-1.9 and after waiting for the installation to complete, the CLI is unusable due to this getsockopt error.

I have the same Issue. I have been always using a Home-assistant on a linux and now, when I wanted to move to a dedicated Hass.io I get the same error. My PI 3 B event don't want to install. Tried HassOS Release 1 build 9 (Stable) and also Development 2 build 1. Nothing helps. I' getting connection refused on CLI and on http://rpi_ip:8123. Can't even get logs

I've now tried this on the CLI (local tty, not SSH) on fresh installs of hassos_rpi v1.7 and v1.9 and v2.1

I get the same error in all cases. Is this a bug, or are these commands not supposed to work from the local terminal?

can print the output of /mnt/data/hassos.json ?

Same Issue here.

Output of /mnt/data/hassos.json

{
    "supervisor": "homeassistant/armhf-hassio-supervisor",
    "supervisor_args": "-e HOMEASSISTANT_REPOSITORY=homeassistant/raspberrypi3-homeassistant",
    "cli": "homeassistant/armhf-hassio-cli",
    "cli_args": "--network=hassio --add-host hassio:172.30.32.2",
    "cli_apparmor": "docker-default",
    "apparmor": "supervisor/apparmor"
}

I don't actually know, where that IP is coming from.
"ip a" shows some completely different IP.

Mine looks the same:

{
"supervisor": "homeassistant/armhf-hassio-supervisor",
"supervisor_args": "-e HOMEASSISTANT_REPOSITORY=homeassistant/raspberrypi3-homeassistant",
"supervisor_apparmor": "hassio-supervisor",
"cli": "homeassistant/armhf-hassio-cli",
"cli_args": "--network=hassio --add-host hassio:172.30.32.2",
"cli_apparmor": "docker-default",
"apparmor": "supervisor/apparmor"
}

i get the same error with internal address use 1.9 stable image

hassio > ne info
The HTTP request failed with the error: Get http://hassio/network/info: dial tcp 172.30.32.2:80: getsockopt: connection refused

hassio > ha update
The HTTP request failed with the error: Post http://hassio/homeassistant/update: dial tcp 172.30.32.2:80: getsockopt: connection refused

Same for me
Every time we have a power outage this seems to happen.
This will be the third time I have to reflash the SD card.

Maybe this could be a clue.
After "stating eudev-3.2.5" it waits a long time and then displays:
"nf_comtrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT Target to attach helpers instead."

confirm issue. try 32 and 64 bit for Raspberry Pi 3 - several times re-flash/reinstall. each try - connection refuse. first time try to wait more than 4 hours - result same.

Same issue here. Hass.io should be more robust against power outage.
edit: I realized that hassio could not connect to my wifi anymore. I restarted my AP before restarting HASS.IO and then connection was back. Just upgraded to 0.77.3. No more problem.

Just encountered this as well. We all dead in the water?

journalctl -fu hassos-supervisor

Look like the supervisor is not running. Try to run it manual with:
systemctl start hassos-supervisor

Looks as if the supervisor is running based upon output of journalctl -fu hassos-supervisor but keeps restarting

Sep 10 15:57:15 hassio systemd[1]: hassos-supervisor.service: Service hold-off time over, scheduling restart.
Sep 10 15:57:15 hassio systemd[1]: hassos-supervisor.service: Scheduled restart job, restart counter is at 3.
Sep 10 15:57:15 hassio systemd[1]: Stopped HassOS supervisor.
Sep 10 15:57:15 hassio systemd[1]: Starting HassOS supervisor...
Sep 10 15:57:16 hassio docker[1843]: hassos_supervisor
Sep 10 15:57:16 hassio systemd[1]: Started HassOS supervisor.
Sep 10 15:57:25 hassio hassos-supervisor[1852]: 18-09-10 15:57:25 INFO (MainThread) [__main__] Initialize Hassio setup
Sep 10 15:57:25 hassio hassos-supervisor[1852]: 18-09-10 15:57:25 INFO (MainThread) [__main__] Setup HassIO
Sep 10 15:57:25 hassio hassos-supervisor[1852]: 18-09-10 15:57:25 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to supervisor homeassistant/armhf-hassio-supervisor with version 127
Sep 10 15:57:26 hassio hassos-supervisor[1852]: Traceback (most recent call last):
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 229, in _raise_for_status
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     response.raise_for_status()
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 939, in raise_for_status
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     raise HTTPError(http_error_msg, response=self)
Sep 10 15:57:26 hassio hassos-supervisor[1852]: requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.37/images/sha256:18262da2ab37b7d01b37d2c9a180dadbd9ecbbabc08ac567754efb8bb19e04b7/json
Sep 10 15:57:26 hassio hassos-supervisor[1852]: During handling of the above exception, another exception occurred:
Sep 10 15:57:26 hassio hassos-supervisor[1852]: Traceback (most recent call last):
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     "__main__", mod_spec)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     exec(code, run_globals)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/__main__.py", line 40, in <module>
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     loop.run_until_complete(coresys.core.setup())
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "uvloop/loop.pyx", line 1448, in uvloop.loop.Loop.run_until_complete
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/core.py", line 26, in setup
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     await self.sys_supervisor.load()
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/supervisor.py", line 29, in load
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     await self.instance.cleanup()
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/utils/__init__.py", line 25, in wrap_api
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     return await method(api, *args, **kwargs)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     result = self.fn(*self.args, **self.kwargs)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/docker/interface.py", line 283, in _cleanup
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     for image in self.sys_docker.images.list(name=self.image):
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 338, in list
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     return [self.get(r["Id"]) for r in resp]
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 338, in <listcomp>
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     return [self.get(r["Id"]) for r in resp]
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 295, in get
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     return self.prepare_model(self.client.api.inspect_image(name))
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     return f(self, resource_id, *args, **kwargs)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/image.py", line 245, in inspect_image
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     self._get(self._url("/images/{0}/json", image)), True
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 235, in _result
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     self._raise_for_status(response)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 231, in _raise_for_status
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     raise create_api_error_from_http_exception(e)
Sep 10 15:57:26 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
Sep 10 15:57:26 hassio hassos-supervisor[1852]:     raise cls(e, response=response, explanation=explanation)
Sep 10 15:57:26 hassio hassos-supervisor[1852]: docker.errors.APIError: 500 Server Error: Internal Server Error ("readlink /var/lib/docker/overlay2/l: invalid argument")
Sep 10 15:57:26 hassio hassos-supervisor[1852]: 18-09-10 15:57:26 ERROR (MainThread) [asyncio] Unclosed client session
Sep 10 15:57:26 hassio hassos-supervisor[1852]: client_session: <aiohttp.client.ClientSession object at 0x754a25f0>
Sep 10 15:57:26 hassio hassos-supervisor[1852]: 18-09-10 15:57:26 ERROR (MainThread) [asyncio] Unclosed client session
Sep 10 15:57:26 hassio hassos-supervisor[1852]: client_session: <aiohttp.client.ClientSession object at 0x754a2470>
Sep 10 15:57:28 hassio hassos-supervisor[1852]: hassos_supervisor
Sep 10 15:57:37 hassio hassos-supervisor[1852]: 18-09-10 15:57:37 INFO (MainThread) [__main__] Initialize Hassio setup
Sep 10 15:57:37 hassio hassos-supervisor[1852]: 18-09-10 15:57:37 INFO (MainThread) [__main__] Setup HassIO
Sep 10 15:57:37 hassio hassos-supervisor[1852]: 18-09-10 15:57:37 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to supervisor homeassistant/armhf-hassio-supervisor with version 127
Sep 10 15:57:38 hassio hassos-supervisor[1852]: Traceback (most recent call last):
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 229, in _raise_for_status
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     response.raise_for_status()
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 939, in raise_for_status
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     raise HTTPError(http_error_msg, response=self)
Sep 10 15:57:38 hassio hassos-supervisor[1852]: requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.37/images/sha256:18262da2ab37b7d01b37d2c9a180dadbd9ecbbabc08ac567754efb8bb19e04b7/json
Sep 10 15:57:38 hassio hassos-supervisor[1852]: During handling of the above exception, another exception occurred:
Sep 10 15:57:38 hassio hassos-supervisor[1852]: Traceback (most recent call last):
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     "__main__", mod_spec)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     exec(code, run_globals)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/__main__.py", line 40, in <module>
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     loop.run_until_complete(coresys.core.setup())
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "uvloop/loop.pyx", line 1448, in uvloop.loop.Loop.run_until_complete
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/core.py", line 26, in setup
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     await self.sys_supervisor.load()
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/supervisor.py", line 29, in load
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     await self.instance.cleanup()
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/utils/__init__.py", line 25, in wrap_api
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     return await method(api, *args, **kwargs)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     result = self.fn(*self.args, **self.kwargs)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/hassio/docker/interface.py", line 283, in _cleanup
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     for image in self.sys_docker.images.list(name=self.image):
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 338, in list
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     return [self.get(r["Id"]) for r in resp]
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 338, in <listcomp>
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     return [self.get(r["Id"]) for r in resp]
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 295, in get
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     return self.prepare_model(self.client.api.inspect_image(name))
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     return f(self, resource_id, *args, **kwargs)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/image.py", line 245, in inspect_image
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     self._get(self._url("/images/{0}/json", image)), True
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 235, in _result
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     self._raise_for_status(response)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 231, in _raise_for_status
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     raise create_api_error_from_http_exception(e)
Sep 10 15:57:38 hassio hassos-supervisor[1852]:   File "/usr/local/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
Sep 10 15:57:38 hassio hassos-supervisor[1852]:     raise cls(e, response=response, explanation=explanation)
Sep 10 15:57:38 hassio hassos-supervisor[1852]: docker.errors.APIError: 500 Server Error: Internal Server Error ("readlink /var/lib/docker/overlay2/l: invalid argument")
Sep 10 15:57:39 hassio hassos-supervisor[1852]: 18-09-10 15:57:39 ERROR (MainThread) [asyncio] Unclosed client session
Sep 10 15:57:39 hassio hassos-supervisor[1852]: client_session: <aiohttp.client.ClientSession object at 0x753439b0>
Sep 10 15:57:39 hassio hassos-supervisor[1852]: 18-09-10 15:57:39 ERROR (MainThread) [asyncio] Unclosed client session
Sep 10 15:57:39 hassio hassos-supervisor[1852]: client_session: <aiohttp.client.ClientSession object at 0x75343ad0>
Sep 10 15:57:40 hassio systemd[1]: hassos-supervisor.service: Main process exited, code=exited, status=1/FAILURE

Same issue here. No solution yet?

Same issue here, except I'm not seeing the supervisor restarts.

i use an old image - resinos. So my HA works.

So which image is the last known good, team?

I was able to re-flash with a wired network connection using defaults and have not had problems. Think my first go didn't happen right as I thought it stalled and rebooted quite a few times when it was just weak wifi connection.

Once I had a proper installation, I was able to set my wireless connection back up.

Same here, hassOS won't even work in the browser. I just keep getting CONN_REFUSED. Sad.

I am also experiencing this issue. Brand new RPi3B+, newly flashed SD card, wired network connection. Plug in the power, machine boots to a login prompt via tty, every command issued results in "getsockopt: connection refused". For at least one or two attempts the machine was rebooting itself repeatedly as well. Other times it just sits there dumping occasional syslog activity to the console.

In all cases it is entirely unusable.

Any advice or updates on this issue would be greatly appreciated!

@loopforever
Log in as root (#) and type in "date". Do you get todays date?

@Fusseldieb Yes, "date" returns today's date.

@loopforever Hmmm, strange.

Look at running docker container and see what each "status"/log reports.

Some container probably has some error in it and you can see it going through each and look for errors.

Google may help you with the commands to view containers and stuff.

Any help just let me know.

EDIT: Look for the supervisor container first. On mine the error was there (Certificate error downloading stuff due to wrong date - but that's not your case).

@Fusseldieb I have wrong time on freshly flashed hassio , _cca Jan 28 2018 16:00_ and there are errors - due to certificate validity - journalctl -fu hassos-supervisor = ... certificate has expired or is not yet valid ... Fails install landingpage, retry after 60sec ... . Command date -s "2018-11-18 18:38" solved my problem.

Since the last updates this is not an issue any more. Thank you anyway for your support!

Which kind of update? This isssue is connected with the still latest "HassOS Release 1 build 1.12 (Stable)".

I have just updatet to HassOS 1.13 on RPi3 and I am back in January = no NTP sync.
Example log:

18-01-28 15:58:47 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-01-28 15:58:48 ERROR (MainThread) [asyncio] SSL handshake failed on verifying the certificate
protocol: <uvloop.loop.SSLProtocol object at 0x7f7e4d6d30>
transport: <TCPTransport closed=False reading=False 0x55bbbc6e78>
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 609, in uvloop.loop.SSLProtocol._on_handshake_complete
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1045)
18-01-28 15:58:48 ERROR (MainThread) [asyncio] SSL error errno:1 reason: CERTIFICATE_VERIFY_FAILED
protocol: <uvloop.loop.SSLProtocol object at 0x7f7e4d6d30>
transport: <TCPTransport closed=False reading=False 0x55bbbc6e78>
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1045)
18-01-28 15:58:48 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://s3.amazonaws.com/hassio-version/stable.json: Cannot connect to host s3.amazonaws.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1045)')]

after date correctinon I can stil see in log:

Dec 01 13:33:05 hassio systemd-timesyncd[200]: Timed out waiting for reply from 216.239.35.0:123 (time1.google.com).
...
Dec 01 13:33:16 hassio systemd-timesyncd[200]: Timed out waiting for reply from 216.239.35.4:123 (time2.google.com).
Dec 01 13:33:26 hassio systemd-timesyncd[200]: Timed out waiting for reply from 216.239.35.8:123 (time3.google.com).

/usr/sbin # systemctl status hassos-supervisor
● hassos-supervisor.service - HassOS supervisor
Loaded: loaded (/usr/lib/systemd/system/hassos-supervisor.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-01-16 18:15:48 UTC; 28s ago
Process: 23333 ExecStartPre=/usr/bin/docker stop hassos_supervisor (code=exited, status=0/SUCCESS)
Main PID: 23342 (hassos-supervis)
Tasks: 13 (limit: 2201)
CGroup: /system.slice/hassos-supervisor.service
├─23342 /bin/sh /usr/sbin/hassos-supervisor
└─23582 docker run --name hassos_supervisor --security-opt apparmor=hassio-supervisor -v /var/run/docker.sock:/var/run/docker.sock -v /var/run/dbus:/var/run/dbus -v /etc/machine-id:/etc/machine-id:ro -v /mnt/data/supervisor:/data -e SUPERVISOR_SHARE=/mnt/data/supervisor -e SUPERVISOR_NAME=hassos_supervisor -e HOMEASSISTANT_REPOSITORY=homeassistant/raspberrypi3-homeassistant homeassistant/armhf-hassio-supervisor

Jan 16 18:16:14 hassio hassos-supervisor[23342]: addon_config = read_json_file(addon)
Jan 16 18:16:14 hassio hassos-supervisor[23342]: File "/usr/local/lib/python3.7/site-packages/hassio/utils/json.py", line 21, in read_json_file
Jan 16 18:16:14 hassio hassos-supervisor[23342]: return json.loads(cfile.read())
Jan 16 18:16:14 hassio hassos-supervisor[23342]: File "/usr/local/lib/python3.7/codecs.py", line 322, in decode
Jan 16 18:16:14 hassio hassos-supervisor[23342]: (result, consumed) = self._buffer_decode(data, self.errors, final)
Jan 16 18:16:14 hassio hassos-supervisor[23342]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Jan 16 18:16:14 hassio hassos-supervisor[23342]: 19-01-16 18:16:14 ERROR (MainThread) [asyncio] Unclosed client session
Jan 16 18:16:14 hassio hassos-supervisor[23342]: client_session:
Jan 16 18:16:14 hassio hassos-supervisor[23342]: 19-01-16 18:16:14 ERROR (MainThread) [asyncio] Unclosed client session
Jan 16 18:16:14 hassio hassos-supervisor[23342]: client_session:

I seem to have the same issues, but I don't know. I've been using putty to access my hassio installation on my RPi3, but now I get connection refused even on putty. I took out the SD card from my RPi and stuck it in my computer. I can find the backup files, so question is if I should do a fresh install, copy over my backup, and then run the backup on the fresh install... Or is there any other - simpler way?

The problem is, that the file is UTF-16 and not UTF-8. But that is fixed with Hass.io 143

reading @snelweg latest post, I see some similarities with what I remeber from my log before doing a reboot: "Unclosed client session" I thought a reboot would take care of everything, but now I simply get ERR_CONNECTION_REFUSED on port 8123 as well as 3218. Being a newbie, I see there are answers here above - but I don't understand them... So - what do I do to even get in touch with my Hassio. I can ping and get answers from my RPI3

reading @snelweg latest post, I see some similarities with what I remeber from my log before doing a reboot: "Unclosed client session"

I never got an answer that made sense. I was fed up with hass and switched over to OpenHAB. Has been running for weeks without any problems now. The people at OpenHAB are nice, they do not treat newbies as if they have mental isues, Very disapointed in Hass. Things get fixed (they say) with new releases. I learned that that means hat Hass is not ready and the users are being used as beta testers (even for the proper releases).

Maybe I will try a new version, hopefully it works this time,

I've been pretty satisfied with the ways things been working out so far. But not being a linux guy - or a programmer at all in fact, makes it a little difficult when you run into difficulties like this. I honestly don't even know where to start. But if someone could point me in the right direction - that would be a blast! I am sure there is "an SD card issue", but where to look and what to do is beyond me.

Can't get back in over: SSH, Network hassio or frontend after a power outage.
Really disappointing when half your house is running Home assistant.
HELP!

Can't get back in over: SSH, Network hassio or frontend after a power outage.
Really disappointing when half your house is running Home assistant.
HELP!

I've identified myself here. Also using Hassio on the entire home and bad things would happen if it stops out of a sudden (Water tanks would not fill anymore, switches would not synchronize anymore, etc). Since I have no problem right now, I'll try to help you.

So, to your problem... Try to hook a HDMI monitor to your Raspberry Pi and then restart it (In this order!). You should see linux starting up. If you don't, your SD card is probably corrupted or fried - always make backups via the Web Interface or manually! If you didn't make a backup, try hooking the card up to a linux computer (or starting a Linux Live USB stick). If it still doesn't recognize it there, you're probably out of luck and you'll need to begin from scratch! Always backup! Two SD cards of mine failed, and once I lost _everything_! It lasted 6 months. Don't be the next to suffer. If it still works somehow, immediately save your configs, as it could be the first signs of corruption (if you did nothing wrong with your configs)! With Win32DiskImager you can do a exact backup of your card - byte per byte.

If it boots up, hook up a USB keyboard and then in the console check for every log you can. There should be an error somewhere. Try hassio ha logs, hassio su logs, etc.

Once you've found the error, you can try to edit files and things directly from your RPi with the "vi" editor (Look on Google on how to use it, it's quite unique to use). Change folders with cd - Basic Linux commands. Or you can edit them on your computer. You should use linux for this. If you use windows, try booting a live linux from a USB stick, for that download something like Ubuntu and put it on a USB drive. Google for tutorials. Don't want to Google? Sigh Okay, here!

Quick crash course on how to use "vi":

  • Type "vi [filename]" to start it and open the document
  • Press i on your keyboard to enter the Edit/Insert mode
  • Navigate with your keyboards arrows
  • Exit edit mode pressing ESC
  • Once pressed ESC, you basically switched to command mode, where you can type in :wq which means write and quit. The command inserted should appear on the bottom left of the screen.
  • :q means only quit. If you have unsaved changes, you must do :q!. The exclamation is to force something.

Note: Sometimes while editing with "vi" directly on the RPi and having your Ethernet cable plugged in, Hassio will spit out logs in the console which overwrites the vi window and your text becomes quite messy. Don't panic - it won't mess up your document, just continue writing as if nothing happened and ignore the mess, or :wq (write & quit) and enter vi again,

Note: Some televisors turn the screen off when the screen is mostly black (which vi is) - cough LG cough . If this happens, open your TV's menu and let it sit there and it won't turn off.

All these notes were once sleepless nights. Sharing my experience and tips here...

Sorry for my bad english and I hope I helped something.

Can't get back in over: SSH, Network hassio or frontend after a power outage.
Really disappointing when half your house is running Home assistant.
HELP!

I've identified myself here. Also using Hassio on the entire home and bad things would happen if it stops out of a sudden (Water tanks would not fill anymore, switches would not synchronize anymore, etc). Since I have no problem right now, I'll try to help you.

So, to your problem... Try to hook a HDMI monitor to your Raspberry Pi and then restart it (In this order!). You should see linux starting up. If you don't, your SD card is probably corrupted or fried - always make backups via the Web Interface or manually! If you didn't make a backup, try hooking the card up to a linux computer (or starting a Linux Live USB stick). If it still doesn't recognize it there, you're probably out of luck and you'll need to begin from scratch! Always backup!

If it boots up, hook up a USB keyboard and then in the console check for every log you can. There should be an error somewhere. Try hassio ha logs, hassio su logs, etc.

Once you've found the error, you can try to edit files and things directly from your RPi with the "vi" editor (Look on Google on how to use it, it's quite unique to use). Change folders with cd - Basic Linux commands. Or you can edit them on your computer. You should use linux for this. If you use windows, try booting a live linux from a USB stick, for that download something like Ubuntu and put it on a USB drive. Google for tutorials. Don't want to Google? _Sigh_ Okay, here!

Quick crash course on how to use "vi":

  • Type "vi [filename]" to start it and open the document
  • Press "i" on your keyboard to enter the Edit/Insert mode
  • Navigate with your keyboards arrows
  • Exit edit mode pressing "ESC"
  • Once pressed "ESC", you basically switched to command mode, where you can type in :wq which means write and quit. The command inserted should appear on the bottom left of the screen.
  • :q means only quit. If you have unsaved changes, you must do :q!. The exclamation is to force something.

Note: Sometimes while editing with "vi" directly on the RPi and having your Ethernet cable plugged in, Hassio will spit out logs in the console which overwrites the vi window and your text becomes quite messy. Don't panic - it won't mess up your document, just continue writing as if nothing happened and ignore the mess, or :wq (write & quit) and enter vi again,

Note: Some televisors turn the screen off when the screen is mostly black (which vi is) - _cough_ LG _cough_ . If this happens, open your TV's menu and let it sit there and it won't turn off.

All these notes were once sleepless nights. Sharing my experience and tips here...

Sorry for my bad english and I hope I helped something.

Hey,
Thanks for the quick reply.
I found a log when i connected a monitor just as you suggested.
There is a fault in my config.yaml file but in hassio-cli i cant use VI or Nano i guess?

There is a fault in my config.yaml file but in hassio-cli i cant use VI or Nano i guess?

In the cli it should work.

If it doesn't, try to log into the host system using the command login and then when it prompts you username and password, type in root and root. It should then log you in.

When you're logged in, (I think) because you're in the host system (and not in the frontend container where your config folders are), you won't be able to see your files in /config/, but in any other folder. Each container has it's own folder structure, independent from the others. Try searching for it. I'm not sure if you can search in this minimal linux disto, but try typing find * | grep configuration.yaml in the main folder (/).

Basically in this way (pseudolog, I'm not in front of a RPi nor Linux right now):

hassio-cli> login
username: root
password: root (while typing it won't appear, that's by design, just type it in and press Enter)

#
# cd /
# find * | grep configuration.yaml

/some/folder/configuration.yaml

#
# cd /some/folder/
# vi configuration.yaml

< vi will open >

Hey,

I stuck the sd card in my windows system and whent trough the files and found my samba login and logs. So booted back up and after 10+ reboots i came in with Samba.
Fixed my config.yaml and now kicking!
Just configured my second Floor with floorplan.
Thanks for your help, you are one of the people communities like this need.

Same Problem with 0.88.1
docker.errors.APIError: 500 Server Error: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")

19-05-13 22:04:49 INFO (MainThread) [__main__] Initialize Hass.io setup
19-05-13 22:04:49 INFO (MainThread) [__main__] Setup HassIO
19-05-13 22:04:49 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to Supervisor homeassistant/armhf-hassio-supervisor with version 155
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 261, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.39/images/sha256:79ca1e9052ff88c77aed2945128f620e5b436211108cc635b5119b9baf5eb6db/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/site-packages/hassio/__main__.py", line 45, in <module>
    loop.run_until_complete(coresys.core.setup())
  File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.7/site-packages/hassio/core.py", line 30, in setup
    await self.sys_supervisor.load()
  File "/usr/local/lib/python3.7/site-packages/hassio/supervisor.py", line 42, in load
    await self.instance.cleanup()
  File "/usr/local/lib/python3.7/site-packages/hassio/utils/__init__.py", line 27, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/hassio/docker/interface.py", line 315, in _cleanup
    for image in self.sys_docker.images.list(name=self.image):
  File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 359, in list
    return [self.get(r["Id"]) for r in resp]
  File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 359, in <listcomp>
    return [self.get(r["Id"]) for r in resp]
  File "/usr/local/lib/python3.7/site-packages/docker/models/images.py", line 316, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/usr/local/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/docker/api/image.py", line 245, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 267, in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.7/site-packages/docker/api/client.py", line 263, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")
19-05-13 22:04:50 ERROR (MainThread) [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x752e0df0>
19-05-13 22:04:50 ERROR (MainThread) [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x752e0fd0>

I'm encountering this same issue. I'm unable to ssh into my Raspberry Pi at all, I had to plug it into a monitor and keyboard and access the console directly. Which reminds me, for anyone else that comes along, and is frustrated by the console spam do the following:

  1. Enter root as the login
  2. Press enter a second time to skip the empty password.
  3. login to get access to a shell prompt.
  4. dmesg -n 1 will stop the spam.
  5. exit will put you back into the hassio login.

When I do journalctl -fu hassos-supervisor I get output very similar to @Megachip, but the version is 165 and not 155. That is, hassos-supervisor.service is constantly existing with status=1/FAILURE and restarting.

My /mnt/data/hassos.json is identical to the one posted by @dzerovibe.

All the hassos/hassio commands in the console (like supervisor logs fail with Get http://hassio/supervisor/logs: dial tcp 192.168.1.34:80: connect: connection refused.

date returns the correct date and time.

I'm able to ping IP addresses and domain names, so I've got DNS and wireless connectivity.

At this point I have no idea what else to do other than pop in a new microSD card and start over. Open to suggestions!

Forgot to say I've been running fine for months and it just stopped working for no discernible reason.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bump. (It's fixed?)

I can fix the startup, so that you can run the new repair command

Just following up on my earlier comments... I think I _may_ have figured out the issue? The key thing I see repeated in a lot of these other comments as well as all of my own problems, come down to the log lines with readlink /mnt/data/docker/overlay2/l: invalid argument, which seems to indicate a corruption in the Docker overlay filesystem. After my Hass installation died on me a second time, I was unable to start over as I would get stuck on setup over and over, with that message always in the logs. Sometimes in the supervisor container, sometimes in the Home Assistant container. Either way, I couldn't even get past the "Processing Hass.io" screen.

I was just about to give up and go back to Hassbian when I decided to swap USB chargers to a 2.4A fast charger. Although I'd tried multiple chargers including what I knew to be a good charger (I'd successfully ran Hass.io for months off of it), after switching to the fast charger I was able to complete my installation and now I'm back up and running.

I hadn't considered power to be an issue as Linux was running just fine and stable on my Pi, but perhaps Docker is much more sensitive to power delivery issues? Maybe just a fluke, but if anyone else is having similar issues it's something to check/try in your own troubleshooting.

I had the same issue and the reason was that the secrets.py has had a problem with the secrets.yaml after finding and opening it correctly.
Since the secrets.yaml hasn't been used for a longer time I just moved it away and it solved the problem...

@Fusseldieb I have wrong time on freshly flashed hassio , _cca Jan 28 2018 16:00_ and there are errors - due to certificate validity - journalctl -fu hassos-supervisor = ... certificate has expired or is not yet valid ... Fails install landingpage, retry after 60sec ... . Command date -s "2018-11-18 18:38" solved my problem.

THANK YOU!!! exactly that happened. after setting right time it starts ))))

My time is right :( These Hass.io seems very unstable. Now had this issue with another installation too :(

I'm vey disapointed with HA. the Hassbian image worked for me during the last 3 years and moving to hassio is giving me hard times on troubleshooting ..
I'm also having this docker issue .. and even repair BETA dont help
http://hassio/supervisor/repair: dial tcp 172.30.32.2:80: i/o timeout

:( i'm not considering move to OpenHAB but ...

:( i'm not considering move to OpenHAB but ...

You'll probably have _other_ problems with it, I guess. No project is perfect.

I think we should fix this together and stay strong :)

Yeah, if you block ntp and the instance can refresh the time, it will not work. I can only move the startup of API before that, so you can use the cli for get logs. The time is important to work with all the SSL sites.

@Fusseldieb I have wrong time on freshly flashed hassio , _cca Jan 28 2018 16:00_ and there are errors - due to certificate validity - journalctl -fu hassos-supervisor = ... certificate has expired or is not yet valid ... Fails install landingpage, retry after 60sec ... . Command date -s "2018-11-18 18:38" solved my problem.

I tried several ways... and suddenly works. Maybe this take effect.
My steps: (use hdmi and usb keyboard)

  1. login as root (none password)
  2. type ' login' ,enter host
  3. type date command to set date
  4. reboot and wait

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Not resolved at all. :( Fresh install on RPi 2 has same result. This is at 104. First time ive ever had to reset my Pi and Im totally gutted that Im in this situation.

I have the exact same issue. Date / time is correct.

Please open a new issue if you are still experiencing this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olskar picture olskar  ·  9Comments

yozik04 picture yozik04  ·  8Comments

riksmithuk picture riksmithuk  ·  5Comments

Blizzke picture Blizzke  ·  5Comments

greencharlie100 picture greencharlie100  ·  4Comments