Ad Widget

Collapse

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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mitch2k
    Junior Member
    • Mar 2018
    • 14

    #1

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

    Hi,

    I just noticed that my zabbix (active) agent on 1 of my servers was not running for a couple of weeks.

    Manually starting the service I get:

    Code:
    [root@bezaweb03 ~]# systemctl status zabbix-agent.service
    ● zabbix-agent.service - Zabbix Agent
       Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
       Active: activating (auto-restart) (Result: resources) since Sat 2018-03-03 09:32:22 CET; 6s ago
      Process: 20407 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
    
    Mar 03 09:32:22 server.com systemd[1]: Failed to start Zabbix Agent.
    Mar 03 09:32:22 server.com systemd[1]: Unit zabbix-agent.service entered failed state.
    Mar 03 09:32:22 server.com systemd[1]: zabbix-agent.service failed.
    [root@bezaweb03 ~]# systemctl start zabbix-agent.service
    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@bezaweb03 ~]#
    Code:
    [root@bezaweb03 ~]# systemctl status zabbix-agent.service
    ● zabbix-agent.service - Zabbix Agent
       Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
       Active: activating (auto-restart) (Result: resources) since Sat 2018-03-03 09:38:20 CET; 5s ago
      Process: 22351 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
    
    Mar 03 09:38:20 server.com systemd[1]: zabbix-agent.service never wrote its PID file. Failing.
    Mar 03 09:38:20 server.com systemd[1]: Failed to start Zabbix Agent.
    Mar 03 09:38:20 server.com systemd[1]: Unit zabbix-agent.service entered failed state.
    Mar 03 09:38:20 server.com systemd[1]: zabbix-agent.service failed.
    Reading trough the documentation, this appears to be a selinux issue. However, selinux is disabled...
    Code:
    [root@bezaweb03 ~]# sestatus
    SELinux status:                 disabled
    This system is running CloudLinux 7.4.

    Any ideas how I can fix this?

    Apart from that, what is the appropriate method to monitor if the agent is dead?
    I have added an Agent Ping item to my template:


    And a trigger:


    But it does not seem to trigger, as the item does not get data:


    Thanks!
    Last edited by mitch2k; 31-01-2019, 11:55.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Have you restarted the OS after changing SELinux setting to disabled?

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Just check agent logs (/var/lig/zabbix/zabbix_agentd.log)
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      • mitch2k
        Junior Member
        • Mar 2018
        • 14

        #4
        Hi,

        /var/log/zabbix/zabbix_agentd.log is just empty

        I had restarted it before, but tried again to be sure:

        Code:
        [root@bezaweb03 ~]#
        [root@bezaweb03 ~]# uptime
         09:02:26 up 2 min,  1 user,  load average: 1.01, 0.58, 0.22
        [root@bezaweb03 ~]# sestatus
        SELinux status:                 disabled
        [root@bezaweb03 ~]# service zabbix-agent start
        Redirecting to /bin/systemctl start zabbix-agent.service
        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@bezaweb03 ~]#

        Comment

        • Atsushi
          Senior Member
          • Aug 2013
          • 2028

          #5
          Set SELinux to disabled or set the policy.
          After changing the SELinux configuration file to disabled, it is necessary to restart the OS.

          Comment

          • mitch2k
            Junior Member
            • Mar 2018
            • 14

            #6
            Originally posted by Atsushi
            Set SELinux to disabled or set the policy.
            After changing the SELinux configuration file to disabled, it is necessary to restart the OS.
            Yeah, but selinux status IS disabled, and the server was restarted...

            Comment

            • mitch2k
              Junior Member
              • Mar 2018
              • 14

              #7
              I was able to troubleshoot the issue with some help. Apparantly there was a ACL issue which prevented the zabbix user to write to the log file.
              After changing the ACL, zabbix can start again.

              Comment

              • Helaly
                Junior Member
                • Aug 2018
                • 1

                #8
                Originally posted by mitch2k
                I was able to troubleshoot the issue with some help. Apparantly there was a ACL issue which prevented the zabbix user to write to the log file.
                After changing the ACL, zabbix can start again.

                can you please explain more ?

                Comment

                • meloferz
                  Junior Member
                  • Oct 2018
                  • 1

                  #9
                  Originally posted by Helaly


                  can you please explain more ?
                  I had the same issue with acl, what i've done was the following:

                  cd /var/log
                  mkdir zabbix
                  chown -c zabbix:zabbix zabbix
                  getfacl zabbix (to confirm that the ownership and group are for zabbix)
                  systemctl status zabbix-agent

                  done

                  Comment

                  • Ravikumar
                    Junior Member
                    • Jun 2018
                    • 3

                    #10
                    I had same issue, it is just log file owner issue.


                    [ac@machine1~] ls - /var/log/zabbix/zabbix_agentd.log
                    -rw-rw-r-- 1 root root 2714 Jul 10 17:16 /var/log/zabbix/zabbix_agentd.log

                    [ac@machine1~] chown zabbix.zabbix /var/log/zabbix/zabbix_agentd.log
                    [ac@machine1~] systemctl start zabbix-agentd

                    done

                    Comment

                    Working...