After upgrade from 5.4.4 to 5.4.5 zabbix-agent2 basically stopped working.
The issue disappeared immediately after downgrade back to 5.4.4
Steps to reproduce:
- Upgrade from zabbix-agent2 5.4.4 to zabbix-agent2 5.4.5
Result:
Agent unusable, checks failing
From the zabbix-agent2 log:
2021/09/29 16:30:43.246468 Zabbix Agent 2 stopped. (5.4.4)
2021/09/30 00:30:43.343153 Starting Zabbix Agent 2 (5.4.5)
2021/09/30 00:30:43.343718 OpenSSL library (OpenSSL 1.1.1g FIPS 21 Apr 2020) initialized
2021/09/30 00:30:43.343793 using configuration file: /etc/zabbix/zabbix_agent2.conf
2021/09/30 00:30:43.343861 using plugin 'Agent' providing following interfaces: exporter
...
2021/09/30 00:30:43.344074 using plugin 'ZabbixSync' providing following interfaces: exporter
2021/09/30 00:30:43.344172 Zabbix Agent2 hostname: [monitored01]
2021/09/30 00:30:44.284060 [Postgres] Connection failed: failed to connect to `host=localhost user=zbx_monitor database=postgres`: hostname resolving error (lookup localhost: no suc
h host).
2021/09/30 00:30:44.443604 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443619 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443624 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443629 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443633 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443640 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443645 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443649 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443654 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
2021/09/30 00:30:44.443658 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
....
2021/09/30 00:30:44.446318 [Postgres] Connection failed: failed to connect to `host=localhost user=zbx_monitor database=postgres`: hostname resolving error (lookup localhost: no such host).
Expected:
Agent working normally
zabbix-agent2.conf
ControlSocket=/tmp/agent.sock
HostMetadata=Linux
Hostname=MONITORED01
Include=/etc/zabbix/zabbix_agent2.d/*.conf
LogFileSize=0
LogFile=/var/log/zabbix/zabbix_agent2.log
PidFile=/var/run/zabbix/zabbix_agent2.pid
Server=10.xx.xx.xxx,10.xx.xx.xxx,10.xx.xxx.xx,10.xx.xxx.xx,10.x.xx.xx