jehy / hass-addons

This is a repository for my own home assistant addons
MIT License
20 stars 0 forks source link

exec format error #5

Closed keenanjmoore closed 6 months ago

keenanjmoore commented 8 months ago

getting the below error when starting the addon. Should i be using some special connectionstring for my case?

exec /init: exec format error

I do not have anything set in the configuration tab. Below are the relevant portions of my yaml

  #MariaDB Database Sensor

recorder: purge_keep_days: 3650 commit_interval: 0 db_url: mysql://homeassistant:homeassistant@core-mariadb/homeassistant?charset=utf8mb4

influxdb:
host: a0d7b954-influxdb port: 8086 database: homeassistant username: XX password: XX max_retries: 3 default_measurement: state

bedar89 commented 6 months ago

I'm having the same issue. Unsure how to solve this. Is there any progress on this?

nepozs commented 6 months ago

The same error exec /init: exec format error but only standard sqlite3 recorder database and after fresh addon install

Supervisor logs

2024-04-18 15:16:45.732 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-04-18 15:33:30.524 INFO (MainThread) [supervisor.host.info] Updating local host information
2024-04-18 15:33:32.079 INFO (MainThread) [supervisor.host.services] Updating service information
2024-04-18 15:33:32.098 INFO (MainThread) [supervisor.host.network] Updating local network information
2024-04-18 15:33:32.422 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
2024-04-18 15:33:32.438 INFO (MainThread) [supervisor.host.manager] Host information reload completed
2024-04-18 15:44:39.480 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-04-18 15:44:39.481 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-04-18 15:44:39.499 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-04-18 15:44:39.693 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-04-18 15:44:39.694 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-04-18 15:44:39.695 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-04-18 15:44:39.697 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-04-18 15:44:39.698 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-04-18 15:44:39.699 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-04-18 15:44:39.700 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-04-18 15:44:39.701 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-04-18 15:44:39.701 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-04-18 15:44:39.702 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-04-18 15:44:40.067 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-04-18 15:44:40.068 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-04-18 15:44:40.068 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-04-18 15:46:47.026 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-04-18 15:46:58.886 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/helto4real/hassio-add-ons repository
2024-04-18 15:46:58.893 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sviete/ais-ha-addons repository
2024-04-18 15:46:58.906 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
2024-04-18 15:46:58.917 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/music-assistant/home-assistant-addon repository
2024-04-18 15:46:58.930 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/thomasmauerer/hassio-addons repository
2024-04-18 15:46:58.943 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/adamoutler/mqtt-explorer repository
2024-04-18 15:46:58.951 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/pbkhrv/rtl_433-hass-addons repository
2024-04-18 15:46:58.963 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
2024-04-18 15:46:58.979 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/AlexxIT/hassio-addons repository
2024-04-18 15:46:58.985 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
2024-04-18 15:46:59.001 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
2024-04-18 15:46:59.007 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
2024-04-18 15:46:59.016 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository-edge repository
2024-04-18 15:46:59.023 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
2024-04-18 15:46:59.030 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/jehy/hass-addons repository
2024-04-18 15:47:04.901 INFO (MainThread) [supervisor.store] Loading add-ons from store: 231 all - 0 new - 0 remove
2024-04-18 15:47:04.902 INFO (MainThread) [supervisor.store] Loading add-ons from store: 231 all - 0 new - 0 remove
2024-04-18 16:16:48.901 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-04-18 16:26:00.773 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-04-18 16:26:00.782 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-04-18 16:44:40.070 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-04-18 16:44:40.071 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-04-18 16:44:40.093 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-04-18 16:44:40.321 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-04-18 16:44:40.322 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-04-18 16:44:40.323 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-04-18 16:44:40.324 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-04-18 16:44:40.326 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-04-18 16:44:40.327 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-04-18 16:44:40.328 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-04-18 16:44:40.329 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-04-18 16:44:40.330 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-04-18 16:44:40.330 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-04-18 16:44:40.723 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-04-18 16:44:40.725 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-04-18 16:44:40.726 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-04-18 16:46:38.352 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-04-18 16:46:49.195 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-04-18 17:15:15.783 INFO (MainThread) [supervisor.addons.addon] Creating Home Assistant add-on data folder /data/addons/data/8bce8ef4_dbstats
2024-04-18 17:15:15.786 INFO (MainThread) [supervisor.docker.interface] Downloading docker image ghcr.io/jehy/hass-dbstats-addon with tag 0.4.6.
2024-04-18 17:16:49.513 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-04-18 17:19:01.120 INFO (MainThread) [supervisor.addons.manager] Add-on '8bce8ef4_dbstats' successfully installed
2024-04-18 17:22:37.489 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/helto4real/hassio-add-ons repository
2024-04-18 17:22:37.499 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sviete/ais-ha-addons repository
2024-04-18 17:22:37.519 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
2024-04-18 17:22:37.537 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/music-assistant/home-assistant-addon repository
2024-04-18 17:22:37.549 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/thomasmauerer/hassio-addons repository
2024-04-18 17:22:37.569 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/adamoutler/mqtt-explorer repository
2024-04-18 17:22:37.583 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/pbkhrv/rtl_433-hass-addons repository
2024-04-18 17:22:37.626 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
2024-04-18 17:22:37.642 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/AlexxIT/hassio-addons repository
2024-04-18 17:22:37.646 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
2024-04-18 17:22:37.661 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
2024-04-18 17:22:37.711 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
2024-04-18 17:22:37.738 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository-edge repository
2024-04-18 17:22:37.764 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
2024-04-18 17:22:37.774 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/jehy/hass-addons repository
2024-04-18 17:22:38.133 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-04-18 17:22:44.052 INFO (MainThread) [supervisor.store] Loading add-ons from store: 231 all - 0 new - 0 remove
2024-04-18 17:22:44.053 INFO (MainThread) [supervisor.store] Loading add-ons from store: 231 all - 0 new - 0 remove
2024-04-18 17:30:36.506 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on ghcr.io/jehy/hass-dbstats-addon with version 0.4.6

hardware platform aarch64 RPi4B (2GB RAM)

System Information

version core-2024.4.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.73-haos-raspi
arch aarch64
timezone Europe/Warsaw
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1402 Downloaded Repositories | 23
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 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.04.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 57.8 GB disk_used | 16.7 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Samba share (12.3.1), Advanced SSH & Web Terminal (17.2.0), AirCast (4.2.1), Glances (0.21.1), FTP (5.0.2), Spotify Connect (0.13.0), Tailscale (0.17.0), ZeroTier One (0.18.0), AIS Cloudflared (0.1.13), go2rtc (1.8.5), Home Assistant Google Drive Backup (0.112.1), A better presence (1.2.0), Mosquitto broker (6.4.0), chrony (3.0.1), rtl_433 (0.5.1), rtl_433 MQTT Auto Discovery (0.8.1), MQTT Explorer (browser-1.0.1), Samba NAS (12.2.0-nas1), Music Assistant BETA (2.0.0b137), ESPHome (2024.4.0), Scrutiny (Full Access) (v0.8.1-2), Filebrowser (2.23.0_13), DbStats (0.4.6)
Dashboards dashboards | 4 -- | -- resources | 9 views | 14 mode | storage
Recorder oldest_recorder_run | 8 kwietnia 2024 20:09 -- | -- current_recorder_run | 18 kwietnia 2024 00:45 estimated_db_size | 595.59 MiB database_engine | sqlite database_version | 3.44.2
jehy commented 6 months ago

Hi, guys! Thanks to @nepozs for a detailed report! I suppose the matter is in aarch64 architecture. I was a bit lazy and I thought that doubtfully anyone with not x86-64 architecture will use this addon :)

I'm gonna research, how to support it, that should not be too complex.

jehy commented 6 months ago

Looks like I managed to make it multiplatform. Please try updating to version 0.5.

keenanjmoore commented 6 months ago

After upgrading to 5.0

cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification) services-up: info: copying legacy longrun nodejs (no readiness notification) [16:47:10] INFO: Starting dbstats... ./run: line 7: exec: nodejs: not found s6-rc: info: service legacy-services successfully started [16:47:10] INFO: Starting NGinx... nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62 2024/04/21 16:47:10 [notice] 176#176: using the "epoll" event method 2024/04/21 16:47:10 [notice] 176#176: nginx/1.24.0 2024/04/21 16:47:10 [notice] 176#176: OS: Linux 6.1.73-haos-raspi 2024/04/21 16:47:10 [notice] 176#176: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816 2024/04/21 16:47:10 [notice] 176#176: start worker processes 2024/04/21 16:47:10 [notice] 176#176: start worker process 204 [16:47:10] WARNING: dbstats crashed, halting add-on s6-rc: info: service legacy-services: stopping [16:47:10] INFO: dbstats stopped, restarting... 2024/04/21 16:47:10 [notice] 176#176: signal 15 (SIGTERM) received from 174, exiting 2024/04/21 16:47:10 [notice] 204#204: exiting 2024/04/21 16:47:10 [notice] 204#204: exit 2024/04/21 16:47:10 [notice] 176#176: signal 14 (SIGALRM) received 2024/04/21 16:47:10 [notice] 176#176: signal 17 (SIGCHLD) received from 204 2024/04/21 16:47:10 [notice] 176#176: worker process 204 exited with code 0 2024/04/21 16:47:10 [notice] 176#176: exit if: fatal: unable to spawn s6-test: No such file or directory 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 base-addon-log-level: stopping s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting


Add-on: DbStats Database stats for Home Assistant

Add-on version: 0.5.0 You are running the latest version of this add-on. System: Home Assistant OS 12.2 (aarch64 / yellow) Home Assistant Core: 2024.4.3 Home Assistant Supervisor: 2024.04.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/nginx.sh ingress_entry api/hassio_ingress/6fgyXdqm8ArywrjhXZad9TMdHxM5nI1kNYw8qbe9kiE cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification) services-up: info: copying legacy longrun nodejs (no readiness notification) [16:47:16] INFO: Starting dbstats... ./run: line 7: exec: nodejs: not found s6-rc: info: service legacy-services successfully started [16:47:16] INFO: Starting NGinx... nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62 2024/04/21 16:47:16 [notice] 176#176: using the "epoll" event method 2024/04/21 16:47:16 [notice] 176#176: nginx/1.24.0 2024/04/21 16:47:16 [notice] 176#176: OS: Linux 6.1.73-haos-raspi 2024/04/21 16:47:16 [notice] 176#176: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816 2024/04/21 16:47:16 [notice] 176#176: start worker processes 2024/04/21 16:47:16 [notice] 176#176: start worker process 204 [16:47:16] WARNING: dbstats crashed, halting add-on [16:47:16] INFO: dbstats stopped, restarting... s6-rc: info: service legacy-services: stopping 2024/04/21 16:47:16 [notice] 176#176: signal 15 (SIGTERM) received from 173, exiting 2024/04/21 16:47:16 [notice] 204#204: exiting 2024/04/21 16:47:16 [notice] 204#204: exit 2024/04/21 16:47:16 [notice] 176#176: signal 14 (SIGALRM) received 2024/04/21 16:47:16 [notice] 176#176: signal 17 (SIGCHLD) received from 204 2024/04/21 16:47:16 [notice] 176#176: worker process 204 exited with code 0 2024/04/21 16:47:16 [notice] 176#176: exit if: fatal: unable to spawn s6-test: No such file or directory 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 base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

jehy commented 6 months ago

Wow, that's interesting. Looks like nodejs base docker images for HA are broken and don't contain nodejs.

I'll check it. Thanks for testing, unfortunately it's difficult for me to do myself since I don't have those CPUs at hand.

keenanjmoore commented 6 months ago

Let me know if there is anything I can do to help

nepozs commented 6 months ago

There is progress but it still doesn't work.

v. 0.5.0 addon log

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: DbStats
 Database stats for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.5.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nginx.sh
ingress_entry api/hassio_ingress/JNOxOfwxHXEQT3K3GVicxtoyRsE9OE5j5kO19ko9Mj8
cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification)
services-up: info: copying legacy longrun nodejs (no readiness notification)
s6-rc: info: service legacy-services successfully started
[02:45:21] INFO: Starting NGinx...
[02:45:21] INFO: Starting dbstats...
./run: line 7: exec: nodejs: not found
nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62
2024/04/22 02:45:21 [notice] 176#176: using the "epoll" event method
2024/04/22 02:45:21 [notice] 176#176: nginx/1.24.0
2024/04/22 02:45:21 [notice] 176#176: OS: Linux 6.1.73-haos-raspi
2024/04/22 02:45:21 [notice] 176#176: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/04/22 02:45:21 [notice] 176#176: start worker processes
2024/04/22 02:45:21 [notice] 176#176: start worker process 204
[02:45:21] WARNING: dbstats crashed, halting add-on
[02:45:22] INFO: dbstats stopped, restarting...
s6-rc: info: service legacy-services: stopping
2024/04/22 02:45:22 [notice] 176#176: signal 15 (SIGTERM) received from 172, exiting
2024/04/22 02:45:22 [notice] 204#204: exiting
2024/04/22 02:45:22 [notice] 204#204: exit
2024/04/22 02:45:22 [notice] 176#176: signal 17 (SIGCHLD) received from 204
2024/04/22 02:45:22 [notice] 176#176: worker process 204 exited with code 0
2024/04/22 02:45:22 [notice] 176#176: exit
if: fatal: unable to spawn s6-test: No such file or directory
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 base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

BTW HA installations on x86-64 platforms are still less than 50% overall count (to be exact today x86 = 47.21% installations with enabled analytics, armhf is probably under 2% (I'm not sure about the design of many SBC platforms so I've counted only 32bit RPi installations, but I think that all pretty old SBCs are really exotics) and ALL the rest is aarch64. https://analytics.home-assistant.io/

jehy commented 6 months ago

Thanks! Yeah, same picture as with @keenanjmoore , I am gonna fix it :)

jehy commented 6 months ago

Hi, guys! Please check 0.5.1 version - I updated base nodejs addon version, it should help.

keenanjmoore commented 6 months ago

See log below, still got that error

cont-init: info: running /etc/cont-init.d/nginx.sh ingress_entry api/hassio_ingress/6fgyXdqm8ArywrjhXZad9TMdHxM5nI1kNYw8qbe9kiE cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification) services-up: info: copying legacy longrun nodejs (no readiness notification) [06:56:39] INFO: Starting NGinx... s6-rc: info: service legacy-services successfully started nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62 [06:56:39] INFO: Starting dbstats... ./run: line 7: exec: nodejs: not found 2024/04/22 06:56:39 [notice] 176#176: using the "epoll" event method 2024/04/22 06:56:39 [notice] 176#176: nginx/1.24.0 2024/04/22 06:56:39 [notice] 176#176: OS: Linux 6.1.73-haos-raspi 2024/04/22 06:56:39 [notice] 176#176: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816 2024/04/22 06:56:39 [notice] 176#176: start worker processes 2024/04/22 06:56:39 [notice] 176#176: start worker process 199 [06:56:39] WARNING: dbstats crashed, halting add-on [06:56:39] INFO: dbstats stopped, restarting... s6-rc: info: service legacy-services: stopping 2024/04/22 06:56:39 [notice] 176#176: signal 15 (SIGTERM) received from 174, exiting 2024/04/22 06:56:39 [notice] 199#199: exiting 2024/04/22 06:56:39 [notice] 199#199: exit 2024/04/22 06:56:39 [notice] 176#176: signal 17 (SIGCHLD) received from 199 2024/04/22 06:56:39 [notice] 176#176: worker process 199 exited with code 0 2024/04/22 06:56:39 [notice] 176#176: exit if: fatal: unable to spawn s6-test: No such file or directory 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 base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting


Add-on: DbStats Database stats for Home Assistant

Add-on version: 0.5.1 You are running the latest version of this add-on. System: Home Assistant OS 12.2 (aarch64 / yellow) Home Assistant Core: 2024.4.3 Home Assistant Supervisor: 2024.04.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/nginx.sh ingress_entry api/hassio_ingress/6fgyXdqm8ArywrjhXZad9TMdHxM5nI1kNYw8qbe9kiE cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification) services-up: info: copying legacy longrun nodejs (no readiness notification) s6-rc: info: service legacy-services successfully started [07:18:11] INFO: Starting NGinx... [07:18:11] INFO: Starting dbstats... ./run: line 7: exec: nodejs: not found nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62 2024/04/22 07:18:11 [notice] 177#177: using the "epoll" event method 2024/04/22 07:18:11 [notice] 177#177: nginx/1.24.0 2024/04/22 07:18:11 [notice] 177#177: OS: Linux 6.1.73-haos-raspi 2024/04/22 07:18:11 [notice] 177#177: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816 2024/04/22 07:18:11 [notice] 177#177: start worker processes 2024/04/22 07:18:11 [notice] 177#177: start worker process 203 [07:18:11] WARNING: dbstats crashed, halting add-on s6-rc: info: service legacy-services: stopping [07:18:11] INFO: dbstats stopped, restarting... 2024/04/22 07:18:11 [notice] 177#177: signal 15 (SIGTERM) received from 174, exiting 2024/04/22 07:18:11 [notice] 203#203: exiting 2024/04/22 07:18:11 [notice] 203#203: exit 2024/04/22 07:18:11 [notice] 177#177: signal 17 (SIGCHLD) received from 203 2024/04/22 07:18:11 [notice] 177#177: worker process 203 exited with code 0 2024/04/22 07:18:11 [notice] 177#177: exit if: fatal: unable to spawn s6-test: No such file or directory 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 base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

jehy commented 6 months ago

Thanks, @keenanjmoore ! I am almost out of ideas, but please try 0.5.2. It's possible that there is difference in binary namings for different platforms...

nepozs commented 6 months ago

v 0.5.1 after fresh install (just to be sure)

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: DbStats
 Database stats for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.5.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nginx.sh
ingress_entry api/hassio_ingress/fvKZAAlMOIDibRUhchlANCdgVlXIjbMlJHqjEl39FBM
cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification)
services-up: info: copying legacy longrun nodejs (no readiness notification)
[00:05:19] INFO: Starting dbstats...
s6-rc: info: service legacy-services successfully started
[00:05:19] INFO: Starting NGinx...
./run: line 7: exec: nodejs: not found
nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62
2024/04/23 00:05:19 [notice] 177#177: using the "epoll" event method
2024/04/23 00:05:19 [notice] 177#177: nginx/1.24.0
2024/04/23 00:05:19 [notice] 177#177: OS: Linux 6.1.73-haos-raspi
2024/04/23 00:05:19 [notice] 177#177: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/04/23 00:05:19 [notice] 177#177: start worker processes
2024/04/23 00:05:19 [notice] 177#177: start worker process 204
[00:05:19] WARNING: dbstats crashed, halting add-on
s6-rc: info: service legacy-services: stopping
[00:05:19] INFO: dbstats stopped, restarting...
2024/04/23 00:05:19 [notice] 177#177: signal 15 (SIGTERM) received from 172, exiting
2024/04/23 00:05:19 [notice] 204#204: exiting
2024/04/23 00:05:19 [notice] 204#204: exit
2024/04/23 00:05:19 [notice] 177#177: signal 14 (SIGALRM) received
2024/04/23 00:05:19 [notice] 177#177: signal 17 (SIGCHLD) received from 204
2024/04/23 00:05:19 [notice] 177#177: worker process 204 exited with code 0
2024/04/23 00:05:19 [notice] 177#177: exit
if: fatal: unable to spawn s6-test: No such file or directory
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 base-addon-log-level: stopping
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

v 0.5.2

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: DbStats
 Database stats for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.5.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nginx.sh
ingress_entry api/hassio_ingress/fvKZAAlMOIDibRUhchlANCdgVlXIjbMlJHqjEl39FBM
cont-init: info: /etc/cont-init.d/nginx.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 nginx (no readiness notification)
services-up: info: copying legacy longrun nodejs (no readiness notification)
[00:18:25] INFO: Starting NGinx...
[00:18:25] INFO: Starting dbstats...
s6-rc: info: service legacy-services successfully started
nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:62
2024/04/23 00:18:25 [notice] 175#175: using the "epoll" event method
2024/04/23 00:18:25 [notice] 175#175: nginx/1.24.0
2024/04/23 00:18:25 [notice] 175#175: OS: Linux 6.1.73-haos-raspi
2024/04/23 00:18:25 [notice] 175#175: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2024/04/23 00:18:25 [notice] 175#175: start worker processes
2024/04/23 00:18:25 [notice] 175#175: start worker process 199
[Nest] 176  - 04/23/2024, 12:18:28 AM     LOG [ConfigService] database options from env not found, checking config
[Nest] 176  - 04/23/2024, 12:18:28 AM     LOG [ConfigService] config file found, parsing
[Nest] 176  - 04/23/2024, 12:18:28 AM     LOG [ConfigService] Input: abspath /homeassistant/configuration.yaml homeDir /homeassistant
[Nest] 176  - 04/23/2024, 12:18:28 AM     LOG [ConfigService] found and parsed secrets file
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] 1 secrets found for file /homeassistant/configuration.yaml
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] Input: abspath /homeassistant/themes homeDir /homeassistant
[Nest] 176  - 04/23/2024, 12:18:29 AM    WARN [ConfigService] Warn: path /homeassistant/themes found in config but it does not exist!
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] Input: abspath /homeassistant/automations.yaml homeDir /homeassistant
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] found and parsed secrets file
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] 1 secrets found for file /homeassistant/automations.yaml
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] Input: abspath /homeassistant/scripts.yaml homeDir /homeassistant
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] found and parsed secrets file
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] 1 secrets found for file /homeassistant/scripts.yaml
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] Input: abspath /homeassistant/scenes.yaml homeDir /homeassistant
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] found and parsed secrets file
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] 1 secrets found for file /homeassistant/scenes.yaml
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] parsed config file
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] recorder options not found, gonna try standard database path
[Nest] 176  - 04/23/2024, 12:18:29 AM     LOG [ConfigService] Found standard sqlite file, gonna use it: /homeassistant/home-assistant_v2.db
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [NestFactory] Starting Nest application... +3272ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] DatabaseModule dependencies initialized +240ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +4ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] ServeStaticModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +205ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] EventModule dependencies initialized +3ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] StateModule dependencies initialized +0ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] SystemModule dependencies initialized +0ms
[Nest] 176  - 04/23/2024, 12:18:32 AM     LOG [InstanceLoader] StatisticModule dependencies initialized +1ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RoutesResolver] AppController {/addon-api}: +1100ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RoutesResolver] EventController {/addon-api/event}: +2ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/event/countEventTypes, GET} route +9ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/event/countEventsByDomain, GET} route +2ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RoutesResolver] StateController {/addon-api/state}: +0ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/state/countStates, GET} route +3ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/state/countAttributesSize, GET} route +1ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RoutesResolver] StatisticController {/addon-api/statistic}: +1ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/statistic/short/count, GET} route +3ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/statistic/long/count, GET} route +1ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RoutesResolver] SystemController {/addon-api/system}: +0ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/system/getTableRows, GET} route +2ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/system/getTableSize, GET} route +2ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [RouterExplorer] Mapped {/addon-api/system/getDbAlerts, GET} route +3ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [NestApplication] Nest application successfully started +16ms
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [bootstrap] DBStats version 0.3.8 started on port 3000
[Nest] 176  - 04/23/2024, 12:18:33 AM     LOG [bootstrap] Wow, we're running on supervisor!

LGTM, thank you very much.

keenanjmoore commented 6 months ago

Oh shit it's working

keenanjmoore commented 6 months ago

2024/04/22 19:03:03 [info] 204#204: 30 client 172.30.32.2 closed keepalive connection [Nest] 175 - 04/22/2024, 7:03:40 PM LOG [TypeORM[homeass]] query is slow: SELECT states_meta.entity_id type, count() cnt FROM states states INNER JOIN states_meta states_meta ON states.metadata_id=states_meta.metadata_id GROUP BY states_meta.entity_id ORDER BY cnt DESC LIMIT 20 [Nest] 175 - 04/22/2024, 7:03:40 PM LOG [TypeORM[homeass]] execution time: 969135 172.30.32.2 - - [22/Apr/2024:19:03:40 -0500] "GET /addon-api/state/countStates HTTP/1.1" 200 1057 "https://1ti84otgi2xq0gtt68txmq8smjkp4byd.ui.nabu.casa/api/hassio_ingress/6fgyXdqm8ArywrjhXZad9TMdHxM5nI1kNYw8qbe9kiE/" "Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 Home Assistant/2024.4.3-12648 (Android 14; Pixel 6)" [Nest] 175 - 04/22/2024, 7:03:40 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 1057 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 Home Assistant/2024.4.3-12648 (Android 14; Pixel 6) ::ffff:127.0.0.1 s6-rc: info: service legacy-services: stopping 2024/04/22 19:03:48 [notice] 177#177: signal 15 (SIGTERM) received from 174, exiting 2024/04/22 19:03:48 [notice] 204#204: exiting 2024/04/22 19:03:48 [notice] 204#204: exit [Nest] 175 - 04/22/2024, 7:03:48 PM LOG [AppService] Caught signal SIGTERM, shutting down 2024/04/22 19:03:48 [notice] 177#177: signal 14 (SIGALRM) received 2024/04/22 19:03:49 [notice] 177#177: signal 17 (SIGCHLD) received from 204 2024/04/22 19:03:49 [notice] 177#177: worker process 204 exited with code 0 2024/04/22 19:03:49 [notice] 177#177: exit if: fatal: unable to spawn s6-test: No such file or directory [Nest] 175 - 04/22/2024, 7:03:49 PM ERROR [ExceptionsHandler] Pool is closed. Error: Pool is closed. at /usr/src/app/node_modules/mysql/lib/Pool.js:149:17 at Array.forEach () at Pool.releaseConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:148:37) at Pool._removeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:277:8) at Pool._purgeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:258:8) at Pool.end (/usr/src/app/node_modules/mysql/lib/Pool.js:182:10) at /usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:357:27 at new Promise () at MysqlDriver.disconnect (/usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:356:20) at DataSource.destroy (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:184:27) [Nest] 175 - 04/22/2024, 7:03:49 PM ERROR [ExceptionsHandler] Pool is closed. Error: Pool is closed. at /usr/src/app/node_modules/mysql/lib/Pool.js:149:17 at Array.forEach () at Pool.releaseConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:148:37) at Pool._removeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:277:8) at Pool._purgeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:258:8) at Pool.end (/usr/src/app/node_modules/mysql/lib/Pool.js:182:10) at /usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:357:27 at new Promise () at MysqlDriver.disconnect (/usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:356:20) at DataSource.destroy (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:184:27) [Nest] 175 - 04/22/2024, 7:03:49 PM ERROR [ExceptionsHandler] Pool is closed. Error: Pool is closed. at /usr/src/app/node_modules/mysql/lib/Pool.js:149:17 at Array.forEach () at Pool.releaseConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:148:37) at Pool._removeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:277:8) at Pool._purgeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:258:8) at Pool.end (/usr/src/app/node_modules/mysql/lib/Pool.js:182:10) at /usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:357:27 at new Promise () at MysqlDriver.disconnect (/usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:356:20) at DataSource.destroy (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:184:27) [Nest] 175 - 04/22/2024, 7:03:49 PM ERROR [ExceptionsHandler] Pool is closed. Error: Pool is closed. at /usr/src/app/node_modules/mysql/lib/Pool.js:149:17 at Array.forEach () at Pool.releaseConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:148:37) at Pool._removeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:277:8) at Pool._purgeConnection (/usr/src/app/node_modules/mysql/lib/Pool.js:258:8) at Pool.end (/usr/src/app/node_modules/mysql/lib/Pool.js:182:10) at /usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:357:27 at new Promise () at MysqlDriver.disconnect (/usr/src/app/node_modules/typeorm/driver/mysql/MysqlDriver.js:356:20) at DataSource.destroy (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:184:27) [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/statistic/long/count 500 52 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/statistic/short/count 500 52 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countAttributesSize 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countAttributesSize 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countAttributesSize 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 Home Assistant/2024.4.3-12648 (Android 14; Pixel 6) ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 Home Assistant/2024.4.3-12648 (Android 14; Pixel 6) ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 Home Assistant/2024.4.3-12648 (Android 14; Pixel 6) ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countStates 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countAttributesSize 200 0 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/state/countAttributesSize 500 52 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 [Nest] 175 - 04/22/2024, 7:03:49 PM LOG [LogRequestsMiddleware] Anonymous GET /addon-api/statistic/long/count 500 52 - Mozilla/5.0 (Linux; Android 14; Build/AP31.240322.023; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 ::ffff:127.0.0.1 s6-svwait: fatal: timed out 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 base-addon-log-level: stopping s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting


Add-on: DbStats Database stats for Home Assistant

Add-on version: 0.5.2 You are running the latest version of this add-on. System: Home Assistant OS 12.2 (aarch64 / yellow) Home Assistant Core: 2024.4.3 Home Assistant Supervisor: 2024.04.2

jehy commented 6 months ago

Wow, that was really unexpected. Cool that we were able to solve this :)

jehy commented 6 months ago

Oh. @keenanjmoore , you're still having issues, yeah? Did you reload the page while it as still loading? If so, it's possible that addon was out of memory. Please try restarting addon, opening the page and waiting for charts to show.

I also updated addon to 0.5.3 to make less concurrent requests to database, it may help if the trouble is in RAM overload.

keenanjmoore commented 6 months ago

Jehy,

RAM does not seem to be a problem but my MariaDB CPU jumps and stays super high until its restarted and DBstats is not running. What code can i paste to help ya out? The dips in the below image is when i turned off DBstats and restarted MariaDB. and would give it another try.

Capture

jehy commented 6 months ago

@keenanjmoore that's really strange since addon does not run any queries in background.

Did you manage to successfully open addon page and view charts? Did all charts open?

May be there's some chart that makes query which takes forever to execute...

keenanjmoore commented 6 months ago

Jehy,

Yes the addon page opened but only the number of rows, table size in Generic stats, count event types and count events by domain in Events, States and Attributes, Failed to fetch, Long term stats loaded after about 3min and short term stats failed to load.

image image image image

keenanjmoore commented 6 months ago

Btw, 970 EVO SSD 500GB on a ha yellow 8gb, maybe to much to parse, I have it to purge after 365

jehy commented 6 months ago

@keenanjmoore Let's continue in https://github.com/jehy/hass-addons/issues/6 since that's a new issue.