nextcloud/docker

mariaDB errors: “Aborted connection 5 to db: ‘unconnected’ user: ‘unauthenticated’ host: ‘172.21.0.3’ (This connection closed normally without authentication)”

lhoupert opened this issue · 14 comments

Since the recent update or MariaDb (11.3.2) the connectivity broke down between nextcloud and mariadb.

This can be fixed by adding addition flag to the mariadb command --character-set-server=utf8

A solution would be to update the example docker compose file with these arguments

    image: mariadb:11.3.2
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW --character-set-server=utf8

All credits for this solution go to Gypertena's reply on the nextcloud discourse .

I just raised a PR to edit the docker-compose files given as example. Let me know if I missed something.

Thx helped me also is in another docker container with the same problem

Thanks, helped me. Can confirm that it works with your changes.

Thanks a lo! Fixed also my issue with nextcloud that after update was just showing Internal Server Error in the browser.

Thank you so much, you've just saved me hours of headaches!
Well done

It took me a couple of hours to understand what was happening until I found a post on a discourse (unfortunately I don't have the link anymore). The author of the post is the one to thank :-)

Edit: I found the orginal post, I just updated the description of the issue

thank you very much!

i add the nextcloud log error message so that more people can find this solution through google:

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers in /var/www/html/lib/private/DB/Connection.php:140

Glad you all found a solution but:

In other words, this shouldn't occur if you stick with supported DB versions. :-)

FYI: MariaDB reverted the change in their image so new pulls already have it fixed there: MariaDB/mariadb-docker#565

Glad you all found a solution but:

In other words, this shouldn't occur if you stick with supported DB versions. :-)

unfortunately the default docker-compose solutions (that I use for more than 3 years) had mariadb:latest in them. So now I'm already on 11.3 and there is no easy way back to LTS...

:-(

J0WI commented

So now I'm already on 11.3 and there is no easy way back to LTS...

You can just dump the Nextcloud DB and import it on an LTS version, can't you?

Closing since there's nothing to be done here in the Docker image. Also, all references to mariadb in our example Composer files are tagged with a specific version (10.6.) presently.

In other words, this shouldn't occur if you stick with supported DB versions. :-)

Is should be also noted that MariaDB latest was by default in this repo until July 2021 1a432d9