The new zabbix_sender behaviour introduced in
ZBXNEXT-4967 can cause long timeouts when a server in the ServerActive is not running/responding.
Steps to reproduce:
- Add a server to the zabbix_agentd.conf ServerActive= section which exists, but can't be connected to on port 10051.
- Run zabbix_sender -c zabbix_agentd.conf -s test -k test -o 0 -vv
- Note the long timeout
In the example above, I had no yet created a firewall rule to allow access to one of the two servers in my config.
In these cases, removing the invalid server or allowing access to it (assuming the server is running and port 10051 is open) fixes the issue, but the behaviour change is enough that these issues may not be obvious - particularly in my case where I default to adding extra ServerActive for every host, but only some actually need the config (Ansible laziness)
Ideally, zabbix_sender should follow the existing Timeout for these connections to prevent the long wait for a timeout.
Make the new behaviour of sending to all servers require a special argument (or an argument to use the old behaviour of just the first server)