home-assistant / supervisor

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

Post http://supervisor/host/reboot: dial tcp 172.30.32.2:80: connect: connection refused #1675

Closed sblantipodi closed 4 years ago

sblantipodi commented 4 years ago

Home Assistant release with the issue: 0.108.8 Operating environment (HassOS/Generic): hassio

Supervisor logs:

Error doing job: Task exception was never retrieved
12:16:00 – helpers/template.py (ERROR) - il messaggio si è verificato per la prima volta alle 22 aprile 2020, 21:18:00 e compare 6293 volte
Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
12:15:58 – Hass.io (ERROR) - il messaggio si è verificato per la prima volta alle 12:02:10 e compare 6 volte
Client error on /homeassistant/info request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
12:05:55 – Hass.io (ERROR) - il messaggio si è verificato per la prima volta alle 6:27:18 e compare 9 volte
Can't read last version:
11:57:24 – Hass.io (WARNING) - il messaggio si è verificato per la prima volta alle 6:27:18 e compare 7 volte
Error writing config for core.config_entries: Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data found at $.data.entries[7].data.scan_interval
11:23:02 – helpers/storage.py (ERROR) - il messaggio si è verificato per la prima volta alle 22 aprile 2020, 21:17:21 e compare 15 volte

Description of problem:

I can't reboot hassio from SSH anymore.

~ $ ha host reboot
Post http://supervisor/host/reboot: dial tcp 172.30.32.2:80: connect: connection refused

If I click on the supervisor menu in the GUI I get this alert error:

Unable to load the panel source: /api/hassio/app/entrypoint.js.

What's happening?

sblantipodi commented 4 years ago

don't know if it's connected to this: https://github.com/home-assistant/supervisor/issues/1576

sblantipodi commented 4 years ago

and probably connected even to this: https://github.com/home-assistant/supervisor/issues/1621

saisani commented 4 years ago

have you tried this solution with setting the time on system? https://community.home-assistant.io/t/connection-refused-frontend-doesnt-load-fresh-install/72675/13

saisani commented 4 years ago

Having the same issue and someone said that setting the time might fix this:

20200426_231947

But it looks like the system time and supervisor time are not matching up??? Apr 26 and 18-04-26

dcoliv commented 4 years ago

Hi! I appear to have the same problem, and I would say it started 3 days ago… It started by getting some error like “Unable to load the panel source: /api/hassio/app/entrypoint.js” when I tried to access supervisor tab in HomeAssistant. Then, after a reboot, I can no longer access the HomeAssistant UI at all.

Could this be related to any Hassio/Supervisor automatic update?

I can access through SSH but when I run “ha check” (or any other "ha" command) it says: Post http://supervisor/core/check: dial tcp 172.30.32.2:80: connect: no route to host

In my home-assitant.log file I have this:

2020-05-01 01:05:32 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-05-01 01:05:44 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-05-01 01:05:44 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-05-01 01:05:50 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.swap_free is taking over 10 seconds
2020-05-01 01:06:16 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.memory_use_percent is taking over 10 seconds
2020-05-01 19:23:54 ERROR (MainThread) [metno] https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/1.9/ returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:None [Try again]
2020-05-01 19:23:57 ERROR (MainThread) [homeassistant.components.met.weather] Retrying in 17 minutes
2020-05-01 22:41:18 ERROR (MainThread) [metno] https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/1.9/ returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:None [Try again]
2020-05-01 22:41:24 ERROR (MainThread) [homeassistant.components.met.weather] Retrying in 18 minutes
2020-05-01 23:28:31 ERROR (MainThread) [homeassistant.components.hassio.http] Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-01 23:28:59 ERROR (MainThread) [homeassistant.components.hassio.http] Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-01 23:29:36 ERROR (MainThread) [homeassistant.components.hassio.http] Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-01 23:29:46 ERROR (MainThread) [homeassistant.components.hassio.http] Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-01 23:34:29 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/restart request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-01 23:35:37 ERROR (MainThread) [homeassistant.components.hassio.http] Client error on api app/entrypoint.js request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-02 00:12:53 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/info request Cannot connect to host 172.30.32.2:80 ssl:None [Connect call failed ('172.30.32.2', 80)]
2020-05-02 00:12:53 WARNING (MainThread) [homeassistant.components.hassio] Can't read last version:

When running “journalctl -fu hassos-supervisor” it says:

May 04 08:16:49 homeassistant systemd[1]: Started HassOS supervisor.
May 04 08:16:51 homeassistant hassos-supervisor[667]: Error: No such object: homeassistant/aarch64-hassio-supervisor
May 04 08:16:51 homeassistant systemd[1]: hassos-supervisor.service: Main process exited, code=exited, status=1/FAILURE
May 04 08:16:51 homeassistant systemd[1]: hassos-supervisor.service: Failed with result 'exit-code'.
May 04 08:16:56 homeassistant systemd[1]: hassos-supervisor.service: Service RestartSec=5s expired, scheduling restart.
May 04 08:16:56 homeassistant systemd[1]: hassos-supervisor.service: Scheduled restart job, restart counter is at 4.
May 04 08:16:56 homeassistant systemd[1]: Stopped HassOS supervisor.
May 04 08:16:56 homeassistant systemd[1]: Starting HassOS supervisor...
May 04 08:16:56 homeassistant docker[687]: hassos_supervisor
May 04 08:16:56 homeassistant systemd[1]: Started HassOS supervisor.
May 04 08:16:57 homeassistant hassos-supervisor[696]: Error: No such object: homeassistant/aarch64-hassio-supervisor
May 04 08:16:57 homeassistant systemd[1]: hassos-supervisor.service: Main process exited, code=exited, status=1/FAILURE
May 04 08:16:57 homeassistant systemd[1]: hassos-supervisor.service: Failed with result 'exit-code'.
May 04 08:17:02 homeassistant systemd[1]: hassos-supervisor.service: Service RestartSec=5s expired, scheduling restart.
May 04 08:17:02 homeassistant systemd[1]: hassos-supervisor.service: Scheduled restart job, restart counter is at 5.
May 04 08:17:02 homeassistant systemd[1]: Stopped HassOS supervisor.
May 04 08:17:02 homeassistant systemd[1]: hassos-supervisor.service: Start request repeated too quickly.
May 04 08:17:02 homeassistant systemd[1]: hassos-supervisor.service: Failed with result 'exit-code'.
May 04 08:17:02 homeassistant systemd[1]: Failed to start HassOS supervisor.

And when running "docker logs hassos_supervisor" it says:

20-05-04 10:55:27 INFO (MainThread) [supervisor.bootstrap] Use the old homeassistant repository for machine extraction
20-05-04 10:55:27 INFO (MainThread) [__main__] Initialize Supervisor setup
20-05-04 10:55:27 INFO (MainThread) [supervisor.bootstrap] Setup coresys for machine: raspberrypi3-64
20-05-04 10:55:27 INFO (SyncWorker_0) [supervisor.docker.supervisor] Attach to Supervisor homeassistant/aarch64-hassio-supervisor with version 219
20-05-04 10:55:27 INFO (SyncWorker_1) [supervisor.docker.interface] Cleanup images: ['homeassistant/aarch64-hassio-supervisor:220']
20-05-04 10:55:33 INFO (MainThread) [__main__] Setup Supervisor
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: de.pengutronix.rauc - /
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.NetworkManager - /org/freedesktop/NetworkManager/DnsManager
20-05-04 10:55:33 INFO (MainThread) [supervisor.host.info] Update local host information
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-05-04 10:55:33 INFO (MainThread) [supervisor.host.services] Update service information
20-05-04 10:55:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-05-04 10:55:34 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-05-04 10:55:34 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-05-04 10:55:34 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-05-04 10:55:34 INFO (MainThread) [supervisor.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
20-05-04 10:55:34 INFO (MainThread) [supervisor.host.services] Reload local service hassos-apparmor.service
20-05-04 10:55:34 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
20-05-04 10:55:34 INFO (SyncWorker_4) [supervisor.docker.interface] Attach to homeassistant/aarch64-hassio-dns with version 9
20-05-04 10:55:34 INFO (SyncWorker_6) [supervisor.docker.interface] Attach to homeassistant/aarch64-hassio-cli with version 25
20-05-04 10:55:34 INFO (SyncWorker_3) [supervisor.docker.interface] Attach to homeassistant/aarch64-hassio-audio with version 14
20-05-04 10:55:34 INFO (SyncWorker_2) [supervisor.docker.interface] Attach to homeassistant/aarch64-hassio-multicast with version 2
20-05-04 10:55:34 INFO (MainThread) [supervisor.plugins.dns] Start CoreDNS plugin
20-05-04 10:55:34 INFO (MainThread) [supervisor.misc.forwarder] Start DNS port forwarding to 172.30.32.3
20-05-04 10:55:34 INFO (SyncWorker_5) [supervisor.docker.interface] Clean hassio_dns application
20-05-04 10:55:34 INFO (MainThread) [supervisor.plugins.cli] Start cli plugin
20-05-04 10:55:34 INFO (MainThread) [supervisor.plugins.audio] Start Audio plugin
20-05-04 10:55:34 INFO (MainThread) [supervisor.plugins.multicast] Start Multicast plugin
20-05-04 10:55:34 INFO (SyncWorker_13) [supervisor.docker.interface] Clean hassio_audio application
20-05-04 10:55:34 INFO (SyncWorker_14) [supervisor.docker.interface] Clean hassio_multicast application
20-05-04 10:55:34 INFO (SyncWorker_0) [supervisor.docker.interface] Clean hassio_cli application
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Running HassIO on a Rpi3. Any help would be much appreciated. Thanks!

Gooman-rus commented 4 years ago

I have this issue too and superviser is not working at all. Only physical reboot of the raspberrypi solves the problem.

gtrancillo commented 4 years ago

After restarting my raspberrypi 3 it did not start the WebUI. The only way to start was by adding a keyboard and a monitor. That way it started without problems. Is this the same case or should I open another issue?

aweibell commented 4 years ago

I see a similar issue, seeing these connect: no route to host message.

Not able to start hassos-supervisor service, but also not able to ssh in to the hassio host. Tried a couple reboots, and now the pi won't start at all. Perhaps a broken Micro-SD card? Should maybe just try a reinstall.

stale[bot] commented 4 years ago

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.

ThijmenDam commented 4 years ago

Has anyone ever found a fix that does not entail a hard reboot?

ludeeus commented 4 years ago

connection refused means that the supervisor is not running properly. Since this issue was opened multiple fixes have been added to mitigate the issues. There is not a single thing causing connection refused it can be anything blocking the supervisor from starting. If you see that you can get the logs for the supervisor from the observer running on http://homeassistant.local:4357

Closing this issue since it has become a "catch-all" issue, which is impossible to track, and will end up with wrong information. If you have the same symptom, open a new issue, describe the problem in full, describe what you did leading up to it, attach the logs from the observer, and the details requested in the issue template :+1: