Replies: 9 comments
-
Could you please join the log ? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I am not very familiar with the term. What does "join the log" mean? Btw, I have attached the output of
|
Beta Was this translation helpful? Give feedback.
-
Workaround: Add the following option to docker run: --security-opt seccomp:unconfined. It should remove the apparmor message. |
Beta Was this translation helpful? Give feedback.
-
Under the hood we need to investigate and understand why Glances needs ptrace access on the system (PsUtil ? another lib ?). The message are also generated with the "minimal" Alpine Docker Image. So need to investigate on the PSUtil side:
Logs (/var/log/syslog file):
When we disable all the plugins but the process one, the log message is also displayed: docker run --rm -e TZ="" -e GLANCES_OPT="--disable-plugin all --enable-plugin processcount,processlist" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-minimal So the log are generated by the process plugin (so PsUtil). |
Beta Was this translation helpful? Give feedback.
-
I have added the option in a compose.yaml but it doesn't help. The warnings are still reported multiple times every 6 seconds.
|
Beta Was this translation helpful? Give feedback.
-
Strange, it makes the job on my side... Try to add another option (traditionally to the option --security-opt seccomp:unconfined): –-cap-add=SYS_PTRACE If it did not work, replace the previous options with: --privileged (ugly work around because it give all the system privileges to the container). You can also have a look on the following post (https://stackoverflow.com/questions/63162665/docker-compose-order-of-cap-drop-and-cap-add/63219871#63219871), it should be possible to limit the --privileged option. Keep us inform if you find a better solution, nothing is possible from the Glances code. |
Beta Was this translation helpful? Give feedback.
-
I have tried to replicate your configuration. I have tried 3 tags. And they all spam the log. Here is my compose.yaml.
|
Beta Was this translation helpful? Give feedback.
-
In my original configuration, neither --security-opt seccomp:unconfined nor –-cap-add=SYS_PTRACE worked but --privileged did the trick. I tried all 3 options above again with "--disable-plugin all --enable-plugin processcount,processlist" arguments to test on 3 tags
They all crash repeatedly with the following messages logged. (Please note the log messages are listed reverse chronically.)
Regarding the appamor on with "--disable-plugin all --enable-plugin processcount,processlist" arguments, besides crashing, the docker options made no difference.
|
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 3 months with no activity. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I have recently switch to Journald logging driver. And I noticed the glances container spams the log with appamor denied messages.
To Reproduce
Steps to reproduce the behavior:
/etc/docker/daemon.json
$ journalctl -n 1000
Expected behavior
There should not be errors related to the container glances.
Environement (please complete the following information)
To be completed with result of: lsb_release -a
To be completed with result of: glances -V
To be completed
glances is installed from a docker container on image 'nicolargo/glances:latest-full'
pastebin
Additional context
Add any other context about the problem here.
You can also pastebin:
pastebin
Please note for the following log, the PID of the python3 running glances is 1744.
pastebin
Beta Was this translation helpful? Give feedback.
All reactions