[ZBX-13607] wrong error message if ping-script exitcode = 1 Created: 2018 Mar 13  Updated: 2018 Apr 11  Resolved: 2018 Apr 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 3.4.9rc1, 4.0.0alpha6, 4.0 (plan)

Type: Incident report Priority: Trivial
Reporter: Stefan Assignee: Andris Zeila
Resolution: Fixed Votes: 0
Labels: exitcodes, globalscripts
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File ping_errormsg.png    
Issue Links:
Causes
caused by ZBXNEXT-1380 Zabbix server should check the return... Closed
Team: Team A
Sprint: Sprint 30, Sprint 31
Story Points: 1

 Description   

Steps to reproduce:
run the default ping-script to an unreachable host, you will see the errormessage "Cannot execute script", but the script was executed and the exit code is 1 instead of 0

Result:
See screenshot...

Expected:
No errormessage, because the script runs fine, only the host is unreachable so the ping-exit code is 1



 Comments   
Comment by Andrei Gushchin (Inactive) [ 2018 Mar 13 ]

Thanks for the reporting.
What version are you talking about?

Comment by Stefan [ 2018 Mar 13 ]

uups, sorry I forgot that:

zabbix_server -V
zabbix_server (Zabbix) 3.4.6
Revision 76823 15 January 2018, compilation time: Jan 15 2018 09:10:25

Comment by Kaspars Mednis [ 2018 Mar 16 ]

Steps to reproduce:

  • Create some host with unreachable IP address
  • Ping that host using Zabbix built-in ping script

Result as on screenshot (ping command was executed)

Comment by Andris Zeila [ 2018 Apr 04 ]

The compromise would be to change ping script to return 0 on timeouts. Something like

ping -c 3 {HOST.CONN}; case $? in [01]) true;; *) false;; esac

Not pretty, but does the job.

Comment by Andris Zeila [ 2018 Apr 04 ]

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

Comment by Viktors Tjarve [ 2018 Apr 09 ]

Successfully tested.

Comment by Andris Zeila [ 2018 Apr 10 ]

Released in:

  • pre-3.4.9rc1 r79497
  • pre-4.0.0alpha6 r79498
Generated at Fri Mar 29 16:56:52 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.