Problem with MariaBD, could you help me?

Hi, since this afternoon, i encounter a serious problem with my nextcloud install. when i tried to connect, instead of my usual login screen, i got the first install and setup screen.

Then, i connected it through SSH, and check the MariaDB access with : systemctl status mariadb.service

then, i got that :

● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-10-16 16:07:16 UTC; 3min 50s ago
Process: 1236 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 1233 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
Process: 1135 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environmen
Process: 1131 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 1128 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 1236 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1988952064 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequenc
Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1420911424 [Note] InnoDB: Dumping buffer pool(s) not yet started
Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1988952064 [Note] Plugin ‘FEEDBACK’ is disabled.
Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1988952064 [Note] Recovering after a crash using tc.log
Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1988952064 [ERROR] Can’t init tc log
Oct 16 16:07:13 raspberrypi mysqld[1236]: 2017-10-16 16:07:13 1988952064 [ERROR] Aborting
Oct 16 16:07:16 raspberrypi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 16:07:16 raspberrypi systemd[1]: Failed to start MariaDB database server.
Oct 16 16:07:16 raspberrypi systemd[1]: mariadb.service: Unit entered failed state.
Oct 16 16:07:16 raspberrypi systemd[1]: mariadb.service: Failed with result ‘exit-code’.

I’m not very comfortable with Linux system, as i’m using windows server usually, so, can you help me ? it seems that MariaDB crashed and won’t restart correctly.

Your on a Raspberry Pi so I assume it’s local and you have access.

I would run “top” and just check your database isn’t being spam written to by some code mess up (will be at top with loads of CPU and or memory)

Assuming it isn’t I would just “sudo restart” to do a system shutdown and reup and let apache and maria services reload

Hi Spike, and thanks.

It is a raspberrypi, but it is a distant system. I’ve already tried to restart it, but mariadb didn’t restart correctly. Neither trying to start it manually with systemctl start mariadb.service

Any luck checking the log files of maria and nextcloud?

Check maria log location with: grep -R log_error /etc/mysql/*

Nextcloud is in admin settings under logging

If not you could try dropping the database and reinstalling maria/using sqlite instead
^^ if the installation is pretty fresh of course