Hello everyone !
I am experiencing a bug, and I honestly don’t know what could be causing it. Can any of you please help ? 
I apologize in advance for the long post, I tried my best to make it as short as possible.
Summary
I have just reinstalled from scratch TTRSS on Docker (Rootless Docker if it matters), and /var/log/nginx/error.log doesn’t get filled.
Since TTRSS does write on the access log file, permissions aren’t the issue.
Problem
The web-nginx container works well, and its logs (when TTRSS_LOG_DESTINATION="sql") work well (wrong password results in a log entry with the right IP).
But if I reinstall, set TTRSS_LOG_DESTINATION=" ", and mount the error log, then the log never updates and has this error message:
$ tail /var/log/docker/ttrss/ttrss_error.log
2021/02/28 02:19:29 [error] 35#35: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.144.4, server: , request: "POST /tt-rss/public.php HTTP/1.1", upstream: "fastcgi://192.168.144.2:9000", host: "<domain_redacted>"
2021/02/28 02:19:38 [error] 35#35: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Refusing to invoke method getruntimeinfo of handler rpc with invalid CSRF token. in /var/www/html/tt-rss/backend.php on line 151" while reading response header from upstream, client: 192.168.144.4, server: , request: "POST /tt-rss/backend.php HTTP/1.1", upstream: "fastcgi://192.168.144.2:9000", host: "<domain_redacted>"
Related? problem
I don’t know if this is related, but /var/log/nginx/access.log displays the IP address of the reverse-proxy (Traefik) instead of the real IP.
Host info
/opt/tt-rss/config.d is empty, everything is defined through environment variables.
I am on a Raspberry Pi 4 with Debian Buster.
$ uname -a
Linux <hostname_redacted> 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64 GNU/Linux
TTRSS Version
21.02-7f2fe465b
Config info
In case it helps, here is my docker-compose.yml for TTRSS:
version: "3.8"
services:
ttrss_db:
image: postgres:12-alpine
container_name: ttrss_db
restart: "no"
environment:
- TZ=${TZ}
- POSTGRES_DB_FILE=/run/secrets/ttrss_db_db
- POSTGRES_USER_FILE=/run/secrets/ttrss_db_user
- POSTGRES_PASSWORD_FILE=/run/secrets/ttrss_db_password
secrets:
- ttrss_db_db
- ttrss_db_user
- ttrss_db_password
volumes:
- ${DOCKERDATA}/ttrss_db:/var/lib/postgresql/data
app:
build:
context: ${DOCKERDATA}/ttrss-docker/app
container_name: ttrss
restart: "no"
depends_on:
- ttrss_db
environment: &ttrssenv
- TTRSS_DB_TYPE=pgsql
- TTRSS_DB_HOST=ttrss_db
- TTRSS_DB_NAME=${TTRSS_DB_DB}
- TTRSS_DB_USER=${TTRSS_DB_USER}
- TTRSS_DB_PASS=${TTRSS_DB_PASS}
- TTRSS_LOG_DESTINATION=" "
- TTRSS_SELF_URL_PATH=${TTRSS_SELF_URL_PATH}
volumes: &ttrssvols
- /etc/localtime:/etc/localtime:ro
- ${DOCKERDATA}/ttrss:/var/www/html
- ${DOCKERCONFIG}/ttrss:/opt/tt-rss/config.d:ro
ttrss_updater:
build:
context: ${DOCKERDATA}/ttrss-docker/app
container_name: ttrss_updater
restart: "no"
depends_on:
- app
environment: *ttrssenv
volumes: *ttrssvols
command: /opt/tt-rss/updater.sh
ttrss_web_nginx:
build: ${DOCKERDATA}/ttrss-docker/web-nginx
container_name: ttrss_web_nginx
restart: "no"
environment: *ttrssenv
volumes:
- /etc/localtime:/etc/localtime:ro
- ${DOCKERDATA}/ttrss:/var/www/html:ro
- /var/log/docker/ttrss/ttrss_error.log:/var/log/nginx/error.log
- /var/log/docker/ttrss/ttrss_access.log:/var/log/nginx/access.log
Logs for the web-nginx container if it helps
$ docker logs ttrss_web_nginx
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
Does anyone have a clue of what is going on with the logs ?
Many thanks to everyone who replies 