[ZBX-5616] numerous "timeout while executing a shell script" on system.uname and system.hostname Created: 2012 Sep 25  Updated: 2017 May 30  Resolved: 2013 Jul 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.8.13, 2.0.2
Fix Version/s: 2.1.1

Type: Incident report Priority: Minor
Reporter: Ghozlane TOUMI Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: timeout
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

armv5tel GNU/Linux synology_88f6281_109


Issue Links:
Duplicate
duplicates ZBX-5234 zabbix_agentd daemonizes improperly i... Closed

 Description   

I can't reopen ZBX-4826, so feell free to close this bug report and reopen the old one .
I'm having a bunch of linux based NAS that show a 'timeout wile executing script' when queriyng system.uname and system.hostname.
this is using an agent with normal priority so the answer to ZBX-4826 don't apply.
The boxes have somehow slow CPUs, but still...

According to source code, on unix/linux hostname and uname are retrieved by forking a shell running hostname and uname -a.

looking at coreutils source for these 2 tools, I think the data could be easily retrieved without the forks, the same way it's done for the windows version of the agent...



 Comments   
Comment by Alexei Vladishev [ 2012 Oct 09 ]

It should be optimized eventually.

Comment by Volker Fröhlich [ 2012 Oct 19 ]

I'm seing that as well, but on a regular RHEL 5 server.

The machine doesn't really do any work. The agent version is 1.8.11.

It also seems to have the negative side effect of timing out consecutive items:

3866:20121019:143427.575 Zabbix agent item [system.uname] on host [hui.meduniwien.ac.at] failed: first network error, wait for 15 seconds
3886:20121019:143427.808 Zabbix agent item [vfs.file.cksum[/etc/services]] on host [hui.meduniwien.ac.at] failed: another network error, wait for 15 seconds
3885:20121019:143428.187 Zabbix agent item [vfs.file.cksum[/usr/bin/ssh]] on host [hui.meduniwien.ac.at] failed: another network error, wait for 15 seconds

tcpdump unveils, much like for system.uname, the answering PSH/ACK datagram was only sent 2 or 3 seconds after the server timeout had appeared.

[vfs.file.cksum[/etc/services] reported ZBX_NOTSUPPORTED in error, while [vfs.file.cksum[/usr/bin/ssh] reported the proper checksum.

The 15 seconds timeout cloaks possible follow-ups.

Operation goes on as before.

I'm using the standard number of pre-forks and the items are passive.

I consider that more than a minor bug and well worth backporting. It causes me trouble on a number of machines.

Comment by Igors Homjakovs (Inactive) [ 2013 May 31 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5616

Comment by dimir [ 2013 Jun 04 ]

(1) [I] New header file (sys/utsname.h) should be added to a section in configure.in where all the headers are checked.

igorsh RESOLVED in r36103.

sasha CLOSED

Comment by dimir [ 2013 Jun 04 ]

Successfully tested. I have removed lots of unneeded files, please review my changes in r36042, r36043, r36044.

Comment by Alexander Vladishev [ 2013 Jun 06 ]

(2) Compilation warnings:

system.c: In function ‘SYSTEM_USERS_NUM’:
system.c:113:2: warning: implicit declaration of function ‘EXECUTE_INT’ [-Wimplicit-function-declaration]
system.c: In function ‘SYSTEM_UNAME’:
system.c:381:2: warning: implicit declaration of function ‘EXECUTE_STR’ [-Wimplicit-function-declaration]

dimir RESOLVED in r36120

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jun 06 ]

(3) system.uname[] should be processed same as system.hostname[]

igorsh RESOLVED in r36228.

igorsh Code improvements in r36356

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jun 06 ]

(4) REGRESSION Cannot use system.hostname in the configuration parameter HostnameItem on proxy.

zabbix_proxy [14850]: Warning: failed to get proxy name from [system.hostname])
zabbix_proxy [14850]: ERROR: hostname is not defined

igorsh RESOLVED in r36372

sasha REOPENED should be fixed on all platforms

igorsh RESOLVED in r37037

sasha CLOSED

Comment by dimir [ 2013 Jun 06 ]

(5) [I] sys/utsname.h is included in src/libs/zbxsysinfo/linux/software.c without a check.

igorsh RESOLVED in r36147.

dimir CLOSED

Comment by dimir [ 2013 Jun 06 ]

(6) [G] system.sw.arch is currently only supported on Linux. Let's add it for all other platforms.

igorsh RESOLVED in r36355.

sasha CLOSED

Comment by dimir [ 2013 Jun 06 ]

(7) [D] All the changes should appear in whatsnew. New supported platforms for system.sw.arch should appear in "Items supported by platform".

igorsh https://www.zabbix.com/documentation/2.2/manual/appendix/items/supported_by_platform
https://www.zabbix.com/documentation/2.2/manual/introduction/whatsnew220?&#miscellaneous_daemon_improvements

RESOLVED

sasha REOPENED system.sw.arch metric is supported on Tru64.

igorsh The documentation has been updated. RESOLVED

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 17 ]

(8) system.hostname metric under Windows shall accept parameters, i.e. system.hostname[netbios] and system.hostname[host]

Please add CF_HAVEPARAMS flag in src/libs/zbxsysinfo/win32/hostname.c:25

igorsh RESOLVED in r37058

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 17 ]

Successfully tested!

Comment by Oleksii Zagorskyi [ 2013 Jul 18 ]

Fix Version/s: cannot be empty -> REOPENED

Comment by Igors Homjakovs (Inactive) [ 2013 Jul 19 ]

Fixed in version 2.1.1 (trunk) r37087.

Comment by Volker Fröhlich [ 2014 Mar 08 ]

Please re-open this issue!

The results of system.uname are different between the old and the new implementation:

Old: Linux example.com 2.6.32-431.1.2.el6.ppc64 #1 SMP Sun Nov 24 09:36:46 EST 2013 ppc64 ppc64 ppc64 GNU/Linux
New: Linux example.com 2.6.32-431.1.2.el6.ppc64 #1 SMP Sun Nov 24 09:36:46 EST 2013 ppc64

That's equivalent to -i, -p and -o missing from the uname utility, it seems to me. This should be documented or changed.

Comment by richlv [ 2014 Mar 08 ]

please open a new zbx issue, this one has been merged to a released version already (that is, "fix for" version is set and we should avoid having two versions there)

Comment by Volker Fröhlich [ 2014 Mar 08 ]

ZBX-7917

Generated at Fri Mar 29 10:25:38 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.