Reputation: 2237
I am trying to run pgadmin in docker like below and getting exception while starting gunicorn 20.0.4 error. Any pointers to fix this?
docker run -p 80:80 -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=postgres" -d dpage/pgadmin4
Docker logs
NOTE: Configuring authentication for SERVER mode.
[2021-08-13 03:03:04 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-08-13 03:03:04 +0000] [1] [ERROR] Retrying in 1 second.
[2021-08-13 03:03:05 +0000] [1] [ERROR] Retrying in 1 second.
[2021-08-13 03:03:06 +0000] [1] [ERROR] Retrying in 1 second.
[2021-08-13 03:03:07 +0000] [1] [ERROR] Retrying in 1 second.
[2021-08-13 03:03:08 +0000] [1] [ERROR] Retrying in 1 second.
[2021-08-13 03:03:09 +0000] [1] [ERROR] Can't connect to ('::', 80)
Upvotes: 12
Views: 5488
Reputation: 31584
I guess you are working on a IPv6-disabled systems, from the /entrypoint.sh
, the gunicorn command is next:
exec /venv/bin/gunicorn --timeout ${TIMEOUT} --bind ${PGADMIN_LISTEN_ADDRESS:-[::]}:${PGADMIN_LISTEN_PORT:-80} -w 1 --threads ${GUNICORN_THREADS:-25} --access-logfile ${GUNICORN_ACCESS_LOGFILE:--} -c gunicorn_config.py run_pgadmin:app
This means it's default use ipv6 address, so I think you may have a trial with gunicorn listen on ipv4 address by pass PGADMIN_LISTEN_ADDRESS=0.0.0.0
to run command:
docker run -p 80:80 -e "PGADMIN_LISTEN_ADDRESS=0.0.0.0" -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=postgres" -d dpage/pgadmin4
Upvotes: 20