-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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/postgresql] container crashes when starting for the first time if you use a custom pg_hba.conf #41431
Comments
Here are the debug logs:
|
After doing some more research, it seems that the function failing is containers/bitnami/postgresql/15/debian-11/rootfs/opt/bitnami/scripts/libpostgresql.sh Line 640 in b0b0239
So, I guess in my case the pg_hba.conf file requires login via an md5 password, but the postgres user doesnt have a password yet. I think a potential workaround would be to always (whether pg_hba.conf is mounted or not) generate initial 'trust' pg_hba.conf, use that through the setup phase, then change the server to use the mounted pg_hba.conf file. Not sure what your thoughts are on this |
I think the following demonstrates a potential workaround (use
|
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Thank you @sss-ng. I understand that finally with the workaround it has worked. Thanks for the contribution. |
I think that this issue needs a comment in the documentation at minimum. If you support me fixing the bug as described before I'd be glad to do that as well @corico44 |
@sss-ng We encourage you to open a PR and we will be happy to review it! |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
Reopen |
reopen please |
Stale bot strikes again. This is still an ongoing issue that was never resolved. @carrodher |
Name and Version
bitnami/postgres:15.3.0, 15.0, 14.0, 13.0, 12.0 (probably others too)
What architecture are you using?
amd64
What steps will reproduce the bug?
The goal is to be able to use a custom
pg_hba.conf
when doing adocker-compose up
for the first time. However, it seems that this is not possible for version 15.3, 15.0, 14.0, 13.0, 12.0, etc.Maybe this is by design? I'm not a postgres expert, but it seems like something you should be able to do.
Here is my setup:
./docker-compose.yml
:./pg_hba.conf
:Note: this is the same as the one that the scripts generate if there is none given
The attempt:
What is the expected behavior?
The container should come up configured with the given
pg_hba.conf
Additional information
I exec-ed into the container, and I think one of the scripts is failing because it's asking the user to enter a password. Steps to see that below. It doesnt do that if I dont mount a
pg_hba.conf
To do this, I override the entrypoint with a sleep:
The text was updated successfully, but these errors were encountered: