1. 程式人生 > >zabbix‘ failed: [1044] Access denied for user ‘zab

zabbix‘ failed: [1044] Access denied for user ‘zab

IE red 日誌分析 RKE style 文件 報錯 cmp with

環境:

zabbix 3.4

Redhat 6.5 64

PHP 5.5

Mysql 5.6

Nginx 1.6

現象:登錄zabbix後,提示service is not runing ,zabbix狀態顯示如下截圖

技術分享圖片

日誌分析:

日誌路徑:/tmp/zabbix_server.log

26508:20180627:144257.934 Starting Zabbix Server. Zabbix 3.4.10 (revision 81503).
26508:20180627:144257.934 ****** Enabled features ******
26508:20180627:144257.934 SNMP monitoring: YES

26508:20180627:144257.934 IPMI monitoring: NO
26508:20180627:144257.934 Web monitoring: YES
26508:20180627:144257.934 VMware monitoring: NO
26508:20180627:144257.934 SMTP authentication: NO
26508:20180627:144257.934 Jabber notifications: NO
26508:20180627:144257.934 Ez Texting notifications: YES
26508:20180627:144257.934 ODBC: NO
26508:20180627:144257.934 SSH2 support: NO
26508:20180627:144257.934 IPv6 support: NO
26508:20180627:144257.934 TLS support: NO
26508:20180627:144257.934 ******************************
26508:20180627:144257.934 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf
26508:20180627:144257.938 [Z3001] connection to database 'zabbix' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'zabbix'
26508:20180627:144257.938 Cannot connect to the database. Exiting...
26533:20180627:144649.189 Starting Zabbix Server. Zabbix 3.4.10 (revision 81503).

原因分析:

由於zabbix啟動是調用zabbix_server.conf配置文件,需要是從這個裏面排查

技術分享圖片

由於標紫色的框內是註釋,把此位置註釋去掉,然後配置一下服務器對應的IP地址,再次重啟zabbix服務,再觀察錯誤

啟動zabbix服務

[root@zabbix ~]# service zabbix_server start
Starting zabbix_server: [確定]
[root@zabbix ~]#


觀察日誌是否有報錯信息:

26533:20180627:144649.189 Starting Zabbix Server. Zabbix 3.4.10 (revision 81503).
26533:20180627:144649.189 ****** Enabled features ******
26533:20180627:144649.189 SNMP monitoring: YES
26533:20180627:144649.189 IPMI monitoring: NO
26533:20180627:144649.189 Web monitoring: YES
26533:20180627:144649.189 VMware monitoring: NO
26533:20180627:144649.189 SMTP authentication: NO
26533:20180627:144649.189 Jabber notifications: NO
26533:20180627:144649.189 Ez Texting notifications: YES
26533:20180627:144649.189 ODBC: NO
26533:20180627:144649.189 SSH2 support: NO
26533:20180627:144649.189 IPv6 support: NO
26533:20180627:144649.189 TLS support: NO
26533:20180627:144649.189 ******************************
26533:20180627:144649.189 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf
26533:20180627:144649.194 current database version (mandatory/optional): 03040000/03040007
26533:20180627:144649.194 required mandatory version: 03040000
26533:20180627:144649.203 server #0 started [main process]
26535:20180627:144649.208 server #2 started [alerter #1]
26536:20180627:144649.208 server #3 started [alerter #2]
26537:20180627:144649.208 server #4 started [alerter #3]
26538:20180627:144649.209 server #5 started [housekeeper #1]
26539:20180627:144649.209 server #6 started [timer #1]
26540:20180627:144649.306 server #7 started [http poller #1]
26541:20180627:144649.309 server #8 started [discoverer #1]
26542:20180627:144649.310 server #9 started [history syncer #1]
26543:20180627:144649.312 server #10 started [history syncer #2]
26544:20180627:144649.315 server #11 started [history syncer #3]
26545:20180627:144649.318 server #12 started [history syncer #4]
26546:20180627:144649.319 server #13 started [escalator #1]
26547:20180627:144649.320 server #14 started [proxy poller #1]
26548:20180627:144649.321 server #15 started [self-monitoring #1]
26549:20180627:144649.323 server #16 started [task manager #1]
26550:20180627:144649.325 server #17 started [poller #1]
26551:20180627:144649.326 server #18 started [poller #2]
26554:20180627:144649.334 server #21 started [poller #5]
26553:20180627:144649.336 server #20 started [poller #4]
26534:20180627:144649.338 server #1 started [configuration syncer #1]
26555:20180627:144649.339 server #22 started [unreachable poller #1]
26558:20180627:144649.348 server #25 started [trapper #3]
26557:20180627:144649.348 server #24 started [trapper #2]
26560:20180627:144649.349 server #27 started [trapper #5]
26559:20180627:144649.349 server #26 started [trapper #4]
26561:20180627:144649.350 server #28 started [icmp pinger #1]
26563:20180627:144649.351 server #30 started [preprocessing manager #1]
26562:20180627:144649.358 server #29 started [alert manager #1]
26552:20180627:144649.371 server #19 started [poller #3]
26556:20180627:144649.416 server #23 started [trapper #1]
26565:20180627:144649.417 server #32 started [preprocessing worker #2]
26564:20180627:144649.446 server #31 started [preprocessing worker #1]
26566:20180627:144649.447 server #33 started [preprocessing worker #3]
26556:20180627:144737.648 cannot send list of active checks to "127.0.0.1": host [Zabbix server] not monitored
26556:20180627:144937.695 cannot send list of active checks to "127.0.0.1": host [Zabbix server] not monitored
26556:20180627:145137.740 cannot send list of active checks to "127.0.0.1": host [Zabbix server] not monitored
26556:20180627:145337.806 cannot send list of active checks to "127.0.0.1": host [Zabbix server] not monitored
26556:20180627:145537.914 cannot send list of active checks to "127.0.0.1": host [Zabbix server] not monitored

上述打印的日誌信息並沒有之前的錯誤信息,則說明是zabbix是啟動成功了


查看zabbix啟動的進程是否存在如下:

[root@zabbix ~]# ps -ef|grep zabbix_server
root 26416 3548 0 14:32 pts/1 00:00:00 tail -100f /tmp/zabbix_server.log
zabbix 26533 1 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server --顯示進程
zabbix 26534 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: configuration syncer [synced configuration in 0.004973 sec, idle 60 sec]
zabbix 26535 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: alerter #1 started
zabbix 26536 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: alerter #2 started
zabbix 26537 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: alerter #3 started
zabbix 26538 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: housekeeper [startup idle for 30 minutes]
zabbix 26539 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000008 sec, 0 maintenances in 0.000659 sec, idle 30 sec]
zabbix 26540 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: http poller #1 [got 0 values in 0.000648 sec, idle 5 sec]
zabbix 26541 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.000330 sec, idle 60 sec]
zabbix 26542 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: history syncer #1 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 26543 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 26544 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: history syncer #3 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 26545 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: history syncer #4 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 26546 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000497 sec, idle 3 sec]
zabbix 26547 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000002 sec, idle 5 sec]
zabbix 26548 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: self-monitoring [processed data in 0.000004 sec, idle 1 sec]
zabbix 26549 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: task manager [processed 0 task(s) in 0.000251 sec, idle 5 sec]
zabbix 26550 26533 0 14:46 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server: poller #1 [got 0 values in 0.000002 sec, idle 5 sec]

zabbix‘ failed: [1044] Access denied for user ‘zab