-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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/moodle] Cannot connect to Postgresql with SSL/TLS connection when moodle database on RDS is setup with SSL/TLS. #65832
Comments
Hi @sanlinnaing, Thanks for using Bitnami and sorry for the delay. I'm glad you found a solution for your issue by setting the I think we can improve our docs on how to define the SSL certificate in this case by documenting the |
Hi @gongomgra Sorry for delay of response and thanks for your contact. I did not set any parameter in the Moodle configuration. I just added I will share yml that I used with docker compose.
AWS RDS PostgresSQL is used with SSL/TLS preferred setting. |
Name and Version
bitnami/moodle:4.4
What architecture are you using?
amd64
What steps will reproduce the bug?
1. Environment
When setting up with docker compose by using
docker.io/bitnami/moodle:4.4
images, I have used Postgresql database hosted on AWS RDS.AWS RDS config on for SSL/TLS.
I can connect postgresql databse from docker host using
psql
. There is no problem.But when I run the docker compose and check logs of moodle and a request to exposed port, I found following error.
pg_connect(): Unable to connect to PostgreSQL server: connection to server at ______failed: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied
It seem that apache user (
daemon
orwww-data
) have not right permission to/root/.postgresql/postgresql.crt
.What is the expected behavior?
It should be able to connect to Postgresql just setting correct database endpoint on
MOODLE_DATABASE_HOST
.What do you see instead?
I found following error logs of moodle container when moodle initial setup from web.
Additional information
Workaround
I found a way to overcome the
/root/.postgresql/postgresql.crt
access permission problem with following way.Set environment variable
PGSSLCERT: /tmp/postgresql.crt
to overwrite the default postgresql.crt location.reference : postgresql docs
With this envrionment variable, there is no problem and I can successfully setup the moodle.
The text was updated successfully, but these errors were encountered: