Ad Widget

Collapse

Zabbix Agent active checks problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lukaszor
    Junior Member
    • Jun 2018
    • 17

    #1

    Zabbix Agent active checks problem

    Hi. I have problem with proper communication between Agent and Server. Agent is installed on Windows2012server in different country than Zabbix_server.
    Agent configuration is:

    DebugLevel=3
    #Passive check
    Server=x.x.x.197
    #Active check
    ServerActive=x.x.x.197
    hostname=monaco

    On zabbix server i have created item with the hostname: monaco, and i have linked windows os template.

    Now, on zabbix agent log i can see:

    255928:20180614:121435.235 Starting Zabbix Agent [monaco]. Zabbix 3.4.6 (revision 76819).
    255928:20180614:121435.235 **** Enabled features ****
    255928:20180614:121435.235 IPv6 support: YES
    255928:20180614:121435.235 TLS support: NO
    255928:20180614:121435.235 **************************
    255928:20180614:121435.235 using configuration file: c:\Zabbix\conf\zabbix_agentd.win.conf
    255928:20180614:121435.235 agent #0 started [main process]
    255660:20180614:121435.250 agent #1 started [collector]
    256248:20180614:121435.250 agent #3 started[listener #2]
    253604:20180614:121435.250 agent #2 started[listener #1]
    256472:20180614:121435.250 agent #4 started[listener #3]
    251544:20180614:121435.250 agent #5 started [active checks #1]
    251544:20180614:121538.963 active check configuration update from [x.x.x.197:10051] started to fail (cannot connect to [[x.x.x.197]:10051]: (null))
    251544:20180614:121638.757 active check configuration update from [x.x.x.197:10051] is working again

    But Zabbix-server is not receiving any data from the agent... It displays the message saying : Get value from agent failed: cannot connect to [[x.x.x.2]:10051]: [4] Interrupted system call

    I have checked on firewall on agent side and I can see outgoing traffic to Zabbixserver


    How can I troubleshoot the problem?

  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Test connectivity from the monitored host using telnet command "telnet x.x.x.2 1005"
    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

    • lukaszor
      Junior Member
      • Jun 2018
      • 17

      #3
      I have tried telnet from agent computer to zabbix server as You said but i'm getting message "Connection closed by remote host". I have few agents running on local machines and they communicate ok with zabbix server, and i tried telnet locally and with the same result as remotly.

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by lukaszor
        I have tried telnet from agent computer to zabbix server as You said but i'm getting message "Connection closed by remote host". I have few agents running on local machines and they communicate ok with zabbix server, and i tried telnet locally and with the same result as remotly.
        Zabbix server/proxy does not filter incoming connections because it does not check source address of the incoming connection.
        Just try exactly the same command on the server/proxy to which you are trying to connect connecting to host IP or localhost.
        If telnet command will show you established with output like below:
        Code:
        [tkloczko@domek tests]$ telnet 192.168.1.5 10051
        Trying 192.168.1.5...
        Connected to 192.168.1.5.
        Escape character is '^]'.
        and will show you something like:
        Code:
        [tkloczko@domek tests]$ telnet 92.242.132.16 10051
        Trying 92.242.132.16...
        telnet: connect to address 92.242.132.16: Connection refused
        It will mean you are trying to connect to wrong address or something in the middle is filtering network traffic and/or even if you are using correct address (from agent perspective) something in the middle on network layer is translating this address.
        You can check first by using "nmap -O <srv_or_prx.address>" (and comparing this output with the same command executed on the server/proxy host), and you can verify second by starting on listener side tcpdump and checking do you see network traffic which should come from agent side.

        Nevertheless, as I wrote zabbix server or proxy does not filter incoming connections so it cannot cause "Connection refused" message which said that you see.
        In other words I'm 100% sure that your problems are not related to the zabbix per se (if you are able to renet on 10051 to localhost on zabbix server/proxy host).
        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

        • nambiya
          Junior Member
          • Jun 2018
          • 1

          #5
          I am too facing the issue : not able to connect to server from agent.

          Error details just say NULL :

          3896:20180627:075010.594 Starting Zabbix Agent [Windows host]. Zabbix 3.4.0 (revision 71462).
          3896:20180627:075010.597 **** Enabled features ****
          3896:20180627:075010.600 IPv6 support: YES
          3896:20180627:075010.603 TLS support: NO
          3896:20180627:075010.603 **************************
          3896:20180627:075010.604 using configuration file: D:\zabbix\zabbix_agentd.conf
          3896:20180627:075010.605 agent #0 started [main process]
          3576:20180627:075010.605 agent #1 started [collector]
          4280:20180627:075010.606 agent #2 started[listener #1]
          772:20180627:075010.606 agent #5 started [active checks #1]
          4340:20180627:075010.606 agent #6 started [active checks #2]
          5808:20180627:075010.606 agent #4 started[listener #3]
          2420:20180627:075010.607 agent #3 started[listener #2]
          4340:20180627:075013.608 active check configuration update from [10.50.148.28:10051] started to fail (cannot connect to [[10.50.148.28]:10051]: (null)

          Comment

          • kernbug
            Senior Member
            • Feb 2013
            • 330

            #6
            Originally posted by nambiya
            I am too facing the issue : not able to connect to server from agent.

            4340:20180627:075013.608 active check configuration update from [10.50.148.28:10051] started to fail (cannot connect to [[10.50.148.28]:10051]: (null)
            Hi,

            Please show output from the Zabbix Server:
            Code:
            sudo iptables -L -x -v -n --line-numbers

            Comment


            • nambiya
              nambiya commented
              Editing a comment
              Please find below the output

              Chain INPUT (policy ACCEPT 1601617 packets, 95787571 bytes)
              num pkts bytes target prot opt in out source destination
              1 9966 659735 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:10051
              2 1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:23
              3 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:10051
              4 173241 10394460 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:10050

              Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
              num pkts bytes target prot opt in out source destination

              Chain OUTPUT (policy ACCEPT 1781373 packets, 108313087 bytes)
              num pkts bytes target prot opt in out source destination
          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #7
            If it is possible to use telnet to test connectivity and it works and zabbix active agent cannot connect to srv/prx most likely all what blocks here is SELinux and in such case all what is needed is add proper SELinux rules for zabbix or disable SELinux.
            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

            Working...