ct-Open-Source / team-container

A collection of containers to prepare a server for collaboration.
117 stars 40 forks source link

CrashLoopBackOff nextcloud-team-nextcloud-db #76

Open kdeiss opened 2 years ago

kdeiss commented 2 years ago

NextCloud not working anymore. I found out that this is caused by mariadb.

kubectl logs -f nextcloud-team-nextcloud-db-76c6ccb6fc-jgnhs 2022-09-01 10:30:31+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.9.2+maria~ubu2204 started. 2022-09-01 10:30:31+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2022-09-01 10:30:31+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.9.2+maria~ubu2204 started. 2022-09-01 10:30:31+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required 2022-09-01 10:30:31+00:00 [Note] [Entrypoint]: MariaDB upgrade (mariadb-upgrade) required, but skipped due to $MARIADB_AUTO_UPGRADE setting 2022-09-01 10:30:31 0 [Note] mariadbd (server 10.9.2-MariaDB-1:10.9.2+maria~ubu2204) starting as process 1 ... bla bla 2022-09-01 10:30:31 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.5.4.

How can I fix this? I tried already to edit deploy_database.yaml (image: mariadb:10.5) but that alone did not help.

I have to use a helm command to bring this modified configuration to run?

Sorry - no idea of kubenet

esbef commented 2 years ago

Hi,

I had the same issue here. In my case, nextcloud-DB-pod with mariaDB was constantly crashing because of an inconsistency in its binary logfiles. You can check this in your local logfiles. If you have in

/var/log/pods/'your-nextcloud-DB-pod-ID'/'somedirectoryname'/'whatevernumber'.log

an [ERROR] like

InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10...

then read on.

I specifically had to empty (IMPORTANT: not delete!) the binary logfile "ib_logfile0" in

/var/lib/rancher/k3s/storage/'somedirectoryname'/

Then update nextcloud with the usual helm upgrade command. The DB-pod should start again without CrashLoop.

In my specific case, I had trouble with the depending update of nextcloud to 24.0.5 afterwards. It was aborted because a change of major versions is not supported.

I had a version 22.6.x version installed. Changing the version number in

/var/lib/rancher/k3s/storage/'somedirectoryname'/config/config.php

from 22.6.x to 23.0.0

did the trick. Everything is running stable so far again.

Cheers!