[SOLVED] MariaDB not starting after update to 6.19

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
gaggio
Posts: 17
Joined: Sat Feb 13, 2016 4:04 pm

[SOLVED] MariaDB not starting after update to 6.19

Post by gaggio »

Hi all,
as per title, I upgraded few days ago from 6.12 to 6.19. As far as I could see the update went smooth, unless discovering later that MariaDB is not running, and so Nextcloud is down too. What I can see as service status:

Code: Select all

[FAILED] DietPi-Services | mariadb     failed (Result: exit-code) since Mon 2019-01-28 16:05:44 CET; 4s ago
● mariadb.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)                                                   
   Active: failed (Result: exit-code) since Mon 2019-01-28 16:05:44 CET; 4s ago
  Process: 7753 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 7656 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && sys
temctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)                                                 
  Process: 7652 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)                   
  Process: 7649 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)                    
 Main PID: 7753 (code=exited, status=1/FAILURE)                                                                                             
   Status: "MariaDB server is down"                                                                                                         
                                                                                                                                            
Jan 28 16:05:38 piserver systemd[1]: Starting MariaDB database server...                                                                    
Jan 28 16:05:40 piserver mysqld[7753]: 2019-01-28 16:05:40 1995616256 [Note] /usr/sbin/mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as 
process 7753 ...                                                                                                                            
Jan 28 16:05:44 piserver systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE                                    
Jan 28 16:05:44 piserver systemd[1]: Failed to start MariaDB database server.
Jan 28 16:05:44 piserver systemd[1]: mariadb.service: Unit entered failed state.                                                            
Jan 28 16:05:44 piserver systemd[1]: mariadb.service: Failed with result 'exit-code'.  
Any clue? Admittedly I missed some releases...

Many thanks,
gaggio
Last edited by gaggio on Tue Feb 12, 2019 12:36 pm, edited 1 time in total.
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: MariaDB not starting after update to 6.19

Post by MichaIng »

With v6.18 we switched on Stretch from the obsolete "mysql" init.d service to the new "mariadb" systemd unit. However both start exactly the same "mysqld" binary.

This binary in your case fails to start. Since systemctl does not show a meaningful error message, could you do the following:
1. Start the systemd unit, which will fail, just to produce a new error log: systemctl start mariadb
2. Read and copy/paste the produced error logs at the end of: /var/log/mysql/error.log
2a. Alternatively you can send a bugreport then, which includes the error logs, so we can investigate our side: dietpi-bugreport
gaggio
Posts: 17
Joined: Sat Feb 13, 2016 4:04 pm

Re: MariaDB not starting after update to 6.19

Post by gaggio »

thanks for you reply, here is what I find in

Code: Select all

/var/log/mysql/error.log
after running

Code: Select all

systemctl start mariadb
:

Code: Select all

2019-01-28 23:12:36 1995603968 [Note] InnoDB: Using mutexes to ref count buffer pool pages                                    
2019-01-28 23:12:36 1995603968 [Note] InnoDB: The InnoDB memory heap is disabled                                              
2019-01-28 23:12:36 1995603968 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins                                    
2019-01-28 23:12:36 1995603968 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier                  
2019-01-28 23:12:36 1995603968 [Note] InnoDB: Compressed tables use zlib 1.2.8                                                
2019-01-28 23:12:36 1995603968 [Note] InnoDB: Using Linux native AIO                                                          
2019-01-28 23:12:37 1995603968 [Note] InnoDB: Using generic crc32 instructions                                                
2019-01-28 23:12:37 1995603968 [Note] InnoDB: Initializing buffer pool, size = 128.0M                                         
2019-01-28 23:12:37 1995603968 [Note] InnoDB: Completed initialization of buffer pool                                         
2019-01-28 23:12:37 1995603968 [Note] InnoDB: Highest supported file format is Barracuda.                                     
2019-01-28 23:12:37 1995603968 [Note] InnoDB: 128 rollback segment(s) are active.                                             
2019-01-28 23:12:37 1995603968 [Note] InnoDB: Waiting for purge to start                                                      
2019-01-28 23:12:38 1995603968 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 694570519
2019-01-28 23:12:38 1442837312 [Note] InnoDB: Dumping buffer pool(s) not yet started                                          
2019-01-28 23:12:38 1995603968 [Note] Plugin 'FEEDBACK' is disabled.                                                          
2019-01-28 23:12:38 1995603968 [Note] Recovering after a crash using tc.log                                                   
2019-01-28 23:12:38 1995603968 [ERROR] Can't init tc log                                                                      
2019-01-28 23:12:38 1995603968 [ERROR] Aborting
Unfortunately nothing meaningful to me...

Thanks,
gaggio
gaggio
Posts: 17
Joined: Sat Feb 13, 2016 4:04 pm

Re: MariaDB not starting after update to 6.19

Post by gaggio »

I also sent a bug report, reference code: 8090a244-f125-49cb-88db-abdeca23a3bc

Cheers
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: MariaDB not starting after update to 6.19

Post by MichaIng »

gaggio wrote: Mon Jan 28, 2019 11:22 pm Can't init tc log
https://bbs.archlinux.org/viewtopic.php?id=206379

Please try:

Code: Select all

mv /var/lib/mysql/tc.log /mnt/dietpi_userdata/tc.log.bak
systemctl restart mariadb
If it works, you can remove /mnt/dietpi_userdata/tc.log.bak.
gaggio
Posts: 17
Joined: Sat Feb 13, 2016 4:04 pm

Re: MariaDB not starting after update to 6.19

Post by gaggio »

This actually worked!
Thank You
Post Reply