Ad Widget

Collapse

Assuming that agent dropped connection because of access permissions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Renate
    Member
    • Apr 2008
    • 34

    #1

    Assuming that agent dropped connection because of access permissions

    New Zabbix 2.0.3 installation on virtual server.
    Still struggling with the zabbix_agentd. In the log everything looks oké.

    18512:20130328:161826.568 Starting Zabbix Agent [Zabbix_server]. Zabbix 2.0.3 (revision 30485).
    18512:20130328:161826.581 In init_collector_data()
    18512:20130328:161826.581 End of init_collector_data()
    18517:20130328:161826.581 agent #0 started [collector]
    18517:20130328:161826.581 In init_cpu_collector()
    18517:20130328:161826.581 End of init_cpu_collector():SUCCEED
    18517:20130328:161826.581 In update_cpustats()
    18517:20130328:161826.581 End of update_cpustats()
    18518:20130328:161826.582 agent #1 started[listener]
    18519:20130328:161826.584 agent #2 started[listener]
    18520:20130328:161826.584 agent #3 started[listener]
    18521:20130328:161826.584 agent #4 started [active checks]
    18521:20130328:161826.584 In init_active_metrics()
    18521:20130328:161826.584 Buffer: first allocation for 100 elements
    18521:20130328:161826.584 In send_buffer() host:'127.0.0.1' port:10051 values:0/100
    18521:20130328:161826.584 End of send_buffer():SUCCEED
    18521:20130328:161826.584 refresh_active_checks('127.0.0.1',10051)
    18521:20130328:161826.585 Sending [{
    "request":"active checks",
    "host":"Zabbix_server"}]
    18521:20130328:161826.586 Before read
    18521:20130328:161826.588 Got [{
    "response":"success",
    "data":[]}]
    18521:20130328:161826.588 In parse_list_of_checks()
    18521:20130328:161826.588 In disable_all_metrics()
    18521:20130328:161826.588 In process_active_checks('127.0.0.1',10051)
    18521:20130328:161826.588 End of process_active_checks()
    18521:20130328:161826.588 In get_min_nextcheck()
    18521:20130328:161826.588 Sleeping for 1 second(s)
    18517:20130328:161827.583 In update_cpustats()
    18517:20130328:161827.583 End of update_cpustats()
    18521:20130328:161827.590 In send_buffer() host:'127.0.0.1' port:10051 values:0/100
    18521:20130328:161827.590 End of send_buffer():SUCCEED
    18521:20130328:161827.590 Sleeping for 1 second(s)


    But in the frondend of Zabbix, the dashboard is saying that zabbix agent on zabbix_server is unreachable. Under Configuration - Host, the Z is red and gives the following;

    Received empty response from Zabbix Agent at [127.0.0.1]. Assuming that agent dropped connection because of access permissions.

    Is there anyone who can give me advice/hint how to solve this?
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    You need to configure the zabbix_agentd.conf file to accept connections from the Zabbix Server. By default it only accepts connections from 127.0.0.1. You need to change the "Server" parameter.

    Comment

    • Renate
      Member
      • Apr 2008
      • 34

      #3
      Thank you for replying

      I have made the change in de zabbix_agentd.conf. But still no succes...

      Then i tried to change the rights of the zabbix_agentd to

      -rwxrwxrwx 1 root root 731215 Jan 21 10:16 zabbix_agentd
      (and already changed it back to -rwxr-xr-x 1 root root 731215 Jan 21 10:16 zabbix_agentd)

      the manual https://www.zabbix.com/documentation.../zabbix_agentd is saying;

      AllowRoot (this one is disabled in zabbix_agentd.conf);
      Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
      0 - do not allow
      1 - allow

      I have create a zabbix user, just to be sure i checked

      zabbix:x:507:507::/home/zabbix:/bin/bash

      Maybe a image gives more input...





      The zabbix_agentd.conf:

      PidFile=/var/run/zabbix/zabbix_agentd.pid
      LogFile=/var/log/zabbix/zabbix_agentd.log
      DebugLevel=4
      Server=127.0.0.1 (was =::ffff:127.0.0.1, and should also work)
      ServerActive=127.0.0.1
      Hostname=Zabbix_server

      Log zabbix_agentd;

      17778:20130402:105443.840 Starting Zabbix Agent [Zabbix_server]. Zabbix 2.0.3 (revision 30485).
      17778:20130402:105443.853 In init_collector_data()
      17778:20130402:105443.853 End of init_collector_data()
      17784:20130402:105443.856 agent #1 started[listener]
      17785:20130402:105443.856 agent #2 started[listener]
      17786:20130402:105443.856 agent #3 started[listener]
      17787:20130402:105443.857 agent #4 started [active checks]
      17787:20130402:105443.857 In init_active_metrics()
      17787:20130402:105443.857 Buffer: first allocation for 100 elements
      17787:20130402:105443.857 In send_buffer() host:'127.0.0.1' port:10051 values:0/100
      17787:20130402:105443.857 End of send_buffer():SUCCEED
      17787:20130402:105443.857 refresh_active_checks('127.0.0.1',10051)
      17787:20130402:105443.857 Sending [{
      "request":"active checks",
      "host":"Zabbix_server"}]
      17787:20130402:105443.860 Before read
      17783:20130402:105443.860 agent #0 started [collector]
      17783:20130402:105443.860 In init_cpu_collector()
      17783:20130402:105443.860 End of init_cpu_collector():SUCCEED
      17783:20130402:105443.860 In update_cpustats()
      17783:20130402:105443.861 End of update_cpustats()
      17787:20130402:105443.861 Got [{
      "response":"success",
      "data":[]}]
      17787:20130402:105443.861 In parse_list_of_checks()
      17787:20130402:105443.861 In disable_all_metrics()
      17787:20130402:105443.861 In process_active_checks('127.0.0.1',10051)
      17787:20130402:105443.861 End of process_active_checks()
      Attached Files

      Comment

      • neogan
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2011
        • 118

        #4
        Renate,

        I think you need check option
        Code:
        Hostname =Zabbix Server (usually)
        But I noticed your server have name - Zabbix_Server.

        The same name must be in web Configuration -> Hosts

        Comment

        • Renate
          Member
          • Apr 2008
          • 34

          #5
          Thank you for the reply.

          But the name Zabbix_Server is correct. That's the hostname in Configuration -> Hosts
          Attached Files

          Comment

          • heaje
            Senior Member
            Zabbix Certified Specialist
            • Sep 2009
            • 325

            #6
            Just saw the problem in your screenshot. you're connecting to port 10051. That's incorrect. You should vonnec tot port 10050

            Comment

            • Renate
              Member
              • Apr 2008
              • 34

              #7
              Hello heaje,

              Just to be sure;

              Zabbix_server is port 10050
              Zabbix_agentd is port 10051

              I can see what you mean. I'll work on it.

              Comment

              • heaje
                Senior Member
                Zabbix Certified Specialist
                • Sep 2009
                • 325

                #8
                Originally posted by Renate
                Hello heaje,

                Just to be sure;

                Zabbix_server is port 10050
                Zabbix_agentd is port 10051

                I can see what you mean. I'll work on it.
                By default, zabbix_server is port 10051 and Zabbix_agentd is port 10050. You have it backwards in what you just put here.

                Comment

                • Renate
                  Member
                  • Apr 2008
                  • 34

                  #9
                  I've finally have everything working. Portnumbers where all ok, that was not the problem.
                  It was the zabbix_agentd.conf which was not ok. I had adepted the wrong zabbix_agentd.conf that's why it didn't work. When the correct conf file was adapted, it worked.

                  Thanks everyone for the help

                  Comment

                  Working...