0

I'm trying to monitor a virtual machine from another. have two ubuntu virtual machines one with the zabbix server and another with the zabbix agent. but after setting up my agent by using my public ip i get this error :Received empty response from Zabbix Agent at [192.168.x.x]. Assuming that agent dropped connection because of access permissions.

in /etc/zabbix/zabbix_agentd i changed my server to server= 127.0.0.1,192.168.x.x and i turned off my firewall just in case.

My agent status: enter image description here If you are familiar please help and /var/log/zabbix_agentd.log

enter image description here

nessHaf
  • 127
  • 1
  • 4
  • 15
  • See the logs of the client... – KamilCuk May 11 '21 at 11:57
  • @KamilCuk you mean /var/log/zabbix/zabbix_server.log ? – nessHaf May 11 '21 at 12:03
  • No, I mean of _client_. I mean `systemctl status zabbix-agentd` or `journalctl -u zabbix-agentd` or whatever you did setup your client to log into. – KamilCuk May 11 '21 at 12:04
  • @KamilCuk i updated my post with a screenshot – nessHaf May 11 '21 at 12:10
  • Please do not post screenshots of text. Post the text instead. Great, it's working - so `zabbix_get` works from server to the client? – KamilCuk May 11 '21 at 12:12
  • @KamilCuk oh yeah sorry about the screen shot but I can't copy and past that's why. as for zabbix_get i wasn't capable of installing it unfortunately but I checked my agent log and I found failed to accept an incoming connection – nessHaf May 11 '21 at 12:16
  • Your file viewer is truncating the lines hiding error message. Use a different file viewer. Or just `cat`. – KamilCuk May 11 '21 at 12:18
  • @KamilCuk failed to accept an incoming connection from "Ip of the server VM" rejected, allowed hosts "Ip of the agent VM " – nessHaf May 11 '21 at 12:22
  • 1
    So you know - the remove address IP and that it's not allowed. So allow it. Add the server IP to `Server=` and in `ActiveServer=` in client configuration. – KamilCuk May 11 '21 at 12:22
  • so i need to put the ip of the server not the agent – nessHaf May 11 '21 at 12:23
  • @KamilCuk It's working. Thank you very much – nessHaf May 11 '21 at 12:28

1 Answers1

1

In logs you got:

Failed to accept an incoming connection: connection from "192.168.243.2" rejected, allowed hosts: "127.0.0.1,192.168.243.3"

The log itself tells you what host is trying to connect and what hosts are allowed :)

It's trying to connect x.x.x.2 and the allowed host in the config is x.x.x.3. Change agent config 192.168.243.2 to 192.168.243.3 +restart and it should work

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
majcher_zlo
  • 142
  • 1
  • 4