hassio-addons / addon-glances

Glances - Home Assistant Community Add-ons
https://addons.community
MIT License
157 stars 22 forks source link

Some libraries are missing, the add-on doesn't work. #495

Closed Krzysztonek closed 2 months ago

Krzysztonek commented 3 months ago

From some days I've faced the below issue:

-----------------------------------------------------------
 Add-on version: 0.21.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.4  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.7.3
 Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
2024-07-25 00:01:21,490 -- INFO -- Start Glances 3.4.0.5
2024-07-25 00:01:21,490 -- INFO -- CPython 3.11.8 (/usr/bin/python3) and psutil 5.9.8 detected
2024-07-25 00:01:21,495 -- INFO -- Read configuration file '/etc/glances.conf'
2024-07-25 00:01:21,506 -- INFO -- Start GlancesWebServer mode
2024-07-25 00:01:21,524 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2024-07-25 00:01:21,585 -- WARNING -- Missing Python Lib (No module named 'wifi'), Wifi plugin is disabled
2024-07-25 00:01:21,586 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2024-07-25 00:01:21,620 -- WARNING -- Error loading Podman deps Lib. Podman feature in the Containers plugin is disabled (No module named 'podman')
2024-07-25 00:01:21,630 -- WARNING -- Sparklines module not found (No module named 'sparklines')
2024-07-25 00:01:21,632 -- WARNING -- Missing Python Lib (No module named 'py3nvml'), Nvidia GPU plugin is disabled
2024-07-25 00:01:21,639 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
Terminated
INFO: Starting NGinx...
2024/07/25 00:07:28 [error] 581360#581360: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-glances, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:61209/", host: "home-assistant:8123", referrer: "http://home-assistant:8123/hassio"
2024/07/25 00:09:51 [error] 581360#581360: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: a0d7b954-glances, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:61209/", host: "home-assistant:8123", referrer: "http://home-assistant:8123/hassio"

And here is my config:

log_level: info
process_info: false
refresh_time: 10
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
influxdb:
  enabled: false
  host: a0d7b954-influxdb
  port: 8086
  interval: 60
  ssl: false
  version: 1
  username: glances
  password: ""
  database: glances
  prefix: localhost

Looks, some Py libs might be missed. It results in getting the following screen: obraz

I also reinstalled whole add-on, but it still doesn't work as it did in the past.

sinclairpaul commented 3 months ago

The missing libraries aren't likely to be the issue, please try a full system restart.

Krzysztonek commented 3 months ago

I already tried to do a full HA restart several times. Each attempt ends with the same 502 Bad Gateway issue. Looks this is likely a connectivity issue caused by either lack of something or misconfiguration unknown to me.

I see the Starting Glances... is being Terminated at the end right before Starting NGinx.... Isn't it a root cause?

tjorim commented 3 months ago

Paul did not mean a HA restart, but a full host reboot.

michaelbffm commented 3 months ago

Same here: HA runs in Virtual Machine and reboot of VM did not help. Glances Addon and Glances integration worked before.

Krzysztonek commented 3 months ago

Unfortunately, rebooting the host doesn't help, still the same errors appear in the logs.

sinclairpaul commented 3 months ago

The issue is that the Glances service is failing to start, the warnings are expected as what you should see is:

INFO: Starting Glances...
2024-07-25 10:33:03,302 -- INFO -- Start Glances 3.4.0.5
2024-07-25 10:33:03,303 -- INFO -- CPython 3.11.8 (/usr/bin/python3) and psutil 5.9.8 detected
2024-07-25 10:33:03,306 -- INFO -- Read configuration file '/etc/glances.conf'
2024-07-25 10:33:03,315 -- INFO -- Start GlancesWebServer mode
2024-07-25 10:33:03,319 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
2024-07-25 10:33:03,321 -- WARNING -- Missing Python Lib (No module named 'wifi'), Wifi plugin is disabled
2024-07-25 10:33:03,321 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2024-07-25 10:33:03,379 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2024-07-25 10:33:03,381 -- WARNING -- Sparklines module not found (No module named 'sparklines')
2024-07-25 10:33:03,391 -- WARNING -- Missing Python Lib (No module named 'py3nvml'), Nvidia GPU plugin is disabled
2024-07-25 10:33:03,423 -- WARNING -- Error loading Podman deps Lib. Podman feature in the Containers plugin is disabled (No module named 'podman')
2024-07-25 10:33:03,993 -- INFO -- Glances RESTful API Server started on http://127.0.0.1:61209/api/3/
2024-07-25 10:33:03,996 -- INFO -- Glances Web User Interface started on http://127.0.0.1:61209/
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...

The reason I suggested a full restart is that sometime it appears that the ports in use can get "locked", the addon runs on the host network so this may cause an issue.

There have been over 15,000 pulls of the container image, so it would appear to be something unique to your setup. I cannot duplicate it, I would suggest also looking at the Supervisor logs to see if anything else is logged there.

kiwinh0 commented 3 months ago

+1, error on HAOS

2024-08-09 07:04:58.535 INFO (SyncWorker_2) [supervisor.docker.manager] Cleaning addon_a0d7b954_glances application
2024-08-09 07:04:58.788 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/glances/amd64 with version 0.21.1
2024-08-09 07:04:59.045 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-2194' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:1429> exception=AddonsJobError('Rate limit exceeded, more than 10 calls in 0:30:00')>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/addon.py", line 1443, in watchdog_container
    await self._restart_after_problem(event.state)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 290, in wrapper
    raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more than 10 calls in 0:30:00
github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. 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 leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!