一馬力のメモ帳

MVSからLinuxまで。基盤屋さんは眠らない

SElinux有効状態でzabbix-agent起動時のエラー

zabbix-agentを起動したら,failedになって起動しない
どうもSElinuxが有効化されていると起動しないようです。

同じエラーで起動しない人のために起動時(起動不良時)のログなどメモしておきます

ログは良いからとりあえずSElinux無効化したい!って人は
過去記事を参考にしてください

ichibariki.hatenablog.com

目次


起動時のエラー

 systemctl start zabbix-agentで起動する→エラー出力

zabbix-agentを起動すると

"Job for zabbix-agent.service failed because a configured resource limit was exceeded.”

と出力されて起動しない。

[root@centos73 ~]# systemctl start zabbix-agent
Job for zabbix-agent.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details.
[root@centos73 ~]#

 systemctl status zabbix-agentで状況を確認する。

systemctl status zabbix-agentコマンドで状況を確認すると

”systemd[1]: zabbix-agent.service failed.”

と出力されている。

[root@centos73 ~]# systemctl status  zabbix-agent
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: resources) since 土 2018-02-10 19:07:44 JST; 2s ago
  Process: 2511 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)

 2月 10 19:07:44 centos73 systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
 2月 10 19:07:44 centos73 systemd[1]: Failed to start Zabbix Agent.
 2月 10 19:07:44 centos73 systemd[1]: Unit zabbix-agent.service entered failed state.
 2月 10 19:07:44 centos73 systemd[1]: zabbix-agent.service failed.
[root@centos73 ~]#
[root@centos73 ~]#
[root@centos73 ~]#

 journalctlのログ

journalctlコマンドで

  • 最近のメッセージ(-e)を
  • 詳細に表示(-x)する

Unix zabbix-agent.serviceがfailedしている事がわかる。

[root@centos73 ~]# journalctl -xe

 2月 10 19:09:36 centos73 systemd[1]: Starting Zabbix Agent...
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has begun starting up.
 2月 10 19:09:37 centos73 systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start.
 2月 10 19:09:37 centos73 systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
 2月 10 19:09:37 centos73 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-agent.service has failed.
--
-- The result is failed.
 2月 10 19:09:37 centos73 systemd[1]: Unit zabbix-agent.service entered failed state.
 2月 10 19:09:37 centos73 systemd[1]: zabbix-agent.service failed.
[root@centos73 ~]#

起動しない原因

SElinuxを無効化すると,何事もなく起動する。
ログにSElinuxに捕まってますよーー。って出力してくれれば良いのにね。

[参考]

ichibariki.hatenablog.com

試した環境

HW

Product Name
  ProLiant DL160 Gen8
CPU
  4 CPUs x Intel(R) Xeon(R) CPU E5-2603 0 @ 1.80GHz
Memory
  16GB
iLO Firmware Version
  2.44 Jul 19 2016

仮想化基盤

OS
 vmware ESXi 6.0.0 (Build 3620759)
操作環境
 VMware Host Client
 iMac (27-inch, Mid 2010)
 macOS High Sierra
 ブラウザ
  Firefox

ゲストOS

[root@centos73 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@centos73 ~]# uname -a
Linux centos73 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@centos73 ~]#