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

Bitnami:Postgres Running psql commands directly in container seem to "freeze". Always need to use Cntl-C to break the command #74379

Open
kevdogg opened this issue Nov 9, 2024 · 1 comment
Assignees
Labels
in-progress postgresql tech-issues The user has a technical issue about an application

Comments

@kevdogg
Copy link

kevdogg commented Nov 9, 2024

Name and Version

bitnami/postgres:16

What architecture are you using?

amd64

What steps will reproduce the bug?

I'm using the bitnami/postgres16 image with docker compose. I'm starting off with an empty database to test. The database is initialized and I log into the container via:

sudo docker exec -it <name of containter> /bin/bash

From inside the container I login to the database via:

PGPASSPASSWORD=<POSTGRESQL_POSTGRES_PASSWORD variable defined in docker_compose.yml> psql -U psql

Once logged in as the postgres user, I try something simple such as:

postgres=# ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgresql-postgresql-pass';

The control process never returns to the command prompt. I need to break the command with a Cntl-C. Checking in this the command seems to be successfully completed (can log in via the new password) however with every command given at command line I need to break command.

What is the expected behavior?

Process should execute and return the to the prompt. Such as:

postgres=# ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgresql-postgresql-pass';

postgres=#

What do you see instead?

I see a hanging cursor:

postgres=# ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgresql-postgresql-pass';
[]

Additional information

I originally thought it might be a permissions issue, but I don't think this is the case since in my example the password is actually changed. I've also tried running variations of this command by running this command from the psql command line prompt from within the docker container and it does the same thing in terms of "freezing" or not returning the command prompt.

@kevdogg kevdogg added the tech-issues The user has a technical issue about an application label Nov 9, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 9, 2024
@github-actions github-actions bot removed the triage Triage is needed label Nov 14, 2024
@github-actions github-actions bot assigned fmulero and unassigned carrodher Nov 14, 2024
@fmulero
Copy link
Collaborator

fmulero commented Nov 25, 2024

Thanks @kevdogg for using bitnami/containers!

I tried to reproduce your issue but I have no luck:

$ docker run -d --rm --name psql -e POSTGRESQL_PASSWORD=test bitnami/postgresql:16
bcadea12ddebbe95b0b3c3676721d7a6138619ad577fc4c54a6269a217300d92
$ docker exec -it psql /bin/bash
I have no name!@bcadea12ddeb:/$ psql -U postgres
Password for user postgres: 
psql (16.6)
Type "help" for help.

postgres=# ALTER USER postgres WITH ENCRYPTED PASSWORD 'salami';
ALTER ROLE
postgres=# 

Could you provide your docker-compose to try to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress postgresql tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

3 participants