前提
下記を参考にCentos stream 8でZabbixを構築しています
<基盤構築>
https://www.rem-system.com/centos8-first-settings/#1_CentOS_8
<Zabbixアプリ構築>
https://densan-hoshigumi.com/server/zabbix62-centos8-apache-mysql-install#Zabbix_Agent_2
実現したいこと
- zabbix-server.serviceを起動できるようにする
<Zabbixアプリ構築>
https://densan-hoshigumi.com/server/zabbix62-centos8-apache-mysql-install#Zabbix_Agent_2
上記、参考の「systemctl enable --now zabbix-server.service」をしたところエラーになりました。
発生している問題・エラーメッセジ(systemctl enable --nowをしたところエラー)
#systemctl enable --now zabbix-server.service Job for zabbix-server.service failed because the service did not take the steps required by its unit configuration. See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
発生している問題・エラーメッセージ(startをしたところエラー)
#systemctl start zabbix-server Job for zabbix-server.service failed because the service did not take the steps required by its unit configuration. See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
ステータスを確認
#systemctl status zabbix-server ● zabbix-server.service - Zabbix Server Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: protocol) since Fri 2022-12-16 23:04:58 JST; 8s ago Process: 3639 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS) 12月 16 23:04:58 Hostxx. systemd[1]: Failed to start Zabbix Server.
journalctl -xe を確認
#journalctl -xe -- The unit zabbix-server.service has entered the 'failed' state with result 'protocol'. 12月 16 23:06:11 Hostxx. systemd[1]: Failed to start Zabbix Server. -- Subject: Unit zabbix-server.service has failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit zabbix-server.service has failed. -- -- The result is failed.
試したこと
SELinuxの無効化
補足情報(FW/ツールのバージョンなど)
Apache、PHP-FPM、Zabbix Agent2は問題なく起動されています。
Zabbix ServerだけNGです。(Webコンソールも開きました)
/var/log/zabbix/zabbix_server.log に起動しない原因が出力されていないでしょうか?
ありがとうございます。
下記のようなログが出力されておりました。
DB関連のようで、再インストールとDB/Userの再作成など試行してみましたが変わりません。
vi /etc/zabbix/zabbix_server.conf側のDB設定が欠落しているのでしょうか。。
================================================
2709:20221218:225023.980 TLS support: YES
2709:20221218:225023.980 ******************************
2709:20221218:225023.980 using configuration file: /etc/zabbix/zabbix_server.conf
2709:20221218:225023.982 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
2709:20221218:225023.982 cannot use database "zabbix": database is not a Zabbix database
2717:20221218:225036.231 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
2717:20221218:225036.231 ****** Enabled features ******
2717:20221218:225036.231 SNMP monitoring: YES
2717:20221218:225036.231 IPMI monitoring: YES
2717:20221218:225036.231 Web monitoring: YES
2717:20221218:225036.231 VMware monitoring: YES
2717:20221218:225036.231 SMTP authentication: YES
2717:20221218:225036.231 ODBC: YES
2717:20221218:225036.231 SSH support: YES
2717:20221218:225036.231 IPv6 support: YES
2717:20221218:225036.231 TLS support: YES
2717:20221218:225036.231 ******************************
2717:20221218:225036.231 using configuration file: /etc/zabbix/zabbix_server.conf
2717:20221218:225036.235 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
2717:20221218:225036.235 cannot use database "zabbix": database is not a Zabbix database
2721:20221218:225048.480 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
2721:20221218:225048.480 ****** Enabled features ******
2721:20221218:225048.480 SNMP monitoring: YES
2721:20221218:225048.480 IPMI monitoring: YES
2721:20221218:225048.480 Web monitoring: YES
2721:20221218:225048.480 VMware monitoring: YES
2721:20221218:225048.480 SMTP authentication: YES
2721:20221218:225048.480 ODBC: YES
2721:20221218:225048.480 SSH support: YES
2721:20221218:225048.480 IPv6 support: YES
2721:20221218:225048.480 TLS support: YES
2721:20221218:225048.480 ******************************
2721:20221218:225048.480 using configuration file: /etc/zabbix/zabbix_server.conf
2721:20221218:225048.483 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
2721:20221218:225048.483 cannot use database "zabbix": database is not a Zabbix database