The problem:

Failed to start MariaDB database server. Can’t init tc log.

 

The error_log:

# systemctl status mariadb.service
 ● mariadb.service - MariaDB database server
 Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
 Drop-In: /etc/systemd/system/mariadb.service.d
 └─foo.conf, migrated-from-my.cnf-settings.conf
 Active: failed (Result: exit-code) since Wed 2017-08-23 05:25:33 CEST; 9s ago
 Process: 31088 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Process: 15369 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Process: 15358 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
 Process: 15355 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 15369 (code=exited, status=1/FAILURE)
 Status: "MariaDB server is down"

Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287786596608 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-8...630087206
 Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287003326208 [Note] InnoDB: Dumping buffer pool(s) not yet started
 Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287786596608 [Note] Plugin 'FEEDBACK' is disabled.
 Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287786596608 [Note] Recovering after a crash using tc.log
 Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287786596608 [ERROR] Can't init tc log
 Aug 23 05:25:30 ns3367004.ip-37-187-3.eu mysqld[15369]: 2017-08-23 5:25:30 140287786596608 [ERROR] Aborting
 Aug 23 05:25:33 ns3367004.ip-37-187-3.eu systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
 Aug 23 05:25:33 ns3367004.ip-37-187-3.eu systemd[1]: Failed to start MariaDB database server.
 Aug 23 05:25:33 ns3367004.ip-37-187-3.eu systemd[1]: Unit mariadb.service entered failed state.
 Aug 23 05:25:33 ns3367004.ip-37-187-3.eu systemd[1]: mariadb.service failed.

The solution that has working several times for me:

# locate tc.log
/var/lib/mysql/tc.log
# rm /var/lib/mysql/tc.log
 rm: remove regular empty file ‘/var/lib/mysql/tc.log’? y

And trying to restart again and all right.

Advertisements