Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgadmin-4 in docker failed with gunicorn server start error

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)
like image 239
Minisha Avatar asked Jan 25 '26 23:01

Minisha


1 Answers

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
like image 189
atline Avatar answered Jan 27 '26 13:01

atline



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!