Skip to content
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

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

Closed
lhoupert opened this issue Feb 21, 2024 · 14 comments
Labels
integration: database Integration with any Nextcloud supported database question

Comments

@lhoupert
Copy link

lhoupert commented Feb 21, 2024

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 .

@lhoupert lhoupert mentioned this issue Feb 21, 2024
@lhoupert
Copy link
Author

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

@zackmuc
Copy link

zackmuc commented Feb 21, 2024

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

@Kitt3120
Copy link

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

@sloniupl
Copy link

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

Stan-Gobien added a commit to Stan-Gobien/DockerWebserverStack that referenced this issue Feb 21, 2024
@CooperBarrett
Copy link

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

@lhoupert
Copy link
Author

lhoupert commented Feb 21, 2024

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

@celevra
Copy link

celevra commented Feb 22, 2024

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

@joshtrichards
Copy link
Member

Glad you all found a solution but:

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

@joshtrichards
Copy link
Member

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

@joshtrichards joshtrichards added the integration: database Integration with any Nextcloud supported database label Feb 26, 2024
@logopk
Copy link

logopk commented Feb 26, 2024

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...

:-(

@joshtrichards
Copy link
Member

https://mariadb.org/post-mortem-php-and-mariadb-docker-issue/

@joshtrichards joshtrichards pinned this issue Feb 27, 2024
@J0WI
Copy link
Contributor

J0WI commented Mar 4, 2024

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?

@joshtrichards
Copy link
Member

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.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@mr-flibble
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: database Integration with any Nextcloud supported database question
Projects
None yet
Development

No branches or pull requests

10 participants