You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unable to access the web ui for Authentik, when looking in logs getting a "PostgreSQL connection failed, retrying. Name or service not known". Also, when doing a docker ps the worker component is constantly restarting after about 30 seconds
To Reproduce
Followed this guide for setting up Authentik.
Expected behavior
Web ui should be available to connect to and setup Authentik
Logs
[+] Running 4/4
✔ Container authentik-redis Recreated 0.3s
✔ Container authentik-postgresql Recreated 0.2s
✔ Container authentik-server Recreated 0.3s
✔ Container authentik-worker Recreated 0.3s
Attaching to authentik-postgresql, authentik-redis, authentik-server, authentik-worker
authentik-redis | Starting Redis Server
authentik-postgresql |
authentik-postgresql | PostgreSQL Database directory appears to contain a database; Skipping initialization
authentik-postgresql |
authentik-redis | 1:C 20 May 2025 15:03:15.594 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see jemalloc/jemalloc#1328. 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.
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: starting PostgreSQL 16.9 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: listening on IPv6 address "::", port 5432
authentik-postgresql | 2025-05-20 15:03:15.639 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
authentik-postgresql | 2025-05-20 15:03:15.648 UTC [29] LOG: database system was shut down at 2025-05-20 15:03:14 UTC
authentik-postgresql | 2025-05-20 15:03:15.656 UTC [1] LOG: database system is ready to accept connections
authentik-server | {"event":"Loaded config","level":"debug","path":"inbuilt-default","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Loaded config","level":"debug","path":"/authentik/lib/default.yml","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Loaded config from environment","level":"debug","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Starting Metrics server","level":"info","listen":"0.0.0.0:9300","logger":"authentik.router.metrics","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Starting HTTP server","level":"info","listen":"0.0.0.0:9000","logger":"authentik.router","timestamp":"2025-05-20T15:03:21Z"}
authentik-worker | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7073514, "file": "/authentik/lib/default.yml"}
authentik-worker | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7077928, "count": 7}
authentik-server | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.742738, "file": "/authentik/lib/default.yml"}
authentik-server | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7431855, "count": 7}
authentik-server | {"event":"Starting HTTPS server","level":"info","listen":"0.0.0.0:9443","logger":"authentik.router","timestamp":"2025-05-20T15:03:21Z"}
authentik-worker | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753402.0593565}
authentik-server | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753402.2168343}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753403.063988}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753403.2196019}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753404.0662575}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753404.2220685}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753405.069654}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753405.2246292}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753406.0717437}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753406.2270997}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753407.0741785}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753407.2296758}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753408.076667}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753408.232043}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753409.0795057}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753409.2348855}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753410.0819182}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753410.2373116}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753411.0847766}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753411.2400072}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753412.0872056}
Version and Deployment (please complete the following information):
Setup using docker compose and using latest versions provided in the docker-compose.yml
It's a DNS resolution error as postgres is not added to any common docker network. You're resolving as postgresql which is the hostname of a container in the stack. You'd need to add the backend network to both postgres and redis as done on the worker with:
Describe the bug
Unable to access the web ui for Authentik, when looking in logs getting a "PostgreSQL connection failed, retrying. Name or service not known". Also, when doing a docker ps the worker component is constantly restarting after about 30 seconds
To Reproduce
Followed this guide for setting up Authentik.
Expected behavior
Web ui should be available to connect to and setup Authentik
Logs
[+] Running 4/4
✔ Container authentik-redis Recreated 0.3s
✔ Container authentik-postgresql Recreated 0.2s
✔ Container authentik-server Recreated 0.3s
✔ Container authentik-worker Recreated 0.3s
Attaching to authentik-postgresql, authentik-redis, authentik-server, authentik-worker
authentik-redis | Starting Redis Server
authentik-postgresql |
authentik-postgresql | PostgreSQL Database directory appears to contain a database; Skipping initialization
authentik-postgresql |
authentik-redis | 1:C 20 May 2025 15:03:15.594 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see jemalloc/jemalloc#1328. 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.
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: starting PostgreSQL 16.9 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
authentik-postgresql | 2025-05-20 15:03:15.633 UTC [1] LOG: listening on IPv6 address "::", port 5432
authentik-postgresql | 2025-05-20 15:03:15.639 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
authentik-postgresql | 2025-05-20 15:03:15.648 UTC [29] LOG: database system was shut down at 2025-05-20 15:03:14 UTC
authentik-postgresql | 2025-05-20 15:03:15.656 UTC [1] LOG: database system is ready to accept connections
authentik-server | {"event":"Loaded config","level":"debug","path":"inbuilt-default","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Loaded config","level":"debug","path":"/authentik/lib/default.yml","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Loaded config from environment","level":"debug","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Starting Metrics server","level":"info","listen":"0.0.0.0:9300","logger":"authentik.router.metrics","timestamp":"2025-05-20T15:03:21Z"}
authentik-server | {"event":"Starting HTTP server","level":"info","listen":"0.0.0.0:9000","logger":"authentik.router","timestamp":"2025-05-20T15:03:21Z"}
authentik-worker | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7073514, "file": "/authentik/lib/default.yml"}
authentik-worker | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7077928, "count": 7}
authentik-server | {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.742738, "file": "/authentik/lib/default.yml"}
authentik-server | {"event": "Loaded environment variables", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1747753401.7431855, "count": 7}
authentik-server | {"event":"Starting HTTPS server","level":"info","listen":"0.0.0.0:9443","logger":"authentik.router","timestamp":"2025-05-20T15:03:21Z"}
authentik-worker | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753402.0593565}
authentik-server | {"event": "Starting authentik bootstrap", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753402.2168343}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753403.063988}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753403.2196019}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753404.0662575}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753404.2220685}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753405.069654}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753405.2246292}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753406.0717437}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753406.2270997}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753407.0741785}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753407.2296758}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753408.076667}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753408.232043}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753409.0795057}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753409.2348855}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753410.0819182}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753410.2373116}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753411.0847766}
authentik-server | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753411.2400072}
authentik-worker | {"event": "PostgreSQL connection failed, retrying... ([Errno -2] Name or service not known)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1747753412.0872056}
Version and Deployment (please complete the following information):
Setup using docker compose and using latest versions provided in the docker-compose.yml
The text was updated successfully, but these errors were encountered: