Open theTendo opened 1 year ago
not sure. i've set it up on a new container to test and it boots/reboots okay so we'll have to work out why.
Today I was able to update the docker instance from 5.6.1 to 5.6.2. The issue was that database migration from mariadbd 10.7 (used in Ampache 5.6.1) to mariadbd 10.11 (used in 5.6.2) was not being performed gracefully.
The steps to reproduce the bug should be:
docker container stop ampache
.docker-compose.yml
from 5.6.1 to 5.6.2.The steps to update from 5.6.1 to 5.6.2 successfully are:
docker exec -it ampache /bin/bash
.service mariadb stop
.docker-compose.yml
from 5.6.1 to 5.6.2.I guess this should only affect version updates but not new setups from scratch.
oh, debian upgrade!
yeah that's not great i didn't think that would cause issues but i'll put that in the readme
are there any mariadb commands we should execute on launch to pre-check for this kind of stuff?
like does it have a pre-start upgrade command?
confirming that theTendo's instructions work for me. I use podman, so it was:
podman exec -it ampache /bin/bash
And then the same.
Cheers!
should mariadb-upgrade
be added into the startup? maybe in the run.sh file for existing databases
Would it be helpful to put messages/news in the logs for things like this?
Docker can print info easily enough right?
I could put a check in referencing a wiki page of mysql fails to start?
I tried running mariadb-upgrade
as a way to fix the issue but it didn't work. When ampache:5.6.2 boots up the newer version of MariaDB is incapable of running mariadb-upgrade
from 5.6.1 to 5.6.2 because the db is corrupted and the newer version of mariadb can't restore the db from the older version.
The proper solution would be to add a mechanism that automatically executes service mariadb stop
when stopping the Ampache Docker container, but I'm unsure if it is possible to do this in Docker.
As a workaround, something that could potentially fix the issue could be:
Regarding noticing the endusers about this. I think adding a comment or linking this issue in the "Database Connection" section of the page test.php
could be useful. Something like "This attempts to connect to your database using the values read from your configuration file (note: if you are having issues upgrading from Ampache 5.6.1 to 5.6.2 using Docker check this issue)."
i merged https://github.com/ampache/ampache-docker/pull/104 which looks to shutdown mysql correctly in my testing so i'm going to rebuild master and develop now
@theTendo's fix worked for me, just for the record
This fix worked for me to but needs to be gracefully shutdown database:
docker exec -it ampache /bin/bash
mysqladmin shutdown
after that shutdown container and then bump version to 5.6.2 and docker-compose up -d
PS. without mysqladmin shutdown
maridadb leaves a redo log with old version of mariadb.
Hello, today I pulled the latest updates to the ampache:latest image and recreated the container (from 5.6.1 to 5.6.2).
With the update, Ampache says it can't connect to the database.
So I entered the container with
docker exec -it ampache /bin/bash
to try to troubleshoot the issue. After realizing that the mariadb was unable to connect to the database socket as well, I impersonated the mysql user and run the daemonmariadbd
manually.I got the following error trace:
Apparently "Upgrade after a crash is not supported. The redo log was created with MariaDB 10.5.15. You must start up and shut down MariaDB 10.7 or earlier.". So I've gone back to ampache:5.6.1 and everything works again.
I don't know if this issue affects only my setup or if it's a bug with new changes, but I wanted to bring attention to it to shed some light.