MariaDB nor starting after upgrade Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
g7kse
Posts: 5
Joined: Fri May 28, 2021 5:31 pm

MariaDB nor starting after upgrade

Post by g7kse »

Usual thing. Ran an upgrade via ssh and now get a Mariadb error which seems to return a failure at ths point when doing a systemctl status mariadb.service

Code: Select all

ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
any clues on where to look? Its a RPI3 with open beta v7.2
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: MariaDB nor starting after upgrade

Post by Joulinar »

Hi,

pls can you post following

Code: Select all

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 5
Joined: Fri May 28, 2021 5:31 pm

Re: MariaDB nor starting after upgrade

Post by g7kse »

super quick :-)

systemctl restart mariadb.service

Code: Select all

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
journalctl -u mariadb

Code: Select all

-- Logs begin at Thu 2019-02-14 10:11:58 GMT, end at Fri 2021-05-28 17:21:28 BST. --
May 28 16:21:37 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB
-0+deb10u1) starting as process 784 ...
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Warning] Could not increase number of max_open
_files to more than 16384 (request: 32186)
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [Warning] Can't create test file /var/lib/mysql
/DietPi.lower-test
May 28 16:21:38 DietPi mysqld[784]: [97B blob data]
May 28 16:21:38 DietPi mysqld[784]: 2021-05-28 16:21:38 0 [ERROR] Aborting
May 28 16:21:38 DietPi systemd[1]: mariadb.service: Main process exited, code=exi
ted, status=1/FAILURE
May 28 16:21:38 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code
'.
May 28 16:21:38 DietPi systemd[1]: Failed to start MariaDB 10.3.27 database serve
r.
May 28 17:20:30 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaD
B-0+deb10u1) starting as process 4695 ...
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Warning] Could not increase number of max_ope
n_files to more than 16384 (request: 32186)
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [Warning] Can't create test file /var/lib/mysq
l/DietPi.lower-test
May 28 17:20:30 DietPi mysqld[4695]: [97B blob data]
May 28 17:20:30 DietPi mysqld[4695]: 2021-05-28 17:20:30 0 [ERROR] Aborting
May 28 17:20:30 DietPi systemd[1]: mariadb.service: Main process exited, code=exi
ted, status=1/FAILURE
May 28 17:20:30 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code
'.
May 28 17:20:30 DietPi systemd[1]: Failed to start MariaDB 10.3.27 database serve
r.
error log seems to be empty ?

readlink /var/lib/mysql

Code: Select all

/mnt/dietpi_userdata/mysql
Thinking that there's no mount to userdata?
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: MariaDB nor starting after upgrade

Post by Joulinar »

what is the output of

Code: Select all

readlink -f /var/lib/mysql
can you check if the logfile is present

Code: Select all

ls -la /var/log/mysql/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 5
Joined: Fri May 28, 2021 5:31 pm

Re: MariaDB nor starting after upgrade

Post by g7kse »

no output on the first and there is a log file present but it is empty
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: MariaDB nor starting after upgrade

Post by Joulinar »

Did you moved your user data to an external disk?

Can you share

Code: Select all

ls -la /mnt
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 5
Joined: Fri May 28, 2021 5:31 pm

Re: MariaDB nor starting after upgrade

Post by g7kse »

Sorry, went away for a few days. Yes user data is on an external drive

output is

Code: Select all

total 20
drwxr-xr-x  7 root root 4096 May  4 12:29 .
drwxr-xr-x 21 root root 4096 Jul 30  2020 ..
drwxr-xr-x  2 root root 4096 Aug 21  2020 01D553FD79041680
drwxr-xr-x  2 root root 4096 Mar 29  2020 1cf60123-35fa-4bae-978a-12c82d1b3b26
lrwxrwxrwx  1 root root   57 Mar 29  2020 dietpi_userdata -> /mnt/1cf60123-35fa-4bae-978a-12c82d1b3b26/dietpi_userdata
drwxr-xr-x  2 root root 4096 Jan  7  2020 ftp_client
drwxr-xr-x  2 root root    0 Feb 14  2019 samba
drwxr-xr-x  2 root root    0 Feb 14  2019 samba22
g7kse
Posts: 5
Joined: Fri May 28, 2021 5:31 pm

Re: MariaDB nor starting after upgrade

Post by g7kse »

I think I've got it. Had to re-mount the user data folder on the external drive and it seems to be happy. I think I'll keep an eye on this for a while but worth the post in case others get the same issue / errors :D
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: MariaDB nor starting after upgrade

Post by Joulinar »

probably your system lost connection to the external disk. good that it is working now.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply