[ZBX-8108] zabbix 2.2.3 net.udp.listen[port] check is not stable Created: 2014 Apr 17 Updated: 2017 May 30 Resolved: 2014 Apr 24 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.2.3 |
Fix Version/s: | 2.0.12rc1, 2.2.4rc1, 2.3.0 |
Type: | Incident report | Priority: | Major |
Reporter: | epingnet | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
zabbix 2.2.3 |
Issue Links: |
|
Description |
When I want to check NTP service, I use net.udp.listen[123], The return value is not stable, but my NTP service is running, and zabbix 2.2.2 not same issue. [root@****** zabbix]# while true; do zabbix_get -I 192.168.18.1 -s 172.30.250.252 -k net.udp.listen[123]; sleep 5; done 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 |
Comments |
Comment by Oleksii Zagorskyi [ 2014 Apr 18 ] |
I tried to reproduce it for 3 hours with 1 second interval - was not able to do it. |
Comment by Juris Miščenko (Inactive) [ 2014 Apr 28 ] |
Fix implemented in 2.0.12rc1 r44846, 2.2.4rc1 r44847, 2.3.0 (trunk) r44848 |
Comment by Juris Miščenko (Inactive) [ 2014 Apr 28 ] |
The way listening ports for net.tcp and net.udp items are listed is by reading the /proc/net{tcp,udp} files. The old implementation attempted to read the file in a single operation. Upon failure, the buffer size would be doubled in size and the file position rewinded and the operation re-attempted until the file was successfully read. This proved to be unstable, as the read operation would read at most 4kB from the file and report an incorrect read memory amount. This was replaced by a different approach, which embraces the atomic limitations of read but does not use seeking. Now, the file is read in blocks in a forward-only motion. This has solved the issue. |
Comment by Durval Menezes [ 2014 Sep 29 ] |
This is still very much intermittent on Solaris 10 running the current zabbix_agents_2.2.5.solaris10.sparc.tar.gz: # while true; do bin/zabbix_get -s 127.0.0.1 -k 'net.udp.listen[ntp]'; echo $?; sleep 5; done 141 141 141 0 0 0 0 0 141 zabbix_get [5292]: Get value error: ZBX_TCP_READ() failed: [131] Connection reset by peer 255 141 141 141 141 0 0 ^C |
Comment by Aleksandrs Saveljevs [ 2014 Sep 30 ] |
"ntp" is not a valid argument for "net.udp.listen[]" - try using "net.udp.listen[123]" instead. Although zabbix_get should print ZBX_NOTSUPPORTED in the former case... |