[ZBX-10018] Inconsistent messages in Debuglog when userparameter terminated by timeout Created: 2015 Oct 29  Updated: 2017 May 30  Resolved: 2015 Dec 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: None
Fix Version/s: 3.0.0alpha5

Type: Incident report Priority: Trivial
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: debugging, inconsistency
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Agent is 2.4.7rc1 (revision 54982)

A test with 2 seconds command time execution:

# time zabbix_get -s localhost -k sleep[2]
2
  3370:20151029:101807.571 Requested [sleep[2]]
  3370:20151029:101807.572 In zbx_popen() command:' sleep 2; echo 2'
  3370:20151029:101807.572 End of zbx_popen():9
  3374:20151029:101807.572 zbx_popen(): executing script
 ...
  3370:20151029:101809.574 In zbx_waitpid()
  3370:20151029:101809.574 zbx_waitpid() exited, status:0
  3370:20151029:101809.574 End of zbx_waitpid():3374
  3370:20151029:101809.574 EXECUTE_STR() command:' sleep 2; echo 2' len:1 cmd_result:'2'
  3370:20151029:101809.574 Sending back [2]
  3370:20151029:101809.574 listener #1 [waiting for connection]

everything i fine here.

Another test with 3 seconds command time execution (more than Timeout):

# time zabbix_get -s localhost -k sleep[3]
ZBX_NOTSUPPORTED: Timeout while executing a shell script.
  3370:20151029:101811.336 listener #1 [processing request]
  3370:20151029:101811.336 Requested [sleep[3]]
  3370:20151029:101811.336 In zbx_popen() command:' sleep 3; echo 3'
  3370:20151029:101811.336 End of zbx_popen():9
  3378:20151029:101811.337 zbx_popen(): executing script
...
  3370:20151029:101814.336 In zbx_waitpid()
  3370:20151029:101814.337 zbx_waitpid() killed by signal 15
  3370:20151029:101814.337 End of zbx_waitpid():3378
  3370:20151029:101814.338 listener #1 [waiting for connection]

why we don't see here something similar, like "Sending back [ZBX_NOTSUPPORTED: Timeout while executing a shell script.]" ?



 Comments   
Comment by Viktors Tjarve [ 2015 Nov 04 ]

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

Comment by Andris Zeila [ 2015 Nov 20 ]

(1) If we are logging 'sending back' message when we have error message, we should also log simple Sending back [ZBX_NOTSUPPORTED] if there are no error messages set.

And minor code optimization:

-                               zabbix_log(LOG_LEVEL_DEBUG, "Sending back [%s: %s]",ZBX_NOTSUPPORTED, *value);
+                               zabbix_log(LOG_LEVEL_DEBUG, "Sending back [" ZBX_NOTSUPPORTED ": %s]", *value);

viktors.tjarve RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10018 r56856.

wiper CLOSED, please review my changes in r57007

viktors.tjarve Changes REVIEWED and ACCEPTED.

Comment by Oleksii Zagorskyi [ 2015 Nov 20 ]

Please confirm that the value after "Sending back" is the same as actually send back to server, including spaces etc.
I'm sure it must be exactly the same.

viktors.tjarve Code optimisation in sub-issue (1) does not affect the log file entry style.

Comment by Andris Zeila [ 2015 Dec 04 ]

Successfully tested

Comment by Viktors Tjarve [ 2015 Dec 04 ]

Released in:

  • pre-3.0.0alpha5 r57009 and r57010
Generated at Sat Apr 20 17:23:48 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.