Closed zell-mbc closed 4 months ago
It seems you have 2 problems related to your healthchecks.
The issue on humhub-db seems due to the healthcheck. You probably have something like this in your docker-compose:
healthcheck:
test: ["CMD", "mysqladmin", "--user=root", "--password=blahblah", "ping", "--silent"]
Instead you should use something like this:
healthcheck:
test: ["CMD", "healthcheck.sh", "--innodb_initialized"]
Since a few releases, the mariadb image embeds a healthcheck script. Note that it requires a specific user to be configured manually if you installed the DB before it was implemented.
The second seems due to your humhub healthcheck. My check is done like this:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/ping"]
If you need more support, please add your docker-compose file (with any secret removed !).
Oh dear, almost embarrassing :-) You were spot on, plenty of health-checks in my docker-compose.yml.
test: ["CMD", "mysqladmin", "--password=${MARIADB_ROOT_PASSWORD}", "ping", "--silent"]
the error is gone.I will look into the more current check you proposed nonetheless.
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/ping"]
interval: 30s
timeout: 10s
retries: 3
I tried the curl command from within the container and got an error as well.
# curl -f http://localhost/ping
curl: (22) The requested URL returned error: 403
Unless you got an idea why this check might not work right away, I will happily do my research from here on
Edit: Found a nice write-up on topic #1, https://stackoverflow.com/questions/76076357/how-do-i-correctly-implement-the-tests-requiring-usage-in-the-healthcheck-sh-scr which along the way solved a few more startup warnings.
Edit2:
changed #2 from localhost to 127.0.0.1 and now this test seems to work as well. Case closed and thanks again!
humhub-app | - - 15/May/2024:19:47:54 +0000 "GET /ping" 200
Been using this image for a while as a test case for a few users, really appreciate the work which went into this! Currently on v1.15.0 because v1.15.4 crashes and I haven't found time to investigate yet.
So far everything seems to be working fine for months, except for some log entries which I can't explain:
Approximately every minute I keep on getting the errors below in my docker log:
The way I understand this is that this is about a feature of MariaDB/MySql which allows root to logon without a password, which apparently isn't working. Confirmed by this:
I can logon just fine when I add the -p parameter and provide the password manually. After reading up on this I think I need to install
auth_socket.so
to enable socket based authentication but the file doesn't seem to exist?This leads to my questions:
- ./logs:/var/www/localhost/htdocs/protected/runtime/logs
as a volume