10

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 "PGADMIN_DEFAULT_EMAIL=email@domain.com" -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)
Minisha
  • 2,117
  • 2
  • 25
  • 56

1 Answers1

13

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 "PGADMIN_DEFAULT_EMAIL=email@domain.com" -e "PGADMIN_DEFAULT_PASSWORD=postgres" -d dpage/pgadmin4
atline
  • 28,355
  • 16
  • 77
  • 113
  • 1
    this worked for me and I have ipv6 disabled, thanks! – John Aug 19 '21 at 16:39
  • Does not work for me on a Synology NAS, downgrading to pgadmin 4.8 solved the issue – Romain Laneuville Mar 27 '23 at 21:09
  • 1
    Solved by putting another listening port than 80, `PGADMIN_LISTEN_PORT: 8000` as pointed in the doc: *On some filesystems that do not support extended attributes, it may not be possible to run pgAdmin without specifying a value for PGADMIN_LISTEN_PORT that is greater than 1024.* – Romain Laneuville Mar 27 '23 at 21:34