简体   繁体   中英

Unable to connect to pgAdmin 4 since the last update of its Docker image: Incorrect username or password

I recently updated the dpage/pgadmin4:latest docker image using docker-compose pull on the following compose file:

version: '3.8'

services:
  pgadmin4:
    image: dpage/pgadmin4:latest
    container_name: pgadmin4
    environment:
      - PGADMIN_DEFAULT_EMAIL=user@local.host
      - PGADMIN_DEFAULT_PASSWORD=password
      - PGADMIN_LISTEN_PORT=8080
      - PGADMIN_SERVER_JSON_FILE=servers.json
    volumes:
      - ./servers.json:/pgadmin4/servers.json
    ports:
      - "8080:8080"
    restart: unless-stopped
    network_mode: host

But since now, each time I try to login on the landing page after having spin up my container, I face the following error message:

"Incorrect username or password".

pgadmin4 错误信息

And here are the lines displayed on the server log ( docker-compose logs ) at that time:

pgadmin4    | ::1 - - [24/Jun/2021:21:48:21 +0000] "POST /authenticate/login HTTP/1.1" 302 209 "http://localhost:8080/login?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
pgadmin4    | ::1 - - [24/Jun/2021:21:48:21 +0000] "GET / HTTP/1.1" 302 237 "http://localhost:8080/login?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
pgadmin4    | ::1 - - [24/Jun/2021:21:48:21 +0000] "GET /login?next=%2F HTTP/1.1" 200 1812 "http://localhost:8080/login?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
pgadmin4    | ::1 - - [24/Jun/2021:21:48:21 +0000] "GET /favicon.ico?ver=50400 HTTP/1.1" 302 265 "http://localhost:8080/login?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

What went wrong and how to fix it?
I didn't change the compose file, and it was perfectly working before the update.

More info:
OS: Ubuntu 18.04.
Docker version 20.10.7, build f0df350
docker-compose version 1.27.4, build 40524192

It's a bug on the image 5.4

I've downgraded it to 5.3 and it works just fine.

(just lost a couple of hours to this...)

The problem seems to be gone with the recently published latest version (5.5 at the time of writing)

最新版本


docker pull dpage/pgadmin4:5.5

https://hub.docker.com/r/dpage/pgadmin4/tags?page=1&ordering=last_updated

Same here. IT's a bug in 5.4 Upgrading to 5.5 resolves the issue:

FROM dpage/pgadmin4:5.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM