bobbybobbobbed
bobbybobbobbed

Reputation: 191

Cant get rid of some docker logs from supervisor / vnc: 'GET /api/health' and 'sending remote command: "cmd=fb" via X11VNC_REMOTE X property'

I am using the docker vnc base: FROM dorowu/ubuntu-desktop-lxde-vnc:focal

This image uses supervisor to start many processes

I'm running the container on a server and locally, and keep the server up several months for test automation, so the docker logs are useful, but I'm getting too much in the logs that I dont want.

I want to remove / reduce the logs shown below

I get thousands of docker logs each day like:

127.0.0.1 - - [2021-12-29 22:10:41] "GET /api/state?video=false&id=2&w=1320&h=764 HTTP/1.0" 200 239 30.203522
127.0.0.1 - - [2021-12-29 22:10:49] "GET /api/health HTTP/1.1" 200 122 0.191225
127.0.0.1 - - [2021-12-29 22:11:12] "GET /api/state?video=false&id=2&w=1320&h=764 HTTP/1.0" 200 239 30.223648
127.0.0.1 - - [2021-12-29 22:11:19] "GET /api/health HTTP/1.1" 200 122 0.161399
127.0.0.1 - - [2021-12-29 22:11:45] "GET /api/state?video=false&id=2&w=1320&h=764 HTTP/1.0" 200 239 30.252270
127.0.0.1 - - [2021-12-29 22:11:49] "GET /api/health HTTP/1.1" 200 122 0.164935
>>> sending remote command: "cmd=fb" via X11VNC_REMOTE X property.
>>> sending remote command: "cmd=fb" via X11VNC_REMOTE X property.
>>> sending remote command: "cmd=fb" via X11VNC_REMOTE X property.
>>> sending remote command: "cmd=fb" via X11VNC_REMOTE X property.

one of the types of logs clearly come from X11VNC the other (I think) is health checks from php-fpm

For the health checks, this is what I tried:

I've updated the php-fpm.conf, to try to turn off health message, but... well that hasn't worked??? This in the startup bash, I have tried:

sudo sed -i 's/;systemd_interval = 10/systemd_interval = 0/g' /etc/php/7.4/fpm/php-fpm.conf

It updated the conf file correctly, but alas, I still get the logs

I also start it with bash, with the following

sudo /etc/init.d/php7.4-fpm start -D >/dev/null 2>&1

but alas, I still get the "GET /api/health" messages in docker logs

For the X11VNC logs, this is what I tried:

The supervisord.conf contained:

[program:x11vnc]
priority=20
command=x11vnc -display :1 -xkb -forever -shared -repeat -capslock -rfbauth /.password2

I have updated to this:

[program:x11vnc]
stderr_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stdout_logfile_maxbytes=0
stdout_logfile=/dev/fd/1
loglevel=critical
priority=20
command=x11vnc -quiet -display :1 -xkb -forever -shared -repeat -capslock -rfbauth /.password2

But, I still get the X11VNC_REMOTE log messages every time I access the container via novnc

(I have also tried loglevel=critical on the [supervisord] level, but I still get those messages)

I'm at a bit of a loss, I've spent a long time on this, and feel like I'm banging my head against a brick wall. What am I missing?

Update, so far I have found one of the logs is from here:

https://github.com/LibVNC/x11vnc/blob/f07df92816ef10b7382a542125955df7f4156a5c/src/remote.c ">>> sending remote command"

This is using

fprintf(stderr

So in theory, if supervisor is set up to suppress stderr it should not be in the logs (but it still is)

Upvotes: 0

Views: 281

Answers (1)

bobbybobbobbed
bobbybobbobbed

Reputation: 191

It was a long time ago, but I figured out what the issue was

The health check logs actually come from ngnix, and continue to output each time the heath check is done

You can turn the logging off/silent for health checks go to your site files, eg:

/etc/nginx/sites-available/default

and add the location /health option to turn off health logs:

server {
    location /health {
            access_log off;
            error_log /dev/stderr error;
    }

Upvotes: 0

Related Questions