I have a docker container running a python service with gunicorn. This is how the service was started :
gunicorn --bind 0.0.0.0:6435 --certfile=cert.pem --keyfile=key.pem --ssl-version=5 --ciphers=EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH app:app -w=5 --timeout=500 --daemon
But, i am unable to find log files for the 5 workers. What would be the default path to find these log files?
I tried using the find command find / -type f -name "hs_err_pid"
since these are the default file names gunicorn saves the log files with. But this gives me the following permission errors:
find: ‘/proc/1/map_files’: Operation not permitted
find: ‘/proc/16/map_files’: Operation not permitted
find: ‘/proc/89/map_files’: Operation not permitted
Any way to find out the log files?
This log file is located at /var/log/cloudify/rest/gunicorn-access.
By default, the Docker containers log files are stored in /var/lib/docker/containers/<containerId> dir.
You find these JSON log files in the /var/lib/docker/containers/ directory on a Linux Docker host.
The docker logs command shows information logged by a running container. The docker service logs command shows information logged by all containers participating in a service. The information that is logged and the format of the log depends almost entirely on the container's endpoint command.
I suggest you to add --access-logfile YOUR_FILE
to your command to specify a file or redirect it to stdout using -
. the same goes for error logs.
see this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With