Can’t open PID file /run/zabbix/zabbix_proxy.pid
查看日志:
50786:20230615:144749.905 Starting Zabbix Proxy (active) [dlpkvm]. Zabbix 6.0.18 (revision d2032721bc8).
50786:20230615:144749.905 **** Enabled features ****
50786:20230615:144749.905 SNMP monitoring: YES
50786:20230615:144749.905 IPMI monitoring: YES
50786:20230615:144749.905 Web monitoring: YES
50786:20230615:144749.905 VMware monitoring: YES
50786:20230615:144749.905 ODBC: YES
50786:20230615:144749.905 SSH support: YES
50786:20230615:144749.905 IPv6 support: YES
50786:20230615:144749.905 TLS support: YES
50786:20230615:144749.906 **************************
50786:20230615:144749.906 using configuration file: /etc/zabbix/zabbix_proxy.conf
50786:20230615:144749.909 [Z3001] connection to database ‘zabbix_proxy’ failed: [2059] Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
50786:20230615:144749.909 Cannot connect to the database. Exiting…
50842:20230615:144802.158 Starting Zabbix Proxy (active) [dlpkvm]. Zabbix 6.0.18 (revision d2032721bc8).
50842:20230615:144802.158 **** Enabled features ****
50842:20230615:144802.158 SNMP monitoring: YES
50842:20230615:144802.159 IPMI monitoring: YES
50842:20230615:144802.159 Web monitoring: YES
50842:20230615:144802.159 VMware monitoring: YES
50842:20230615:144802.159 ODBC: YES
50842:20230615:144802.159 SSH support: YES
50842:20230615:144802.159 IPv6 support: YES
50842:20230615:144802.159 TLS support: YES
50842:20230615:144802.159 **************************
50842:20230615:144802.159 using configuration file: /etc/zabbix/zabbix_proxy.conf
50842:20230615:144802.162 [Z3001] connection to database ‘zabbix_proxy’ failed: [2059] Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
50842:20230615:144802.162 Cannot connect to the database. Exiting…
[root@dlpkvm zabbix]#
登录mysql数据库,查看加密方式
mysql> show variables like ‘default_authentication_plugin’;
±------------------------------±----------------------+
| Variable_name | Value |
±------------------------------±----------------------+
| default_authentication_plugin | caching_sha2_password |
±------------------------------±----------------------+
1 row in set (0.02 sec)
mysql>
mysql> select host,user,plugin from mysql.user;
±----------±-----------------±----------------------+
| host | user | plugin |
±----------±-----------------±----------------------+
| % | root | mysql_native_password |
| % | zabbix | caching_sha2_password |
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | caching_sha2_password |
±----------±-----------------±----------------------+
6 rows in set (0.00 sec)
mysql>
更改:
mysql> ALTER USER ‘zabbix’@‘%’ IDENTIFIED WITH mysql_native_password BY ‘GKHKDS@243¥#h’;
Query OK, 0 rows affected (0.08 sec)
mysql> select host,user,plugin from mysql.user;
±----------±-----------------±----------------------+
| host | user | plugin |
±----------±-----------------±----------------------+
| % | root | mysql_native_password |
| % | zabbix | mysql_native_password |
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | caching_sha2_password |
±----------±-----------------±----------------------+
6 rows in set (0.00 sec)
mysql>
[root@dlpkvm zabbix]# systemctl restart zabbix-proxy
[root@dlpkvm zabbix]#