0

I am trying to register zabbix agent to zabbix server but facing this error[Received empty response from Zabbix Agent at [XX.XXX.XX.XX]. Assuming that agent dropped connection because of access permissions.] in zabbix server UI.

I have elb top of Zabbix server and using elb dns name in zabbix agent conf file. Seems registration is happening but agent server is not active[Availability]enter image description here.

**conf file** 

    Server=elb end point
    ServerActive=elb end point

Any lead would be appreciated.

Shubham Jain
  • 199
  • 1
  • 4
  • 15
  • Is that a passive item and the server real address is obviously not the same as the elb address? Switch everything to active monitoring and try again. – Iron Bishop Mar 25 '21 at 19:29
  • are you able to resolve elb address from agent and hostname of zabbix agent from zabbix server? if yes then switch from zabbix agent to zabbix agent active and see latest data with more details option – ROHIT KHURANA Mar 26 '21 at 04:54
  • @ironBishop and rohit I am able to telnet vice versa [agent and zabbix server] on elb end point and i am not changing hostname of zabbix agent.. what do you mean via switch to passive/Active.. do i need to comment **ServerActive**? – Shubham Jain Mar 26 '21 at 05:01
  • no, I mean this https://blog.zabbix.com/zabbix-agent-active-vs-passive/9207/ – Iron Bishop Mar 27 '21 at 07:27

1 Answers1

2

This is error from agent alowed hosts. Often when you are using the Zabbix server in docker and agent from system on the same IP.

see log file at first

$ cat /var/log/zabbix/zabbix_agentd.log | grep connection

now compare incoming connection: connection from "SOME_IP" and allowed hosts: "SOME_IPs" example output : failed to accept an incoming connection: connection from "172.17.0.2" rejected, allowed hosts: "127.0.0.1"

This is your problem. connection from 172.17.0.2 (docker) is not allowed in your zabbix_agentd.conf. You will have to edit /etc/zabbix/zabbix_agentd.conf like this :

Server=::ffff:127.0.0.1,172.17.0.2 ServerActive=::ffff:127.0.0.1,172.17.0.2

Last step is restart agent

$ sudo systemctl restart zabbix-agent