啟動zabbix-server/agent報錯:cannot open "/etc/zabbix/logs/zabbix_server.log": [13] Permission denied


注:該報錯解決方式同樣適用於zabbix-agent

啟動zabbix-server報錯信息如下:

2月 27 16:52:44 localhost.localdomain zabbix_server[15087]: zabbix_server [15089]: cannot open "/etc/zabbix/logs/zabbix_server.log": [13] Permission denied
2月 27 16:52:44 localhost.localdomain systemd[1]: Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start:No such file or directory
2月 27 16:52:44 localhost.localdomain systemd[1]: zabbix-server.service never wrote its PID file. Failing.
2月 27 16:52:44 localhost.localdomain systemd[1]: Failed to start Zabbix Server.   

查詢zabbix_server.log日志發現:

zabbix_server [3398]: cannot open "/etc/zabbix/logs/zabbix_server.log": [13] Permission denied
zabbix_server [3398]: cannot open "/etc/zabbix/logs/zabbix_server.log": [13] Permission denied
zabbix_server [3398]: failed to open log file: [13] Permission denied
zabbix_server [3398]: failed to write [failed to accept an incoming connection: select() failed: [4] Interruptstem call] into log file  

由此可以初步判斷是由於權限分配的問題導致zabbix服務器啟動失敗,參考日志報錯信息:這一點很重要,權限分配問題導致!

改變相應目錄和文件的屬組,屬於root用戶,同屬zabbix組:

chown root:zabbix logs

chown root:zabbix zabbix_agentd.conf

chown root:zabbix zabbix_server.conf

 

 再重啟zabbix服務即可:

systemctl restart zabbix-server

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM