Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connet from command line #483

Open
kapdom opened this issue Oct 8, 2024 · 0 comments
Open

Unable to connet from command line #483

kapdom opened this issue Oct 8, 2024 · 0 comments

Comments

@kapdom
Copy link

kapdom commented Oct 8, 2024

What is the bug or the crash?

Unable to connect to db from CL.
When I try connect i receive following error:

root@be5cbb137675:/scripts# psql -U docker -W
Password: 
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "docker"

as a password I type in "docker"

Steps to reproduce the issue

  1. Build docker container from docker compose
services:
    postgres_db:
        container_name: postgres_db
        image: kartoza/postgis:16-3.4
        restart: always
        environment:
           POSTGRES_MULTIPLE_EXTENSIONS: postgis,hstore,postgis_topology,postgis_raster,pgrouting
        ports:
           - '5432:5432'
    pgadmin:
      container_name: pgadmin4_container
      image: dpage/pgadmin4
      restart: always
      environment:
          PGADMIN_DEFAULT_EMAIL: [email protected]
          PGADMIN_DEFAULT_PASSWORD: root
      ports:
          - "5050:80"

output:
Screenshot from 2024-10-08 14-38-50

  1. Enter on container: docker compose exec postgres_db bash
  2. Try to connect from CL psql -U docker -W
  3. Any other user listed in output not working

Versions

kartoza/postgis:16-3.4

Additional context

What should be done to enter in db from command line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant