Ad Widget

Collapse

RHEL zabbix_agentd service will not run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trey5498
    Junior Member
    • Jan 2014
    • 8

    #1

    RHEL zabbix_agentd service will not run

    I have installed Zabbix agent 2.0.0 onto a Linux server and every time I start the agent service, it stops immediately.

    Below is the output when I check the status of all running services
    Code:
    []#  service --status-all 
    usage: /etc/init.d/zabbix_agentd (start|stop|restart|help)
    
    start      - start zabbix_agentd
    stop       - stop zabbix_agentd
    restart    - restart zabbix_agentd if running by sending a SIGHUP or start if not running
    help       - this screen
    I followed the instructions located at
    HTML Code:
    https://www.zabbix.com/wiki/howto/monitor/os/linux/agentinstallonlinux
    . I am not sure what I am doing wrong here. The /etc/zabbix/zabbix_agentd.log never gets created either. I have even tried to set the entire /etc/zabbix directory to 777. Any help would be wonderful.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    No package is supposed to place log files to /etc. These should live in /var/log/zabbix or similar.

    Does the zabbix_agent even start?

    Code:
    ps aux|grep zabbix_agent

    Comment

    • steveboyson
      Senior Member
      • Jul 2013
      • 582

      #3
      Jusr another question: why did you not use the precompiled and provided RPM packages for RHEL? I mean do you have a particular reason for doing a self compile?

      Comment

      • trey5498
        Junior Member
        • Jan 2014
        • 8

        #4
        i did not install from rps because we use a red hat satellite and it is strictly controlled. would the fact that is trying to write log to /etc be the reason it isn't running? and yes, it is not running.

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          Couple of things I would do...

          NOT use 2.0.0 - instead, use the latest supported version for that series. ie - 2.0.6 or 2.0.9 (This includes the Zabbix application version as well as the agent version)

          Next, I would edit my zabbix_agentd.conf file and change the logfile location (for testing purposes) to /tmp/zabbix_agentd.log

          Then, I would start the agent manually using ./zabbix_agentd -c /usr/local/etc/zabbix_agentd.conf (Or whatever your path is to your conf file)

          Once you determine you can launch the application successfully, then start tweaking your conf to put the log files where you want.

          As Steve mentioned above, in our setup we put our logs to /var/log/zabbix

          Comment

          • trey5498
            Junior Member
            • Jan 2014
            • 8

            #6
            The higher ups are pretty adamant about using 2.0.0 since they already have it set up on the countless other servers (over 100 and none of them Linux).

            Update:

            I have changed the log file to go to /tmp/zabbix tried to start it manual and service --status-all still shows the same. I tried to restart the agent and it says it is not running.

            Below is the ps aux|grep zabbix_agent output:

            Code:
            # /etc/init.d/zabbix_agentd restart
            /etc/init.d/zabbix_agentd restart: zabbix_agentd not running, trying to start
            /etc/init.d/zabbix_agentd restart: zabbix_agentd started
            # ps aux|grep zabbix_agent
            zabbix   17189  0.0  0.0   3212   660 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            zabbix   17190  0.0  0.0   3212   684 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            zabbix   17191  0.0  0.0   3216   648 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            zabbix   17192  0.0  0.0   3216   468 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            zabbix   17193  0.0  0.0   3216   468 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            zabbix   17194  0.0  0.0   3212   692 ?        S    08:53   0:00 /usr/local/zabbix/sbin/zabbix_agentd
            root     17237  0.0  0.0   4360   732 pts/2    S+   08:54   0:00 grep zabbix_agent

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              Is it putting anything to the /tmp/zabbix_agentd.log now?

              Comment

              • trey5498
                Junior Member
                • Jan 2014
                • 8

                #8
                Here is what is in the /tmp folder now.

                Code:
                zabbix_agentd.log
                17189:20140123:085348.678 Starting Zabbix Agent [Zabbix server]. Zabbix 2.0.0 (revision 27675).
                 17193:20140123:085348.679 agent #3 started[listener]
                 17194:20140123:085348.679 agent #4 started [active checks]
                 17192:20140123:085348.680 agent #2 started[listener]
                 17191:20140123:085348.680 agent #1 started[listener]
                 17190:20140123:085348.680 agent #0 started [collector]
                Code:
                zabbix_agentd.pid
                17189

                Comment

                • tchjts1
                  Senior Member
                  • May 2008
                  • 1605

                  #9
                  Ok... so it looks like it is running to me.

                  Comment

                  • trey5498
                    Junior Member
                    • Jan 2014
                    • 8

                    #10
                    Code:
                    # service --status-all | grep zabbix
                    usage: /etc/init.d/zabbix_agentd (start|stop|restart|help)
                    start      - start zabbix_agentd
                    stop       - stop zabbix_agentd
                    restart    - restart zabbix_agentd if running by sending a SIGHUP or start if not running
                    Code:
                    # /etc/init.d/zabbix_agentd restart
                    /etc/init.d/zabbix_agentd restart: zabbix_agentd not running, trying to start
                    /etc/init.d/zabbix_agentd restart: zabbix_agentd started
                    Not sure how, will it not show up under root and only the user zabbix?

                    Comment

                    • trey5498
                      Junior Member
                      • Jan 2014
                      • 8

                      #11
                      any ideas?

                      Comment

                      • tchjts1
                        Senior Member
                        • May 2008
                        • 1605

                        #12
                        I still don't understand why you say it is not running. The processes are clearly running.

                        Are you not getting any data into Zabbix from the agent?

                        Comment

                        • steveboyson
                          Senior Member
                          • Jul 2013
                          • 582

                          #13
                          Thanks @tchjts1, I just wanted to write somethin' similar...

                          Comment

                          • trey5498
                            Junior Member
                            • Jan 2014
                            • 8

                            #14
                            The Zabbix server is unable to talk to the agent. iptables and hosts.allow have been open to the server.

                            Comment

                            • steveboyson
                              Senior Member
                              • Jul 2013
                              • 582

                              #15
                              While I don't think that zabbix_{server|agent} are compiled using tcpwrappers (hosts.{allow|deny}) you might want to check basic network connectivity issues.

                              Can you telnet to the zbx_serv port? Can the server telnet to the zbx_ag's port?
                              If both is the case, I am out of ideas.

                              BTW it seems that "service --status-all" is broken or your startup script for zbx_serv is not working properly.

                              Does RH use systemd or is it a regular "System V" init? If SysV, you might want to check your startup script by running it via "bash -x /etc/init.d/zabbix_server start" ...

                              Comment

                              Working...