home-assistant / supervisor

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

ecowitt2mqtt addon cannot connect to supervisor #4396

Closed EinSchwerd closed 1 year ago

EinSchwerd commented 1 year ago

Describe the issue you are experiencing

I've recently updated the host to Debian 12. Ever since the update the ecowitt2mqtt addon stopped working with the following error:

curl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldn't connect to server [11:40:10] ERROR: Something went wrong contacting the API

I reported a bug for that addon, however I was directed to the supervisor as the error above is not generated by the addon.

What type of installation are you running?

Home Assistant Supervised

Which operating system are you running on?

Debian

Steps to reproduce the issue

1. 2. 3. ...

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

23-06-20 12:57:30 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
23-06-20 12:58:50 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

23-06-20 13:04:31 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
23-06-20 13:05:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_IPV6_ERROR/ContextType.DNS_SERVER
23-06-20 13:05:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.NO_CURRENT_BACKUP/ContextType.SYSTEM
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_FAILED/ContextType.DNS_SERVER
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.IPV4_CONNECTION_PROBLEM/ContextType.SYSTEM
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DOCKER_CONFIG/ContextType.SYSTEM
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.MULTIPLE_DATA_DISKS/ContextType.SYSTEM
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.check] System checks complete
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
23-06-20 13:06:51 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-06-20 13:06:51 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy - privileged

23-06-20 13:10:51 INFO (MainThread) [supervisor.host.info] Updating local host information
23-06-20 13:10:51 INFO (MainThread) [supervisor.host.services] Updating service information
23-06-20 13:10:51 INFO (MainThread) [supervisor.host.network] Updating local network information
23-06-20 13:10:51 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
23-06-20 13:10:51 INFO (MainThread) [supervisor.host.manager] Host information reload completed

23-06-20 13:29:00 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

System Health information

System Information

version core-2023.6.2
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.0-9-amd64
arch x86_64
timezone Australia/Sydney
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1276 Downloaded Repositories | 34
AccuWeather can_reach_server | ok -- | -- remaining_requests | 37
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Debian GNU/Linux 12 (bookworm) -- | -- update_channel | stable supervisor_version | supervisor-2023.06.2 agent_version | 1.5.1 docker_version | 24.0.2 disk_total | 226.7 GB disk_used | 18.3 GB healthy | failed to load: Unhealthy supported | failed to load: Unsupported supervisor_api | ok version_api | ok installed_addons | File editor (5.6.0), Mosquitto broker (6.2.1), Terminal & SSH (9.7.1), TasmoAdmin (0.24.4), Samba share (10.0.2), Zigbee2MQTT (1.31.2-1), ESPHome (2023.5.5), Samba Backup (5.2.0), Studio Code Server (5.6.2), AdGuard Home (4.8.10), InfluxDB (4.7.0), ecowitt2mqtt (2023.06.1)
Dashboards dashboards | 1 -- | -- resources | 21 views | 11 mode | storage
Recorder oldest_recorder_run | 13 June 2023 at 04:43 -- | -- current_recorder_run | 20 June 2023 at 08:57 estimated_db_size | 500.67 MiB database_engine | sqlite database_version | 3.41.2

Supervisor diagnostics

No response

Additional information

No response

habuild commented 1 year ago

Edit: SOLVED with the addition of network to capabilities in apparmor.txt of the addon.

I am having a similar issue with my addon.

https://github.com/habuild/hassio-addons/tree/main/haos-sbfspot

The following error is occurring on startup

curl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldn't connect to server
[00:28:25] ERROR: Something went wrong contacting the API

Supervisor remains uncontactable even if I log into the container after it starts with docker exec -it addon_a51a23d8_haos-sbfspot /bin/bash

Oddly enough it has only occurred since updating to debian 12. So possibly related to systemd-resvolved?

This version fails

System Information

version core-2023.7.2
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.0-10-arm64
arch aarch64
timezone Australia/Sydney
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4990 Installed Version | 1.32.1 Stage | running Available Repositories | 1344 Downloaded Repositories | 22 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Debian GNU/Linux 12 (bookworm) -- | -- update_channel | stable supervisor_version | supervisor-2023.07.1 agent_version | 1.5.1 docker_version | 24.0.4 disk_total | 219.8 GB disk_used | 24.7 GB healthy | true supported | true supervisor_api | ok version_api | ok installed_addons | Example add-on (1.2.0), File editor (5.6.0), Glances (0.19.2), Grafana (9.0.2), HassOS SSH port 22222 Configurator (0.9.1a), Home Assistant Google Drive Backup (0.111.1), InfluxDB (4.7.0), MariaDB (2.6.1), Mosquitto broker (6.2.1), Nginx Proxy Manager (0.12.3), Node-RED (14.3.0), Portainer (2.18.4), Advanced SSH & Web Terminal (15.0.4), Studio Code Server (5.8.1), Terminal & SSH (9.7.1), Zigbee2mqtt Edge (edge), phpMyAdmin (0.8.7), MQTT Explorer (browser-1.0.1), Qbittorrent (4.5.4), Ubooquity (2.1.2-12), HAOS-SBFspot-test (2023.7.3test), HAOS-SBFspot (2023.6.1)
Dashboards dashboards | 2 -- | -- resources | 15 views | 13 mode | storage
Recorder oldest_recorder_run | 11 July 2023 at 14:25 -- | -- current_recorder_run | 19 July 2023 at 14:33 estimated_db_size | 767.52 MiB database_engine | sqlite database_version | 3.41.2
Solcast PV Forecast can_reach_server | ok -- | -- remaining_requests | 13 rooftop_site_count | 1 polling_hours | 6 -> 18 and once at midnight

While these Both Debian 11 supervised and HAOS work.

System Information

version core-2023.7.2
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 5.10.0-23-amd64
arch x86_64
timezone Australia/Sydney
config_dir /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Debian GNU/Linux 11 (bullseye) -- | -- update_channel | stable supervisor_version | supervisor-2023.07.1 agent_version | 1.5.1 docker_version | 24.0.4 disk_total | 18.1 GB disk_used | 5.2 GB healthy | true supported | true supervisor_api | ok version_api | ok installed_addons | File editor (5.6.0), HAOS-SBFspot (2023.6.1)
Dashboards dashboards | 1 -- | -- resources | 0 mode | auto-gen
Recorder oldest_recorder_run | July 19, 2023 at 2:07 PM -- | -- current_recorder_run | July 20, 2023 at 1:14 AM estimated_db_size | 0.32 MiB database_engine | sqlite database_version | 3.41.2

System Information

version core-2023.7.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.34
arch x86_64
timezone Australia/Sydney
config_dir /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 10.3 -- | -- update_channel | stable supervisor_version | supervisor-2023.07.1 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 30.8 GB disk_used | 14.7 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.7.1), Advanced SSH & Web Terminal (15.0.4), Glances (0.19.2), VLC (0.2.0), File editor (5.6.0), Studio Code Server (5.8.1), Mosquitto broker (6.2.1), ESPHome (2023.7.0), MultiINV-SBFspot (2022.11.1), ETHER-SBFspot (dev-161), ESPHome (dev) (dev), HAOS-SBFspot (2023.6.1), HAOS-SBFspot (2023.6.1), HAOS-SBFspot-test (2023.7.3test)
Dashboards dashboards | 3 -- | -- resources | 0 views | 6 mode | storage
Recorder oldest_recorder_run | May 5, 2023 at 4:54 AM -- | -- current_recorder_run | July 20, 2023 at 12:59 AM estimated_db_size | 5.88 MiB database_engine | sqlite database_version | 3.41.2

Related addon Error log

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
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun sbfspot (no readiness notification)
s6-rc: info: service legacy-services successfully started
[00:37:22] INFO: 
[00:37:22] INFO:  Linux 6.1.0-10-arm64 #1 SMP Debian 6.1.37-1 (2023-07-03) aarch64
[00:37:22] INFO: 
|   SKIPPING MQTT SENSOR CREATION   |
curl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldn't connect to server
[00:37:22] ERROR: Something went wrong contacting the API
[00:37:22] INFO:  ================================
[00:37:22] INFO:  Setup failed to create Configs
[00:37:22] INFO:  ================================
[00:37:22] INFO:  [Starting SBFspotUpload]
[00:37:22] INFO: [Starting cron in foreground]
SBFspot V3.9.7
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (https://github.com/SBFspot/SBFspot)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Error! Could not open file /usr/bin/sbfspot/SBFspot.cfg
Configuration Error: Could not open file /usr/bin/sbfspot/SBFspotUpload.cfg

Expected Normal log output

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
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun sbfspot (no readiness notification)
[01:18:38] INFO: 
[01:18:38] INFO:  Linux 5.10.0-23-amd64 #1 SMP Debian 5.10.179-2 (2023-07-14) x86_64
[01:18:38] INFO: 
s6-rc: info: service legacy-services successfully started
|   SKIPPING MQTT SENSOR CREATION   |
[01:18:41] INFO: 
[01:18:41] INFO: 
[01:18:41] INFO:  [Host Bluetooth MAC Address] Controller 00:1A:7D:DA:71:13 deb11ha [default]
[01:18:41] INFO: 
[01:18:41] INFO: 
[01:18:41] INFO:  ||    Generating Bluetooth Configs    ||
[01:18:41] INFO:  ||    /usr/bin/sbfspot/SBFspot.cfg    ||
[01:18:41] INFO:  || /usr/bin/sbfspot/SBFspotUpload.cfg ||
[01:18:41] INFO: 
[01:18:41] INFO:  [Starting SBFspotUpload]
[01:18:41] INFO: [Starting cron in foreground]
SBFspot V3.9.7
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (https://github.com/SBFspot/SBFspot)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Reading config '/usr/bin/sbfspot/SBFspot.cfg'
Thu Jul 20 01:19:11 2023: INFO: Starting...
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.