dockeropenstreetmap

no logs for renderd inside of docker


I have built a docker container containing renderd and apache2 to render tiles from a postgis database (inside another container).

This works fine, however, renderd is not producing log output after:

** INFO: 17:20:22.021: Running in foreground mode...
** INFO: 17:20:22.021: Loading parameterization function for 
** INFO: 17:20:22.021: Loading parameterization function for 
** INFO: 17:20:22.021: Loading parameterization function for 
2021-11-29 17:20:22,021 DEBG 'renderd' stdout output:
** INFO: 17:20:22.021: Loading parameterization function for 
** INFO: 17:20:22.021: Loading parameterization function for 
** INFO: 17:20:22.021: Loading parameterization function for 
** INFO: 17:20:22.021: Loading parameterization function for 

I am using supervisord to run both processes inside a single container.

supervisord.conf


[unix_http_server]
file=/tmp/supervisor.sock
username=medav
password=medav

[supervisord]
logfile=/var/log/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=debug
pidfile=/var/run/supervisord.pid
nodaemon=true
minfds=1024
minprocs=200
user=root
childlogdir=/var/log/supervisor/

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
username=medav
password=medav

[program:apache2]
command=apachectl -D "FOREGROUND" -k start
stderr_logfile = /var/log/supervisor/apache-stderr.log
stdout_logfile = /var/log/supervisor/apache-stdout.log

[program:renderd]
command=/usr/bin/renderd -f
stderr_logfile = /var/log/supervisor/renderd-stderr.log
#stdout_logfile = /var/log/supervisor/renderd-stdout.log
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

I'm redirecting stdout of renderd to stdout of the container to see the output with "docker logs " command. Furthermore, I have set the log level to info to not miss anything. Running on a bare metal server, renderd produces log entries that can be read out with journalctl for incoming requests. I would like to access these logs.


Solution

  • I made it working by adding the following to my dockerfile:

    ENV G_MESSAGES_DEBUG=all