containers icon indicating copy to clipboard operation
containers copied to clipboard

moodle container : could not connect to the database

Open Klemich opened this issue 1 year ago • 2 comments

Name and Version

bitnami/moodle:4

What steps will reproduce the bug?

  1. I installed MariaDB from many different sources (noting that bitnami/mariadb:latest brings "friends" I choose the linuxserver/mariadb one, so far no uninvited friends...), and it works fine.
  2. I installed bitnami/moodle:latest many times, using stacks on portainer, using the guidelines on this git, youtube vidéos and stackoverflow's propositions: all lead to many problems including this persistent if but one = "could not connect to database' and stops after 2seconds.
  3. I think it's a problem of permission, but that's way too advanced for me. I have no idea what to change and how (I mean the chown and the chmod, ok, I know, but where? how to include it inside docker?)

What is the expected behavior?

Connect to database and run?

What do you see instead?

  1. I tried to change the PUID and PUIG, but even there, I get lost.
  2. I tried to docker run --user root but still not much success in the end.

Additional information

Moodle container log:

moodle 03:29:56.34 Welcome to the Bitnami moodle container
moodle 03:29:56.34 Subscribe to project updates by watching https://github.com/bitnami/containers
moodle 03:29:56.34 Submit issues and feature requests at https://github.com/bitnami/containers/issues
moodle 03:29:56.34 
moodle 03:29:56.34 INFO  ==> ** Starting Moodle setup **
realpath: /bitnami/apache/conf: No such file or directory
moodle 03:29:56.37 INFO  ==> Configuring Apache ServerTokens directive
moodle 03:29:56.40 INFO  ==> Configuring PHP options
moodle 03:29:56.40 INFO  ==> Setting PHP expose_php option
moodle 03:29:56.43 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
moodle 03:29:56.44 INFO  ==> Validating settings in POSTGRESQL_CLIENT_* env vars
moodle 03:29:56.54 INFO  ==> Ensuring Moodle directories exist
moodle 03:29:56.55 INFO  ==> Trying to connect to the database server
moodle 03:30:56.69 ERROR ==> Could not connect to the database
moodle 03:31:00.32 

Ask me anything, but please help me! I'm not a full-time programmer, and my job is to install moodle for my company... Thanks a lot.

Klemich avatar Sep 03 '22 03:09 Klemich

Please, note that the Bitnami team is not actively monitoring GitHub Issues for this project. This issue will stay open for 20 days to allow the community to contribute, after 15 days without activity the issue will be marked as stale, being closed after 5 days.

If you would like to contribute to this container image by fixing a bug or adding a new feature, feel free to create a PR, the Bitnami team will be happy to review it and provide feedback.

carrodher avatar Sep 05 '22 06:09 carrodher

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.

github-actions[bot] avatar Sep 21 '22 01:09 github-actions[bot]

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.

github-actions[bot] avatar Sep 27 '22 01:09 github-actions[bot]

realpath: /bitnami/apache/conf: No such file or directory
moodle 03:29:56.37 INFO  ==> Configuring Apache ServerTokens directive
moodle 03:29:56.40 INFO  ==> Configuring PHP options
moodle 03:29:56.40 INFO  ==> Setting PHP expose_php option
moodle 03:29:56.43 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
moodle 03:29:56.44 INFO  ==> Validating settings in POSTGRESQL_CLIENT_* env vars
moodle 03:29:56.54 INFO  ==> Ensuring Moodle directories exist
moodle 03:29:56.55 INFO  ==> Trying to connect to the database server
moodle 03:30:56.69 ERROR ==> Could not connect to the database
moodle 03:31:00.32 

This affects me also with migrated database and data. (It does not affect a fresh install) Did you find a resolution?

coffseducation avatar Dec 20 '23 11:12 coffseducation