Ad Widget

Collapse

server failed to connect to agent (Active checks)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • timypcr
    Junior Member
    • Jan 2018
    • 1

    #1

    server failed to connect to agent (Active checks)

    Why does the server still try to connect to the agent when the agent has been configured with active checks only (StartAgents=0)I'm attempting to monitor agents over the Internet (agents and server not in same location) I followed this https://www.fontenay-ronan.fr/zabbix...-nat-firewall/ but the status for ZBX is red with error Get value from agent failed: cannot connect to [[0.0.0.0]:0]: [111] Connection refused I'm just not sure why the server is even trying to connect to the agent with this conf https://gist.github.com/95ff31d16584...253f221317ea4I thought the point for active checks was to not have to worry about NAT/port forwarding on the agent side?

    Any help would be great, this is my first time with zabbix and I've been stuck on this for 5 hours. If this is due because passive checks are stills setup please advise how I would remove all remaining passive check, does section 3.1 Prepare the template of the blog I posted above not do this?
  • samiru
    Junior Member
    • Jan 2018
    • 3

    #2
    Cannot connect to agent

    Same problem here. I have configured the agent for actice checks and it seems that agent has a connection with the server.

    /var/log/zabbix/zabbix_agentd.log:
    Code:
    14181:20180206:103051.352 In send_buffer() host:'xxx.xxx.xxx.xxx' port:10051 entries:0/100
     14181:20180206:103051.352 End of send_buffer():SUCCEED
     14181:20180206:103051.352 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     14180:20180206:103051.652 __zbx_zbx_setproctitle() title:'collector [processing data]'
     14180:20180206:103051.652 In update_cpustats()
     14180:20180206:103051.653 End of update_cpustats()
    Server side I get the following error:

    Code:
    Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused
    How can I define a host without setting a agent interface (and unreachable ip) for it?

    Help is needed!

    Comment

    • samiru
      Junior Member
      • Jan 2018
      • 3

      #3
      It seems the problem was how the item types in templates were defined. Item types need to be set to 'Zabbix agent (active)' to work with active agents.

      See https://www.fontenay-ronan.fr/zabbix...-nat-firewall/

      Edit. I also enabled active agent auto-registration. Not sure if it makes any difference here.
      Last edited by samiru; 06-02-2018, 12:19.

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by samiru
        Code:
        Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused
        How can I define a host without setting a agent interface (and unreachable ip) for it?
        Two possibilities:
        1) you are trying to use agent.ping[] key to check is it possible to connect with the agent when the agent in active mode by definition is not listening on 10050/tcp.
        2) some of the items used on this host are not "zabbix agent (active)" type but still passive items ("zabbix agent" type).
        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...