Koozali.org: home of the SME Server

mariadb

Offline adili

  • *
  • 27
  • +0/-0
mariadb
« on: August 28, 2023, 05:14:39 PM »
Bonjour,

smeserver v 10.1
Suite a une coupure d'alimentation mariadb ne fonctionne plus.
J'obtiens cette erreur au lancement de mysql:
Code: [Select]
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Si je redémarre le service (systemctl restart mariadb)

Code: [Select]
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
et le journalctl:
Code: [Select]
-- L'unité (unit) mariadb.service a échoué, avec le résultat failed.
août 28 17:01:36 server-perso.diligent.fr systemd[1]: Unit mariadb.service entered failed state.
août 28 17:01:36 server-perso.diligent.fr systemd[1]: mariadb.service failed.
août 28 17:01:44 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:01:44 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=zahid rhost=127
août 28 17:01:47 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(zahid,127.0.0.1,<7iwH+fwDptd/AAAB>): unknown user
août 28 17:01:49 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 5 secs): user=<zahid>, method=PLAIN, rip=127.0.
août 28 17:01:55 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:01:55 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=shop.db rhost=1
août 28 17:01:58 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(shop.db,127.0.0.1,<2hFw+fwDqNd/AAAB>): unknown user
août 28 17:02:00 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 9 secs): user=<shop.db>, method=PLAIN, rip=127.
août 28 17:02:14 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:02:14 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=appdev rhost=12
août 28 17:02:16 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(appdev,127.0.0.1,<jHLD+vwDqtd/AAAB>): unknown user
août 28 17:02:18 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 4 secs): user=<appdev>, method=PLAIN, rip=127.0
août 28 17:02:23 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:02:23 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=srodriguez rhos
août 28 17:02:26 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(srodriguez,127.0.0.1,<cuUc+/wDrNd/AAAB>): unknown user
août 28 17:02:28 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 9 secs): user=<srodriguez>, method=PLAIN, rip=1
août 28 17:02:29 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:02:29 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=jonah rhost=127
août 28 17:02:30 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(jonah,127.0.0.1,<8at0+/wDrtd/AAAB>): unknown user
août 28 17:02:32 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 7 secs): user=<jonah>, method=PLAIN, rip=127.0.
août 28 17:02:53 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:02:53 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=smarthome rhost
août 28 17:02:54 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(smarthome,127.0.0.1,<tikc/fwDsNd/AAAB>): unknown user
août 28 17:02:56 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 3 secs): user=<smarthome>, method=PLAIN, rip=12
août 28 17:03:10 server-perso.diligent.fr dovecot[2383]: imap-login: Login: user=<admin>, method=PLAIN, rip=192.168.0.254, lip=192.168.0.60, mpid=5937, TLS,
août 28 17:03:10 server-perso.diligent.fr dovecot[2383]: imap-login: Login: user=<andre>, method=PLAIN, rip=192.168.0.254, lip=192.168.0.60, mpid=5935, TLS,
août 28 17:03:10 server-perso.diligent.fr dovecot[2383]: imap(admin): Connection closed (SELECT finished 0.149 secs ago) in=129 out=974
août 28 17:03:10 server-perso.diligent.fr dovecot[2383]: imap(andre): Connection closed (SELECT finished 0.079 secs ago) in=194 out=1723
août 28 17:03:11 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:03:11 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=amish rhost=127
août 28 17:03:12 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(amish,127.0.0.1,<BUDt/fwDstd/AAAB>): unknown user
août 28 17:03:14 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 7 secs): user=<amish>, method=PLAIN, rip=127.0.
août 28 17:03:22 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): check pass; user unknown
août 28 17:03:22 server-perso.diligent.fr auth[5597]: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=interest rhost=
août 28 17:03:23 server-perso.diligent.fr dovecot[2383]: auth-worker(5597): pam(interest,127.0.0.1,<eZVX/vwDtNd/AAAB>): unknown user
août 28 17:03:25 server-perso.diligent.fr dovecot[2383]: imap-login: Disconnected (auth failed, 1 attempts in 11 secs): user=<interest>, method=PLAIN, rip=12

J'ai essayé de réinstaller mariadb sans succès

Merci pour votre aide

André


Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: mariadb
« Reply #1 on: August 28, 2023, 06:07:05 PM »
The authentication failures you have shown in your log are nothing to do with Maria DB.

They are people trying to authenticate against dovecot/mail.

Show:

Code: [Select]
journalctl -u mariadb
Code: [Select]
systemctl status mariadb

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline adili

  • *
  • 27
  • +0/-0
Re: mariadb
« Reply #2 on: August 29, 2023, 07:33:48 AM »
The authentication failures you have shown in your log are nothing to do with Maria DB.

They are people trying to authenticate against dovecot/mail.

Show:

Code: [Select]
journalctl -u mariadb
Code: [Select]
systemctl status mariadb

Excusez moi, hier j'étais un peu pertubé, voici le journalctl ainsi que le status de mariadb ce matin
Code: [Select]
août 29 07:03:26 server-perso.diligent.fr systemd[1]: Starting MariaDB database server...
août 29 07:03:27 server-perso.diligent.fr mariadb-initialize[10887]: 230829  7:03:27 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB)
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service: control process exited, code=exited status=1
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Failed to start MariaDB database server.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Unit mariadb.service entered failed state.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service failed.


Code: [Select]
systemctl status mariadb
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/mariadb.service.d
           └─50koozali.conf
   Active: failed (Result: exit-code) since mar. 2023-08-29 07:03:33 CEST; 13min ago
  Process: 10887 ExecStartPre=/sbin/e-smith/systemd/mariadb-initialize (code=exited, status=1/FAILURE)
  Process: 10884 ExecStartPre=/sbin/e-smith/expand-template /etc/my.cnf (code=exited, status=0/SUCCESS)
  Process: 10881 ExecStartPre=/sbin/e-smith/expand-template /root/.my.cnf (code=exited, status=0/SUCCESS)
  Process: 10878 ExecStartPre=/sbin/e-smith/expand-template /var/lib/mysql/set.password (code=exited, status=0/SUCCESS)
  Process: 10873 ExecStartPre=/sbin/e-smith/service-status mariadb (code=exited, status=0/SUCCESS)

août 29 07:03:26 server-perso.diligent.fr systemd[1]: Starting MariaDB database server...
août 29 07:03:27 server-perso.diligent.fr mariadb-initialize[10887]: 230829  7:03:27 [Note] /usr/libexec/mysqld (mysqld 5.5.68-M... ...
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service: control process exited, code=exited status=1
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Failed to start MariaDB database server.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Unit mariadb.service entered failed state.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service failed.

Offline adili

  • *
  • 27
  • +0/-0
Re: mariadb
« Reply #3 on: August 29, 2023, 10:49:15 AM »
Excusez moi, hier j'étais un peu pertubé, voici le journalctl ainsi que le status de mariadb ce matin
Code: [Select]
août 29 07:03:26 server-perso.diligent.fr systemd[1]: Starting MariaDB database server...
août 29 07:03:27 server-perso.diligent.fr mariadb-initialize[10887]: 230829  7:03:27 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB)
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service: control process exited, code=exited status=1
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Failed to start MariaDB database server.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Unit mariadb.service entered failed state.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service failed.


Code: [Select]
systemctl status mariadb
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/mariadb.service.d
           └─50koozali.conf
   Active: failed (Result: exit-code) since mar. 2023-08-29 07:03:33 CEST; 13min ago
  Process: 10887 ExecStartPre=/sbin/e-smith/systemd/mariadb-initialize (code=exited, status=1/FAILURE)
  Process: 10884 ExecStartPre=/sbin/e-smith/expand-template /etc/my.cnf (code=exited, status=0/SUCCESS)
  Process: 10881 ExecStartPre=/sbin/e-smith/expand-template /root/.my.cnf (code=exited, status=0/SUCCESS)
  Process: 10878 ExecStartPre=/sbin/e-smith/expand-template /var/lib/mysql/set.password (code=exited, status=0/SUCCESS)
  Process: 10873 ExecStartPre=/sbin/e-smith/service-status mariadb (code=exited, status=0/SUCCESS)

août 29 07:03:26 server-perso.diligent.fr systemd[1]: Starting MariaDB database server...
août 29 07:03:27 server-perso.diligent.fr mariadb-initialize[10887]: 230829  7:03:27 [Note] /usr/libexec/mysqld (mysqld 5.5.68-M... ...
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service: control process exited, code=exited status=1
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Failed to start MariaDB database server.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: Unit mariadb.service entered failed state.
août 29 07:03:33 server-perso.diligent.fr systemd[1]: mariadb.service failed.

Pour l'instant j'ai installé mariadb105, et en créant un lien symbolique /var/lib/mysql/mysql.sock vers /var/lib/mysql/mariadb105.sock, toutes les commandes mysql utilisent la version 10.5, c'est transparent, seul owncloud installé dans une ibay a dû être reconfiguré.

Tous fonctionne correctement en attendant de trouver une solution pour mysql


Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: mariadb
« Reply #4 on: August 29, 2023, 06:00:58 PM »
It would help a lot if you stuck to one thing at a time and stopped trying to hack your way around an issue. You are likely to make a bad problem worse.

Quote
and creating a symlink /var/lib/mysql/mysql.sock to /var/lib/mysql/mariadb105.sock, all mysql commands use version 10.5

You think this is a suitable solution? Do you know what else your DB might be used for?

Have you taken the time to read about the differences between the database versions and the issues you are likely to face?

See:

https://xyproblem.info/


In the meantime, why doesn't Maria start?

If you don't know about how to debug this then you probably should not be doing what you did above......

Have you checked the maria logs?

Code: [Select]
cat /var/log/mariadb/mariadb.log

What errors does it show?

I really suggest you fix this first before trying to break your server.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline adili

  • *
  • 27
  • +0/-0
Re: mariadb
« Reply #5 on: August 30, 2023, 02:20:43 PM »
It would help a lot if you stuck to one thing at a time and stopped trying to hack your way around an issue. You are likely to make a bad problem worse.

You think this is a suitable solution? Do you know what else your DB might be used for?

Have you taken the time to read about the differences between the database versions and the issues you are likely to face?

See:

https://xyproblem.info/


In the meantime, why doesn't Maria start?

If you don't know about how to debug this then you probably should not be doing what you did above......

Have you checked the maria logs?

Code: [Select]
cat /var/log/mariadb/mariadb.log

What errors does it show?

I really suggest you fix this first before trying to break your server.

Mon maria log

Code: [Select]
cat /var/log/mariadb/mariadb.log
230830 11:56:25 InnoDB: The InnoDB memory heap is disabled
230830 11:56:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
230830 11:56:25 InnoDB: Compressed tables use zlib 1.2.7
230830 11:56:25 InnoDB: Using Linux native AIO
230830 11:56:25 InnoDB: Initializing buffer pool, size = 128.0M
230830 11:56:25 InnoDB: Completed initialization of buffer pool
230830 11:56:25 InnoDB: highest supported file format is Barracuda.
230830 11:56:25  InnoDB: Waiting for the background threads to start
230830 11:56:26 Percona XtraDB (http://www.percona.com) 5.5.61-MariaDB-38.13 started; log sequence number 2798581618
230830 11:56:26 [Note] Plugin 'FEEDBACK' is disabled.
ERROR: 130  Incorrect file format 'user'
230830 11:56:26 [ERROR] Aborting

230830 11:56:26  InnoDB: Starting shutdown...
230830 11:56:30  InnoDB: Shutdown completed; log sequence number 2798581618
230830 11:56:30 [Note] /usr/libexec/mysqld: Shutdown complete

Si j'ai posté sue ce forum c'est pour obtenir de l'aide et non des critiques car le problème que je rencontre dépasse mes compétences.

Mon serveur continue de fonctionner avec la solution indiquée ce qui est le plus important.

Salutations

Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: mariadb
« Reply #6 on: August 30, 2023, 03:00:06 PM »
Quote
If I posted on this forum it is to get help and not criticism because the problem I am having is beyond my skills.

In which case please read the previous link and understand that if you don't know the answers, don't go rushing ahead doing things you do not understand. You will just make it worse and quite possibly harder to fix. If the error was beyond your skills then your attempt at a "fix" was as well.

If you experience errors, just stop, and fix it.

Note that when you do updates/upgrades etc there is an assumption that databases work and are not broken even of they have no data. If they are broken it can prevent other system actions. it is a very dangerous place for your server to be.

Quote
My server continues to work with the indicated solution which is the most important.

It is not a solution. It is a workaround.

Code: [Select]
ERROR: 130  Incorrect file format 'user'
You obviously did not check the wiki which we spend a lot of time writing and is the first place to look for people who do not understand.

Here is your solution:

https://wiki.koozali.org/MySQL#MariaDB.2FMySQL_fails_to_start


...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline adili

  • *
  • 27
  • +0/-0
Re: mariadb
« Reply #7 on: August 31, 2023, 01:51:57 PM »
In which case please read the previous link and understand that if you don't know the answers, don't go rushing ahead doing things you do not understand. You will just make it worse and quite possibly harder to fix. If the error was beyond your skills then your attempt at a "fix" was as well.

If you experience errors, just stop, and fix it.

Note that when you do updates/upgrades etc there is an assumption that databases work and are not broken even of they have no data. If they are broken it can prevent other system actions. it is a very dangerous place for your server to be.

It is not a solution. It is a workaround.

Code: [Select]
ERROR: 130  Incorrect file format 'user'
You obviously did not check the wiki which we spend a lot of time writing and is the first place to look for people who do not understand.

Here is your solution:

https://wiki.koozali.org/MySQL#MariaDB.2FMySQL_fails_to_start

Problème résolu
Merci pour tout
Cordialement

Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: mariadb
« Reply #8 on: September 01, 2023, 10:34:23 PM »
 8-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation