Skip to content

Error FATAL: password authentication failed for user "postgres" #679

@ghost

Description

Clean system - running postgres without volume or anything defined.

2020-02-14 17:26:38.505 UTC [62] FATAL:  password authentication failed for user "postgres"
2020-02-14 17:26:38.505 UTC [62] DETAIL:  Password does not match for user "postgres".
        Connection matched pg_hba.conf line 95: "host all all all md5"
docker run --rm -e POSTGRES_USERNAME=postgres -e POSTGRES_PASSWORD=postgres --name postgres -p 5432:5432 postgres

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2020-02-14 17:26:34.092 UTC [46] LOG: starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2020-02-14 17:26:34.094 UTC [46] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-02-14 17:26:34.105 UTC [47] LOG: database system was shut down at 2020-02-14 17:26:33 UTC
2020-02-14 17:26:34.109 UTC [46] LOG: database system is ready to accept connections
done
server started

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down...2020-02-14 17:26:34.191 UTC [46] LOG: received fast shutdown request
.2020-02-14 17:26:34.193 UTC [46] LOG: aborting any active transactions
2020-02-14 17:26:34.196 UTC [46] LOG: background worker "logical replication launcher" (PID 53) exited with exit code 1
2020-02-14 17:26:34.196 UTC [48] LOG: shutting down
2020-02-14 17:26:34.209 UTC [46] LOG: database system is shut down
done
server stopped

PostgreSQL init process complete; ready for start up.

2020-02-14 17:26:34.309 UTC [1] LOG: starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2020-02-14 17:26:34.309 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2020-02-14 17:26:34.309 UTC [1] LOG: listening on IPv6 address "::", port 5432
2020-02-14 17:26:34.312 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-02-14 17:26:34.325 UTC [55] LOG: database system was shut down at 2020-02-14 17:26:34 UTC
2020-02-14 17:26:34.328 UTC [1] LOG: database system is ready to accept connections
2020-02-14 17:26:38.505 UTC [62] FATAL: password authentication failed for user "postgres"
2020-02-14 17:26:38.505 UTC [62] DETAIL: Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
2020-02-14 17:26:39.293 UTC [63] FATAL: password authentication failed for user "postgres"
2020-02-14 17:26:39.293 UTC [63] DETAIL: Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
2020-02-14 17:26:39.436 UTC [64] FATAL: password authentication failed for user "postgres"
2020-02-14 17:26:39.436 UTC [64] DETAIL: Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
2020-02-14 17:26:41.104 UTC [65] FATAL: password authentication failed for user "postgres"
2020-02-14 17:26:41.104 UTC [65] DETAIL: Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
^C2020-02-14 17:26:44.327 UTC [1] LOG: received fast shutdown request
2020-02-14 17:26:44.328 UTC [1] LOG: aborting any active transactions
2020-02-14 17:26:44.329 UTC [1] LOG: background worker "logical replication launcher" (PID 61) exited with exit code 1
2020-02-14 17:26:44.330 UTC [56] LOG: shutting down
2020-02-14 17:26:44.341 UTC [1] LOG: database system is shut down

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions