[ZBX-13216] include/actions.inc.php:1703 error on screen page Created: 2017 Dec 19  Updated: 2018 Oct 08  Resolved: 2018 Oct 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 3.4.4
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Dmitry Verkhoturov Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File zbx_export_hosts.xml     XML File zbx_export_screens.xml    

 Description   

When I open particular screen in web (Zabbix 3.4.4), I see following error on top of it:

Undefined offset: 0 [jsrpc.php:191 ? CScreenHostgroupTriggers->get() ? make_latest_issues() ? makeEventsActions() in include/actions.inc.php:1703]

Problem line:

1702         foreach ($problems as $index => $problem) {
1703                 $event_alerts = array_key_exists($problem['eventid'], $alerts) ? $alerts[$problem['eventid']][0] : [];


 Comments   
Comment by Aleksejs Petrovs [ 2017 Dec 19 ]

Hello Dmitry,

Please provide the detailed information about your environment and how to reproduce the issue to confirm if it is a Bug.

Please note that ZBX is a Bug Tracker, not a free support page. For free support please follow this link, or you can ask for a support from Zabbix Professionals.

Regards,
Aleksejs!

Comment by Dmitry Verkhoturov [ 2017 Dec 20 ]

aleksejs.petrovs, could you please tell me which details do I need to provide? I have a bunch of "Host group issues" widgets on the page and sometimes (not 100% of time) I see PHP error I've mentioned:

Undefined offset: 0 [jsrpc.php:191 → CScreenHostgroupTriggers->get() → make_latest_issues() → makeEventsActions() in include/actions.inc.php:1703]

From my POV (probably wrong) I can assume what array check in some conditions returns True in cases when there is no event and you can't access 0th element of empty array which raise an error:

$alerts[$problem['eventid']][0]

I could alter that php file to write some debug info to help you debug the issue if you need that - if so, please give me a patch to apply.

Paskal Olegs, that's correct. I don't know why and in which exact conditions, but on some screens once in a while after page refresh I see that PHP error. Maybe it's related with new PROBLEM events, maybe it's related with events going to OK, maybe it's something else - I don't know and I'm afraid I don't have enough knowledge to find out. Please tell me if I could do anything useful to help you in issue investigation.

Comment by Olegs Vasiljevs (Inactive) [ 2017 Dec 27 ]

Hello Dmitry!

Do we understand correctly that in order to reproduce an issue we need to follow this algorithm?

  1. Add a Screen with multiple "Host group issues" widgets.
  2. Have some triggers configured for the host group.
  3. Have some trigger actions tied to the host group triggers.
  4. Make sure an array of events are generated for the said triggers.
  5. Refresh the Screen.

Regards,
Oleg

Update:
Tried with vanilla 3.4.4 Zabbix installation, could not succeed. Both browser tab extenstive refreshes were used and built-in refresh intervals.
Host configuration export and screen configuration export attached to the issue. Action configuration:
Action 1 with condition "Host group = Group 1" and operation "echo "Group 1 action" >> /tmp/some.log"
Action 2 with condition "Host group = Group 2" and operation "echo "Group 2 action" >> /tmp/some.log"
Update2: Also tried with email notifications, no success in reproducing.

Value sending script:

#!/usr/bin/bash

for i in {1..1000}; do
rvalue=$((1 + RANDOM % 100))
rhost1=$((1 + RANDOM % 2))
rhost2=$((1 + RANDOM % 2))
ritem=$((1 + RANDOM % 3))
zabbix_sender -z 127.0.0.1 -s "Test$rhost1-$rhost2" -k item$ritem -o $rvalue
sleep 1
done

Paskal, can I ask to try the same steps?
Regardless of the results, in case an issue happens again, is it possible for you to collect the web debug report and attach it to the issue? Debug mode can be turned in user group configuration, but please pay attention it would produce a higher load on your web server.

Comment by Edgars Melveris [ 2018 Sep 21 ]

Hi Dmitry.

Does this problem still happen?

Comment by Dmitry Verkhoturov [ 2018 Sep 21 ]

Yes.

Comment by Aigars Kadikis [ 2018 Sep 25 ]

Hello Dmitry,

We will need to elaborate to register this a bug. Please update backend and frontend to the latest 3.4.x version which is available today. Clear the browser cache before you start using frontend.

What operating system you are using? Which web server engine serves the UI? Can you confirm the PHP files are not customized? Please confirm this is not HA situation.

Kind regards,

Comment by Dmitry Verkhoturov [ 2018 Oct 06 ]

My colleagues can't reproduce it at the moment, please feel free to resolve this one - we'll return to this if we could reproduce it in 4.0.

Comment by Aigars Kadikis [ 2018 Oct 08 ]

Thank you, Dmitry.

Hope 4.0 suits you well.

Closing this ticket now.

 

Generated at Sun Apr 06 05:07:04 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.