No connection to backend server, try again in a few minutes.
See original GitHub issueUbuntu 20.04 Docker 20.10.2 Docker-compose 1.28.0
No connection to backend server, try again in a few minutes.
I have taken the docker-compose.yml from github and amended a little bit:
` networks:
libre: driver: bridge services: proxy: image: reallibrephotos/librephotos-proxy:${tag} tty: true container_name: librephotos-proxy restart: always ports: - ${httpPort}:80 networks: - libre librephotos-db: image: postgres container_name: librephotos-db restart: always environment: - POSTGRES_USER=${dbUser} - POSTGRES_PASSWORD=${dbPass} - POSTGRES_DB=${dbName} volumes: - /data/libredb/config:/var/lib/postgresql/data command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0 healthcheck: test: [‘CMD-SHELL’, ‘pg_isready -d $dbName -U $dbUser’] interval: 5s timeout: 5s retries: 5 networks: - libre
frontend: image: reallibrephotos/librephotos-frontend:${tag} container_name: librephotos-frontend restart: always tty: true networks: - libre
backend: image: reallibrephotos/librephotos:${tag} container_name: librephotos-backend restart: always volumes: - /mnt/data/media/pictures/mobile:/data - /mnt/data/media/libre/thumbs:/code/protected_media - /data/libre/config:/code/logs - /mnt/data/media/libre/cache:/root/.cache
environment:
- SECRET_KEY=${shhhhKey}
- BACKEND_HOST=backend
- ADMIN_EMAIL=${adminEmail}
- ADMIN_USERNAME=${userName}
- ADMIN_PASSWORD=${userPass}
- DEBUG=true
- DB_BACKEND=postgresql
- DB_NAME=${dbName}
- DB_USER=${dbUser}
- DB_PASS=${dbPass}
- DB_HOST=librephotos-db
- DB_PORT=5432
- REDIS_HOST=librephotos-redis
- REDIS_PORT=6379
- MAPBOX_API_KEY=${mapApiKey}
- TIME_ZONE=${timeZone}
- WEB_CONCURRENCY=${gunniWorkers}
- WORKER_TIMEOUT=${workerTimeOut}
- SKIP_PATTERNS=${skipPatterns}
# Wait for Postgres
depends_on:
librephotos-db:
condition: service_healthy
networks:
- libre
librephotos-redis: image: redis:alpine container_name: librephotos-redis restart: always networks: - libre `
The .env file:
tag=dev dbUser=libre dbPass=libre123 dbName=libre shhhhKey=c7rf4YENv3XL3hVMM5Mv adminEmail=xxx userName=xxx userPass=xxx mapApiKey= timeZone=Europe/Amsterdam gunniWorkers=2 workerTimeOut=1800 skipPatterns= httpPort=3000
All logs are looking fine.
Backend:
21:40:45 Cleaning registries for queue: default, [2021-01-22 21:40:30 +0000] [99] [INFO] Starting gunicorn 20.0.4, Running backend server..., [2021-01-22 21:40:30 +0000] [99] [INFO] Listening at: http://0.0.0.0:8001 (99), [2021-01-22 21:40:30 +0000] [99] [INFO] Using worker: gevent, [2021-01-22 21:40:30 +0000] [103] [INFO] Booting worker with pid: 103, [2021-01-22 21:40:30 +0000] [104] [INFO] Booting worker with pid: 104, 21:40:45 Worker rq:worker:f9fe87c1baec474a9df19803ce5ca77b: started, version 1.6.1, 21:40:45 Subscribing to channel rq:pubsub:f9fe87c1baec474a9df19803ce5ca77b, 21:40:45 *** Listening on default...
DB:
PostgreSQL init process complete; ready for start up., 2021-01-22 21:45:16.458 UTC [1] LOG: database system is ready to accept connections, 2021-01-22 21:45:16.454 UTC [75] LOG: database system was shut down at 2021-01-22 21:45:16 UTC, 2021-01-22 21:45:16.452 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432", 2021-01-22 21:45:16.451 UTC [1] LOG: listening on IPv6 address "::", port 5432, 2021-01-22 21:45:16.451 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432, 2021-01-22 21:45:16.451 UTC [1] LOG: starting PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
Frontend:
│ - On Your Network: http://172.29.0.2:3000 │ , │ - Local: http://localhost:3000 │ , │ Serving! │
Proxy:
/docker-entrypoint.sh: Configuration complete; ready for start up ,/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh ,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/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 ,/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ ,/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
Redis:
1:C 22 Jan 2021 21:45:15.132 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo, 1:C 22 Jan 2021 21:45:15.132 # Redis version=6.0.10, bits=64, commit=00000000, modified=0, pid=1, just started, 1:C 22 Jan 2021 21:45:15.132 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf, 1:M 22 Jan 2021 21:45:15.134 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect., 1:M 22 Jan 2021 21:45:15.134 # Server initialized, 1:M 22 Jan 2021 21:45:15.134 * Running mode=standalone, port=6379., 1:M 22 Jan 2021 21:45:15.136 * Ready to accept connections
I’ve done another pull, but am I up-to-date.
Any ideas? Google only gives me old issues…
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
Have you figured out a solution? I managed to get it set up with traefik. I believe the two most important steps were:
external: falsefor the internal communication between the librephotos components.I am not sure how traefik is different from nginx, but we refactored all the nginx.conf’s into one file. Maybe that helps you finding that issue: https://github.com/LibrePhotos/librephotos-docker/blob/main/proxy/nginx.conf