mariadb fails to start Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
RollingDutch
Posts: 23
Joined: Thu Mar 18, 2021 9:08 am
Contact:

mariadb fails to start

Post by RollingDutch »

Don't know if this is the same problem, but all of a sudden MaraDB isn't working anymore.

Code: Select all

 mariadb.service - MariaDB 10.3.27 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/

Mar 19 23:09:41 DietPi systemd[1]: mariadb.service: Service RestartSec=5s expired, scheduling restart.
Mar 19 23:09:41 DietPi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 44.
Mar 19 23:09:41 DietPi systemd[1]: Stopped MariaDB 10.3.27 database server.
Mar 19 23:09:41 DietPi systemd[1]: Starting MariaDB 10.3.27 database server...
Mar 19 23:09:42 DietPi mysqld[14479]: 2021-03-19 23:09:42 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) s
tarting as process 14479 ...
Mar 19 23:09:42 DietPi mysqld[14479]: 2021-03-19 23:09:42 0 [Warning] Could not increase number of max_open_files to mor
e than 16384 (request: 32186)
Mar 19 23:09:42 DietPi systemd[1]: mariadb.service: Main process exited, code=killed, status=6/A
BRT
Mar 19 23:09:42 DietPi systemd[1]: mariadb.service: Failed with result 'signal'.
Mar 19 23:09:42 DietPi systemd[1]: Failed to start MariaDB 10.3.27 database server.
Mar 19 23:09:43 DietPi systemd[1]: Stopped MariaDB 10.3.27 database server.
root@DietPi:~# systemctl start mariadb
Job for mariadb.service failed because a fatal signal was delivered to the control process.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
root@DietPi:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.27 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: signal) since Fri 2021-03-19 23:10:15 CET; 4s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 14743 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS
)
  Process: 14744 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCES
S)
  Process: 14746 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/ga
lera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/
SUCCESS)
  Process: 14802 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed
, signal=ABRT)
 Main PID: 14802 (code=killed, signal=ABRT)
User avatar
MichaIng
Site Admin
Posts: 3032
Joined: Sat Nov 18, 2017 6:21 pm

Re: mariadb fails to start

Post by MichaIng »

Please show the error log:

Code: Select all

cat /var/log/mysql/error.log
If it's empty, try again to start the service to create a fresh error log.
User avatar
Joulinar
Posts: 4845
Joined: Sat Nov 16, 2019 12:49 am

Re: mariadb fails to start

Post by Joulinar »

I split the topic into it's own one as usually there are different challenges. Let's check the entire stack

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
RollingDutch
Posts: 23
Joined: Thu Mar 18, 2021 9:08 am
Contact:

Re: mariadb fails to start

Post by RollingDutch »

Atm this is obsulete now, since the Pi did die on me :(
User avatar
Joulinar
Posts: 4845
Joined: Sat Nov 16, 2019 12:49 am

Re: mariadb fails to start

Post by Joulinar »

means the physical device is dead completely? Sorry for that.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
RollingDutch
Posts: 23
Joined: Thu Mar 18, 2021 9:08 am
Contact:

Re: mariadb fails to start

Post by RollingDutch »

so, the problem with Mariadb is back :(

These are the output of the given commands.

Code: Select all

cat /var/log/mysql/error.log
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             3570                 3570                 processes
Max open files            16384                16384                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       3570                 3570                 signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: core

Code: Select all

readlink /var/lib/mysql
/mnt/dietpi_userdata/mysql

Code: Select all

readlink -f /var/lib/mysql
/mnt/dietpi_userdata/mysql
User avatar
Joulinar
Posts: 4845
Joined: Sat Nov 16, 2019 12:49 am

Re: mariadb fails to start

Post by Joulinar »

are you sure you copied the error log? As this is not a content I expect :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
RollingDutch
Posts: 23
Joined: Thu Mar 18, 2021 9:08 am
Contact:

Re: mariadb fails to start

Post by RollingDutch »

Just checked with

nano error.log

Code: Select all

2021-05-17 12:17:04 0 [Note] InnoDB: Using Linux native AIO
2021-05-17 12:17:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-05-17 12:17:04 0 [Note] InnoDB: Uses event mutexes
2021-05-17 12:17:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-05-17 12:17:04 0 [Note] InnoDB: Number of pools: 1
2021-05-17 12:17:04 0 [Note] InnoDB: Using generic crc32 instructions
2021-05-17 12:17:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-05-17 12:17:04 0 [Note] InnoDB: Completed initialization of buffer pool
2021-05-17 12:17:04 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be ch$
2021-05-17 12:17:04 0 [ERROR] InnoDB: Space id and page no stored in the page, read in are [page id: space=4294967295, $
2021-05-17 12:17:04 0 [ERROR] InnoDB: Page [page id: space=4294967295, page number=4294967295] log sequence number 1844$
2021-05-17 12:17:04 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not$
2021-05-17 12:17:04 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace innodb_syste$
2021-05-17 12:17:04 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff$InnoDB: End of page dump
2021-05-17 12:17:05 0 [Note] InnoDB: Uncompressed page, stored checksum in field1 4294967295, calculated checksums for $
2021-05-17 12:17:05 0 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache an$
2021-05-17 12:17:05 0 [ERROR] [FATAL] InnoDB: Aborting because of a corrupt database page.
210517 12:17:05 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs
[/cat]

Prev. I just copied what I was seeing on the screen.
User avatar
Joulinar
Posts: 4845
Joined: Sat Nov 16, 2019 12:49 am

Re: mariadb fails to start

Post by Joulinar »

Did you use a SD card? probably the same as before where your system already died on?

Because it seem you have data corruption.

Code: Select all

[ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace
There could be physical issues on the SD card, if it is still the same one leading to data corruption again.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
RollingDutch
Posts: 23
Joined: Thu Mar 18, 2021 9:08 am
Contact:

Re: mariadb fails to start

Post by RollingDutch »

It was the same SD-card as before. Will try another one this weekend. Now I must find a way to get a backup of the WordPress database.

(sory for replying so late, but had some personal problems)
Post Reply