-
Problem report
-
Resolution: Duplicate
-
Major
-
None
-
5.2.6, 5.4.0
-
None
-
centos7
Hello,
I have an issue on the zabbix agent2 using default configuration on net.tcp.port key for a target that is a valid host, different from the agent but whose requested port is not opened.
The expected result would be to receive 0 (port is not opened)
Instead, it returns after exactly 60 seconds
$ zabbix_get -s 127.0.0.1 -k 'net.tcp.port[10.202.101.100,22222]' zabbix_get [2964]: Timeout while executing operation $ time zabbix_get -s 127.0.0.1 -k 'net.tcp.port[10.202.101.100,10051]' zabbix_get [4427]: Timeout while executing operation real 1m0.011s user 0m0.007s sys 0m0.005s
On the verbose agent log
2021/05/19 09:14:54.092375 received passive check request: 'net.tcp.port[10.202.101.100,10051]' from '127.0.0.1' 2021/05/19 09:14:54.092452 [1] processing update request (1 requests) 2021/05/19 09:14:54.092464 [1] adding new request for key: 'net.tcp.port[10.202.101.100,10051]' 2021/05/19 09:14:54.092470 [1] created direct exporter task for plugin 'TCP' itemid:0 key 'net.tcp.port[10.202.101.100,10051]' 2021/05/19 09:14:54.092492 executing direct exporter task for key 'net.tcp.port[10.202.101.100,10051]' 2021/05/19 09:15:07.236176 executed direct exporter task for key 'net.tcp.port[10.202.101.100,10051]' 2021/05/19 09:15:54.095484 sending passive check response: ZBX_NOTSUPPORTED: 'Timeout occurred while gathering data.' to '127.0.0.1' 2021/05/19 09:17:01.412247 executed direct exporter task for key 'net.tcp.port[10.202.101.100,10051]'
Successfully reproduce the case on
- zabbix agent2 5.2.6 on CentOS7
- zabbix agent2 5.4.0 on CentOS7
Failed to reproduce the case on
- zabbix agent2 5.2.6 on Ubuntu 20.04 (but infrastructure is very different in there, I wouldn't link it to an OS issue)
my outsider, non-go programmer advice is that it would be best to call net.DialTimeout with the configuration timeout instead of net.Dial at https://github.com/zabbix/zabbix/blob/5.4.0/src/go/plugins/net/tcp/tcp.go#L107
- duplicates
-
ZBX-21903 The agent fails to obtain data because a monitoring item times out
- Closed