Zabbix agent 4.4.6 (on rhel 7.6) is not polled by zabbix server 4.4.6, displays an error: Get value from agent failed: cannot connect to
Wherein:
1. from the server, the command "zabbix_get -s 10.200.2.116 -k agent.ping" returns "1"
2. on rhel 7.6 where the agent is installed, the command "netstat -tulp | grep zabbix" returns:
tcp 0 0 0.0.0.0:zabbix-agent 0.0.0.0:* LISTEN 6667 / zabbix_agentd
tcp6 0 0 [::]: zabbix-agent [::]: * LISTEN 6667 / zabbix_agentd
udp 0 0 zabbix4db: ntp 0.0.0.0:* 1980 / ntpd
3. in the zabbix agent log:
6667: 20200312: 144206.726 Starting Zabbix Agent [ZABBIX-MARIADB]. Zabbix 4.4.6 (revision 8cc702429d).
6667: 20200312: 144206.726 **** Enabled features ****
6667: 20200312: 144206.726 IPv6 support: YES
6667: 20200312: 144206.726 TLS support: YES
6667: 20200312: 144206.726 ************************........
6667: 20200312: 144206.726 using configuration file: /etc/zabbix/zabbix_agentd.conf
6667: 20200312: 144206.726 In zbx_load_modules ()
6667: 20200312: 144206.726 End of zbx_load_modules (): SUCCEED
6667: 20200312: 144206.726 In init_collector_data ()
6667: 20200312: 144206.726 In zbx_dshm_create () size: 0
6667: 20200312: 144206.727 End of zbx_dshm_create (): SUCCEED shmid: -1
6667: 20200312: 144206.727 End of init_collector_data ()
6667: 20200312: 144206.727 agent # 0 started [main process]
6668: 20200312: 144206.727 agent # 1 started [collector]
6668: 20200312: 144206.727 In init_cpu_collector ()
6668: 20200312: 144206.727 End of init_cpu_collector (): SUCCEED
6669: 20200312: 144206.728 agent # 2 started[listener # 1]
6669: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144206.728 In update_cpustats ()
6670: 20200312: 144206.728 agent # 3 started[listener # 2]
6670: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 End of update_cpustats ()
6671: 20200312: 144206.728 agent # 4 started[listener # 3]
6671: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 zbx_setproctitle () title: 'collector [idle 1 sec]'
6669: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6669: 20200312: 144206.729 End of zbx_tls_init_child ()
6669: 20200312: 144206.729 zbx_setproctitle () title: 'listener # 1 [waiting for connection]'
6670: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6670: 20200312: 144206.729 End of zbx_tls_init_child ()
6670: 20200312: 144206.729 zbx_setproctitle () title: 'listener # 2 [waiting for connection]'
6671: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6671: 20200312: 144206.730 End of zbx_tls_init_child ()
6671: 20200312: 144206.730 zbx_setproctitle () title: 'listener # 3 [waiting for connection]'
6668: 20200312: 144207.728 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144207.728 In update_cpustats ()
6668: 20200312: 144207.729 End of update_cpustats ()
6668: 20200312: 144207.729 zbx_setproctitle () title: 'collector [idle 1 sec]'
6668: 20200312: 144208.729 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144208.729 In update_cpustats ()
6668: 20200312: 144208.729 End of update_cpustats ()
6668: 20200312: 144208.729 zbx_setproctitle () title: 'collector [idle 1 sec]'
6668: 20200312: 144209.729 zbx_setproctitle () title: 'collector [processing data]'
Wherein:
1. from the server, the command "zabbix_get -s 10.200.2.116 -k agent.ping" returns "1"
2. on rhel 7.6 where the agent is installed, the command "netstat -tulp | grep zabbix" returns:
tcp 0 0 0.0.0.0:zabbix-agent 0.0.0.0:* LISTEN 6667 / zabbix_agentd
tcp6 0 0 [::]: zabbix-agent [::]: * LISTEN 6667 / zabbix_agentd
udp 0 0 zabbix4db: ntp 0.0.0.0:* 1980 / ntpd
3. in the zabbix agent log:
6667: 20200312: 144206.726 Starting Zabbix Agent [ZABBIX-MARIADB]. Zabbix 4.4.6 (revision 8cc702429d).
6667: 20200312: 144206.726 **** Enabled features ****
6667: 20200312: 144206.726 IPv6 support: YES
6667: 20200312: 144206.726 TLS support: YES
6667: 20200312: 144206.726 ************************........
6667: 20200312: 144206.726 using configuration file: /etc/zabbix/zabbix_agentd.conf
6667: 20200312: 144206.726 In zbx_load_modules ()
6667: 20200312: 144206.726 End of zbx_load_modules (): SUCCEED
6667: 20200312: 144206.726 In init_collector_data ()
6667: 20200312: 144206.726 In zbx_dshm_create () size: 0
6667: 20200312: 144206.727 End of zbx_dshm_create (): SUCCEED shmid: -1
6667: 20200312: 144206.727 End of init_collector_data ()
6667: 20200312: 144206.727 agent # 0 started [main process]
6668: 20200312: 144206.727 agent # 1 started [collector]
6668: 20200312: 144206.727 In init_cpu_collector ()
6668: 20200312: 144206.727 End of init_cpu_collector (): SUCCEED
6669: 20200312: 144206.728 agent # 2 started[listener # 1]
6669: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144206.728 In update_cpustats ()
6670: 20200312: 144206.728 agent # 3 started[listener # 2]
6670: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 End of update_cpustats ()
6671: 20200312: 144206.728 agent # 4 started[listener # 3]
6671: 20200312: 144206.728 In zbx_tls_init_child ()
6668: 20200312: 144206.728 zbx_setproctitle () title: 'collector [idle 1 sec]'
6669: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6669: 20200312: 144206.729 End of zbx_tls_init_child ()
6669: 20200312: 144206.729 zbx_setproctitle () title: 'listener # 1 [waiting for connection]'
6670: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6670: 20200312: 144206.729 End of zbx_tls_init_child ()
6670: 20200312: 144206.729 zbx_setproctitle () title: 'listener # 2 [waiting for connection]'
6671: 20200312: 144206.729 OpenSSL library (version OpenSSL 1.0.1e-fips 11 Feb 2013) initialized
6671: 20200312: 144206.730 End of zbx_tls_init_child ()
6671: 20200312: 144206.730 zbx_setproctitle () title: 'listener # 3 [waiting for connection]'
6668: 20200312: 144207.728 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144207.728 In update_cpustats ()
6668: 20200312: 144207.729 End of update_cpustats ()
6668: 20200312: 144207.729 zbx_setproctitle () title: 'collector [idle 1 sec]'
6668: 20200312: 144208.729 zbx_setproctitle () title: 'collector [processing data]'
6668: 20200312: 144208.729 In update_cpustats ()
6668: 20200312: 144208.729 End of update_cpustats ()
6668: 20200312: 144208.729 zbx_setproctitle () title: 'collector [idle 1 sec]'
6668: 20200312: 144209.729 zbx_setproctitle () title: 'collector [processing data]'