Notification! Services Failed

How I can disable notification for services when they failed,

because every 5 minutes I get email about failed service,

Can't connect to MySQL localhost
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

I would suggest to check why your mariadb/mysql server is down instead disabling the notification…

It is caused by v-update-rrd-mysql…

I am trying to fix from: 6 hours, I just updated Hestia, and reboot

Please any other hint.

Check mysql service status, you should know how to do that :slight_smile:.

Checked!

found two kind errors.

in file /etc/mysql/my.cnf 2 line start with /var/ but in error without /var/

also both directories are empty, no file mysqld.pid, mysqld.sock

ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2)

pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysqld/mysqld.sock

/var/run/ is a symlink /run/

systemctl status mysql

● mariadb.service - MariaDB 10.6.11 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Fri 2023-01-27 16:55:28 UTC; 49min ago
Docs: man:mariadbd(8)
systemd - MariaDB Knowledge Base
Process: 44690 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 44699 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 44705 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=cd /usr/bin/..; /usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP>
Process: 44819 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 44819 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Jan 27 16:55:28 ns1003187.us systemd[1]: Starting MariaDB 10.6.11 database server…
Jan 27 16:55:28 ns1003187.us mariadbd[44819]: 2023-01-27 16:55:28 0 [Note] /usr/sbin/mariadbd (server 10.6.11-MariaDB-1:10.6.11+maria~ubu2004) starting as process 44819 …
Jan 27 16:55:28 ns1003187.us systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 16:55:28 ns1003187.us systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Jan 27 16:55:28 ns1003187.us systemd[1]: Failed to start MariaDB 10.6.11 database server.


Good luck with debugging…

is there any way to create these file mysqld.pid, mysqld.sock

Make sure mysql can start it is currently down. You need to fix the error…

What should do I here, when no luck,

Google or hire somebody who can help…

Sometimes MySQL doesn’t start because there is no more space in the disk

Try:
df -h | grep ‘100%’
to see if a disk is at 100% capacity

Thank you for suggestion,

now I am just looking to stop the notification, before it get my ip block by google

please tell me anyone if know

fix the issue, notification gone.
stop the referenced cron above in admin, notification is gone.

choose whatever you want, but nr. 1 should be the way to go.

1 Like

I didn’t get it well

What he is saying is that there are to ways of getting rid of notifications:

  1. solve the root cause
  2. keep the error and disable notifications so the system doesn’t bother you.

He is also recommending you to solve the root cause if whatever is causing the notifications.

1 Like