我正在为我的网站运行 LEMP 堆栈,它们运行良好。监控显示服务器没有响应 ping,我重新启动了它。现在 MariaDB 服务没有运行,我的网站显示“建立数据库连接时出错“。
sudo 服务 mariadb 启动出现以下错误:
Job for mariadb.service failed because a fatal signal was delivered to the control process.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
由于。。。导致的结果systemctl status mariadb.service:
mariadb.service - MariaDB 10.4.32 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: activating (auto-restart) (Result: signal) since Thu 2023-12-28 00:05:15 PKT; 212ms ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 135599 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 135604 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 135612 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-envir>
Process: 135752 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
Main PID: 135752 (code=killed, signal=ABRT)
和journalctl-xe:
-- The job identifier is 8.
Dec 27 23:21:09 vps.example.com systemd[8592]: Listening on debconf communication socket.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 10.
Dec 27 23:21:09 vps.example.com systemd[8592]: Listening on D-Bus User Message Bus Socket.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 7.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Sockets.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 3.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Basic System.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 2.
Dec 27 23:21:09 vps.example.com systemd[8592]: Reached target Main User Target.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 1.
Dec 27 23:21:09 vps.example.com systemd[8592]: Startup finished in 119ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 119349 microseconds.
Dec 27 23:21:53 vps.example.com polkit-agent-helper-1[9548]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=alex rhost= user=alex
Dec 27 23:22:19 vps.example.com polkit-agent-helper-1[10365]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=alex rhost= user=alex
sudo service --status-all
命令不会在服务列表中显示 MariDB。
我尝试重启 nginx、PHP 甚至服务器,但问题仍然存在。我无法理解这个问题的根本原因。