Glances Terminated (Wont Start)
BigWebstas opened this issue · 20 comments
Problem/Motivation
Glances... Terminated
Expected behavior
Glances... Running
Actual behavior
-----------------------------------------------------------
Add-on: Glances
A cross-platform system monitoring tool
-----------------------------------------------------------
Add-on version: 0.19.3
You are running the latest version of this add-on.
System: Home Assistant OS 10.5 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.9.3
Home Assistant Supervisor: 2023.09.2
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
Terminated
INFO: Starting NGinx...
Glances Web User Interface started on http://127.0.0.1:61209/
Steps to reproduce
Default settings and Start
I have tried removing the Addon and running a Supervisor Repair to no avail, nothing shows up in the HA logs and when i set it to trace the above is all it posts in the log section of the Addon
Proposed changes
None
The Sidebar link just shows a black screen
log_level: trace 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
Did you disable protection mode as per the documentation?
When I stop the container I get this traceback in the logs but it doesn't appear to be helpful
-----------------------------------------------------------
Add-on: Glances
A cross-platform system monitoring tool
-----------------------------------------------------------
Add-on version: 0.19.3
You are running the latest version of this add-on.
System: Home Assistant OS 10.5 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.9.3
Home Assistant Supervisor: 2023.09.2
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
Terminated
INFO: Starting NGinx...
Glances Web User Interface started on http://127.0.0.1:61209/
Traceback (most recent call last):
File "/usr/lib/python3.11/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/bottle.py", line 993, in __call__
return self.wsgi(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/bottle.py", line 968, in wsgi
out = self._cast(self._handle(environ))
^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/bottle.py", line 876, in _handle
return route.call(**args)
^^^^^^^^^^^^^^^^^^
File "/usr/bin/bottle.py", line 1759, in wrapper
rv = callback(*a, **ka)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/outputs/glances_bottle.py", line 619, in _enable_cors
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/outputs/glances_bottle.py", line 37, in wrapper
ret = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/outputs/glances_bottle.py", line 309, in _api_all
self.__update__()
File "/usr/lib/python3.11/site-packages/glances/outputs/glances_bottle.py", line 119, in __update__
self.stats.update()
File "/usr/lib/python3.11/site-packages/glances/stats.py", line 216, in update
self._plugins[p].update()
File "/usr/lib/python3.11/site-packages/glances/plugins/glances_plugin.py", line 1114, in wrapper
ret = fct(self, *args, **kw)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/plugins/glances_plugin.py", line 1131, in wrapper
ret = fct(*args, **kw)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/plugins/glances_folders.py", line 53, in update
self.glances_folders.update(key=self.get_key())
File "/usr/lib/python3.11/site-packages/glances/folder_list.py", line 167, in update
self.__folder_list[i]['size'] = self.__folder_size(self.path(i))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/folder_list.py", line 143, in __folder_size
ret += self.__folder_size(os.path.join(path, f.name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/folder_list.py", line 143, in __folder_size
ret += self.__folder_size(os.path.join(path, f.name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/folder_list.py", line 143, in __folder_size
ret += self.__folder_size(os.path.join(path, f.name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 1 more time]
File "/usr/lib/python3.11/site-packages/glances/folder_list.py", line 142, in __folder_size
if f.is_dir() and (f.name != '.' or f.name != '..'):
^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/glances/__init__.py", line 65, in __signal_handler
end()
File "/usr/lib/python3.11/site-packages/glances/__init__.py", line 80, in end
sys.exit(0)
SystemExit: 0
I'm having the exact same issue, tried with the latest version without success. HA supervised running on ESXi server VM.
Add-on: Glances
A cross-platform system monitoring tool
Add-on version: 0.19.4
You are running the latest version of this add-on.
System: Home Assistant OS 11.0 (amd64 / qemux86-64)
Home Assistant Core: 2023.10.3
Home Assistant Supervisor: 2023.10.0
INFO: Starting Glances...
Terminated
INFO: Starting NGinx...
I dont feel alone YAY :)
This can happen after upgrade. Clear your browser's cache (or when in doubt, try visiting the page in incognito mode).
I'm sorry Frenk, but I fail to see how an addon not starting could be related to the browser's cache. Anyway, you're the expert, I tried starting it in incognito mode without any success. I went ahead and uninstalled the addon and installed it again in incognito mode, but it still fails to start in the same way. The logs never show anything useful even in trace level...
By the way, this addon has been failing for me since the first time I tried installing the addon, two or three ha core releases ago...
he logs never show anything useful even in trace level...
The log shows it started just fine 🤷
New insights
-----------------------------------------------------------
Add-on: Glances
A cross-platform system monitoring tool
-----------------------------------------------------------
Add-on version: 0.19.4
You are running the latest version of this add-on.
System: Home Assistant OS 11.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.11.0
Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
Terminated
INFO: Starting NGinx...
2023/11/01 12:36:01 [error] 783175#783175: *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: "192.168.1.59:8123", referrer: "http://192.168.1.59:8123/a0d7b954_glances"
2023/11/01 12:36:20 [error] 783175#783175: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.140, server: a0d7b954-glances, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:61209/", host: "192.168.1.59:1099"
2023/11/01 12:36:20 [error] 783175#783175: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.140, server: a0d7b954-glances, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:61209/favicon.ico", host: "192.168.1.59:1099", referrer: "http://192.168.1.59:1099/"
2023/11/01 12:36:22 [error] 783175#783175: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.140, server: a0d7b954-glances, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:61209/", host: "192.168.1.59:1099"
2023/11/01 12:36:23 [error] 783175#783175: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.140, server: a0d7b954-glances, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:61209/favicon.ico", host: "192.168.1.59:1099", referrer: "http://192.168.1.59:1099/"
2023/11/01 12:36:58 [error] 783175#783175: *9 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: "192.168.1.59:8123", referrer: "http://192.168.1.59:8123/a0d7b954_glances"
My config
log_level: info
process_info: true
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: "123"
database: glances
prefix: localhost
token: "1234"
bucket: glances
org: myorg
leave_front_door_open: true
^^ All done in Chrome Incog, and dbl checked in Vivaldi Private ^^
Anything else I might be overlooking? Thanks in advance.
Something is causing the Glances process to die, if you can get into the container there is a log file, I believe by default at "/tmp/glances-root.log". We should maybe look to output this to the console at some point.
Please install the latest version and report the logs
OK will do
Add-on: Glances
A cross-platform system monitoring tool
-----------------------------------------------------------
Add-on version: 0.20.0
You are running the latest version of this add-on.
System: Home Assistant OS 11.0 (amd64 / qemux86-64)
Home Assistant Core: 2023.10.3
Home Assistant Supervisor: 2023.11.0
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
2023-11-08 14:55:43,482 -- INFO -- Start Glances 3.4.0.3
2023-11-08 14:55:43,482 -- INFO -- CPython 3.11.6 (/usr/bin/python3) and psutil 5.9.6 detected
2023-11-08 14:55:43,485 -- INFO -- Read configuration file '/etc/glances.conf'
2023-11-08 14:55:43,500 -- INFO -- Start GlancesWebServer mode
2023-11-08 14:55:43,506 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2023-11-08 14:55:43,654 -- WARNING -- Error loading Podman deps Lib. Podman feature in the Containers plugin is disabled (No module named 'podman')
2023-11-08 14:55:43,695 -- WARNING -- Missing Python Lib (No module named 'wifi'), Wifi plugin is disabled
2023-11-08 14:55:43,696 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2023-11-08 14:55:43,707 -- WARNING -- Missing Python Lib (No module named 'py3nvml'), Nvidia GPU plugin is disabled
2023-11-08 14:55:43,708 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
2023-11-08 14:55:43,709 -- WARNING -- Sparklines module not found (No module named 'sparklines')
Terminated
INFO: Starting NGinx...
2023-11-08 14:56:46,652 -- INFO -- Glances RESTful API Server started on http://127.0.0.1:61209/api/3/
2023-11-08 14:56:46,655 -- 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/
Here's the output with the latest version. I still get the 'Terminated' line and nothing shows up when accessing the UI.
It turns out it is working... it just takes several seconds to display anything on the UI, so long that it made me believe nothing was working, like a blank page ... that's weird. I am traveling, so I can't check what happens when I try to access the web interface directly via the loopback address, but it seems to be working.
Is the 'Terminated' line expected then?
I can't duplicate the message, what is odd is that nginx won't start until Glances has, but as per your log it is almost like Glances starts, fails, then restarts. You can see the 1 minute differences in the logs between the last warning and the message stating the web server is running.
I would also check the console output from your browser to see what is happening there.
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!
I'm not really sure what is going on or how to troubleshoot this, the problem is definitively in the server side. Glances is running but it is always painfully slow, any API request takes up to 60 seconds to return a simple answer. I think it is all due to the same root cause. But I don't know enough about this addon to find it...
This is my VM cpu usage when the glances addon is running:
When I stop the addon the cpu immediately goes back to normal:
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!