我在尝试在 WSL2 上启动 Zabbix Server (6.4) 时遇到了麻烦。当我尝试以下命令时:
service zabbix-server restart
:
我收到了以下消息:
* Stopping Zabbix server zabbix_server
No process in pidfile '/var/run/zabbix/zabbix_server.pid' found running; none killed. [ OK ]
* Starting Zabbix server zabbix_server
并且 Zabbix Server 无法启动:
service zabbix-server status
:
* zabbix_server is not running
在日志文件(/var/log/zabbix/zabbix_server.log)中,发现以下消息重复多次:
13660:20230417:160028.155 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
文件末尾附有以下消息:
13660:20230417:160028.155 database is down: reconnecting in 10 seconds 13660:20230417:160032.344 Got signal [signal:15(SIGTERM),sender_pid:15318,sender_uid:0,reason:0]. Exiting ...
13660:20230417:160032.344 Zabbix Server stopped. Zabbix 6.4.1 (revision 546e284fd7c).
但是我已经正常安装了mysql-server,并且它运行时没有任何问题。