Skip to content

psql: error: FATAL: role "" does not exist #1941

@phgachoud

Description

@phgachoud

Unable to determine what is the problem with the container, I'm unable to log in with a psql client (on a raspberry pi3 host)

root@myRpi: ~$ docker exec -it myDbContainerId bash #Now into container root@8d1920c181d4:/# psql -h localhost -U $POSTGRES_USER psql: error: FATAL: role "user-dev" does not exist root@8d1920c181d4:/# psql -h 8d1920c181d4 -U $POSTGRES_USER Password for user yarmp-dev: psql: error: FATAL: password authentication failed for user "user-dev"

It seems that using the hostname with the container hostname it goes further, but failed with the password. I'm trying to know where to debug the login attempts but don't know where to find more info on the systems image. No auth.log for ex.

I checked the content of $POSTGRES_USER $POSTGRES_PWD and $POSTGRES_DB, they correspond to the db_env.db file I gave into my docker-compose.yml

I thought that psql -U $POSTGRES_USER should work in any ways into the container giving $POSTGRES_PWD...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions