[ZBX-3553] Agent is unable to get system.hostname and system.uname Created: 2011 Feb 21 Updated: 2017 May 30 Resolved: 2011 Mar 07 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 1.8.5 |
Fix Version/s: | 1.8.5 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Sergey Syreskin | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Custom Linux, Redhat-based, kernel version 2.4.32, glibc version 2.3.6. |
Attachments: |
![]() ![]() |
||||||||
Issue Links: |
|
Description |
Agent fails to run hostname and uname commands. Agent log and ps auxw output attached. |
Comments |
Comment by Sergey Syreskin [ 2011 Feb 21 ] |
Other data items seem to work ok. |
Comment by Sergey Syreskin [ 2011 Feb 21 ] |
Agent works on other Linux'es and Solaris. |
Comment by Alexei Vladishev [ 2011 Feb 21 ] |
Was the agent compiled on the same server? |
Comment by Sergey Syreskin [ 2011 Feb 21 ] |
May be related to https://support.zabbix.com/browse/ZBX-3554 |
Comment by Sergey Syreskin [ 2011 Feb 21 ] |
Yes, agent was recently compiled on the same host. There were no environment changes since then. |
Comment by Sergey Syreskin [ 2011 Mar 01 ] |
Agent version 1.8.4 works well on this system. The problem was introduced in pre-1.8.5. |
Comment by richlv [ 2011 Mar 02 ] |
could you please show the output of "ls -l /bin/sh" ? |
Comment by Sergey Syreskin [ 2011 Mar 02 ] |
[root@trm7 zabbix]# ls -l /bin/sh |
Comment by Oleksii Zagorskyi [ 2011 Mar 02 ] |
Richlv said that my problems may be related to this issue, so i attach here. Latest documentation changes by Alexei: My userparameter from the agent config: I execute: As you see i can't receive the text "mytest", i received the "echo sh" text instead. How to get item key? p.s. tested in the latest trunk and 1.8.4 |
Comment by Aleksandrs Saveljevs [ 2011 Mar 02 ] |
Oleksiy, we had a buggy documentation. $0 is substituted by the original command ("echo $0" in your case), so Zabbix agent ends up executing "echo echo $0". Documentation has been updated. |
Comment by Aleksandrs Saveljevs [ 2011 Mar 04 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-3553. The problem seems to occur on older Linux (but not very old Linux) where WCONTINUED is defined, but not accepted by waitpid() system call. The fix is the same as in http://www.mail-archive.com/[email protected]/msg00785.html. |
Comment by Sergey Syreskin [ 2011 Mar 04 ] |
Thanks a lot, guys! |
Comment by Aleksandrs Saveljevs [ 2011 Mar 07 ] |
Fixed in pre-1.8.5 in r18266. |