MariaDB server is down

Aïe… j’ai plus de mysql suite à un redémarrage du serveur…
voici les commandes :

systemctl start mysql
Failed to start mysql.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status mysql.service' for details.

et …

systemctl status mysql.service
● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-04-08 20:06:39 CEST; 53s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 27141 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 27091 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=exit
ed, status=0/SUCCESS)
  Process: 27085 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 27080 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 27141 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

J’ai essayé ça…

systemctl enable mariadb.service
Failed to enable unit: The name org.freedesktop.PolicyKit1 was not provided by any .service files

que te donnent ces 1eres commandes?

sudo journalctl -xe

puis

df

Je pense que c’est le meme problème ouvert il y a quelques heures aussi appelé “MySQL statut échoué”

Merci pour la réponse,

voici la première commande :

sudo journalctl -xe
-- Logs begin at Tue 2019-04-09 05:34:00 CEST, end at Tue 2019-04-09 09:16:58 CEST. --
Apr 09 09:11:37 vincentux.fr bundle[878]: 2019-04-09T07:11:37.565Z 878 TID-owta06vvu LinkCrawlWorker JID-4c321a7a52cb46415963945
3 INFO: start
Apr 09 09:11:37 vincentux.fr bundle[878]: 2019-04-09T07:11:37.571Z 878 TID-owta06vvu LinkCrawlWorker JID-4c321a7a52cb46415963945
3 INFO: done: 0.006 sec
Apr 09 09:11:39 vincentux.fr systemd[1]: libreerp.service: Service hold-off time over, scheduling restart.
Apr 09 09:11:39 vincentux.fr systemd[1]: Stopped libreerp.
-- Subject: Unit libreerp.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit libreerp.service has finished shutting down.
Apr 09 09:11:39 vincentux.fr systemd[1]: Started libreerp.
-- Subject: Unit libreerp.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit libreerp.service has finished starting up.
-- 
-- The start-up result is done.
Apr 09 09:11:39 vincentux.fr systemd[13252]: libreerp.service: Failed at step USER spawning /var/www/libreerp/venv/bin/p
ython: No such process
-- Subject: Process /var/www/libreerp/venv/bin/python could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The process /var/www/libreerp/venv/bin/python could not be executed and failed.
-- 
-- The error number returned by this process is 3.
Apr 09 09:11:39 vincentux.fr systemd[1]: libreerp.service: Main process exited, code=exited, status=217/USER
Apr 09 09:11:39 vincentux.fr systemd[1]: libreerp.service: Unit entered failed state.
Apr 09 09:11:39 vincentux.fr systemd[1]: libreerp.service: Failed with result 'exit-code'.
Apr 09 09:11:43 vincentux.fr systemd[1]: libreerp.service: Service hold-off time over, scheduling restart.
Apr 09 09:11:43 vincentux.fr systemd[1]: Stopped libreerp.
-- Subject: Unit libreerp.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit libreerp.service has finished shutting down.
Apr 09 09:11:43 vincentux.fr systemd[1]: Started libreerp.
-- Subject: Unit libreerp.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit libreerp.service has finished starting up.

et la deuxième (qui est peut-être la cause) :
faut que je trouve se qui prend de la place comme ça :thinking:

df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev             1964448        0   1964448   0% /dev
tmpfs             395264    40136    355128  11% /run
/dev/sda1       41266380 39050904    507672  99% /
tmpfs            1976300       84   1976216   1% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            1976300        0   1976300   0% /sys/fs/cgroup

Il semble que ta partition sda1 est quasi pleine.
Plusieurs installs de Libreerp pourraient en etre la cause.
Libere de l espace sur cette partition (elever des apps non utiles et Libreerp à partir de l administration yunohost)
Puis en ligne de commande (root)

apt autoclean
apt autoremove
Apt update
Apt dist-upgrade
Reboot

Merci, mais c’est quoi Libreerp ?

cela doit être une app que tu as voulu installer précédemment odoo libreerp https://github.com/YunoHost-Apps/libreerp_ynh

J’ai supprimé Hubzilla mais j’ai toujours ça :

sudo find / -size +100M
/var/log/daemon.log.1
/var/lib/mysql/hubzilla/item.ibd
/var/lib/mysql/hubzilla/photo.ibd
/var/lib/postgresql/9.6/main/base/16385/17068
/proc/kcore
find: ‘/proc/25278/task/25278/fd/6’: No such file or directory
find: ‘/proc/25278/task/25278/fdinfo/6’: No such file or directory
find: ‘/proc/25278/fd/5’: No such file or directory
find: ‘/proc/25278/fdinfo/5’: No such file or directory
/home/yunohost.backup/archives/hubzilla-pre-upgrade1.tar.gz
/home/yunohost.backup/archives/mastodon-pre-upgrade1.tar.gz
/root/.cargo/registry/index/github.com-1ecc6299db9ec823/.git/objects/pack/pack-dc073085be4a0164edf823a3e8f71d902d7f1f12.pack

tu peux supprimer des sauvegardes dont tu n as plus besoin à partir de l administration yunohost (ou directement en ssh dans “/home/yunohost.backup/archives”
puis reviens avec le retour de commande

df

Bon j’ai gagné un peut de place,
mais je n’arrive toujours pas à lancer mysql :

sudo systemctl status mysql.service
● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-04-09 11:55:44 CEST; 10min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 1181 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 981 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: 961 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 911 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 1181 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [Note] InnoDB: Waiting for purge to start
Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.41-84.1 started; log sequence number 5199729001
Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [Note] Plugin 'FEEDBACK' is disabled.
Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [Note] Recovering after a crash using tc.log
Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [ERROR] Can't init tc log
Apr 09 11:55:42 vincentux.fr mysqld[1181]: 2019-04-09 11:55:42 140710644190592 [ERROR] Aborting
Apr 09 11:55:44 vincentux.fr systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 09 11:55:44 vincentux.fr systemd[1]: Failed to start MariaDB 10.1.37 database server.
Apr 09 11:55:44 vincentux.fr systemd[1]: mariadb.service: Unit entered failed state.
Apr 09 11:55:44 vincentux.fr systemd[1]: mariadb.service: Failed with result 'exit-code'.

pistes pour resoudre ton problème

Essaye ceci :

mv /var/lib/mysql/tc.log /tmp/tc.log.old

puis tente de redémarrer mysql

2 Likes

Bonjour Alex,
J’ai essayé de mon côté.
Résultat:
Impossible de démarrer le service «mysql» Journaux récents: - Pas d’entrées -
:frowning:

C’est reparti, merci :wink:

Super, j’avais ce souci, ta commande m’as sauvé le coup =) Merci !