[ZBX-22805] JavaScript engine exception "Error: alloc failed" (Kubernetes, Veeam templates) Created: 2023 May 15  Updated: 2024 Apr 10  Resolved: 2023 Jun 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Templates (T)
Affects Version/s: 6.0.16
Fix Version/s: 6.0.19rc1, 6.4.4rc1, 7.0.0alpha2, 7.0 (plan)

Type: Problem report Priority: Critical
Reporter: Sarang Assignee: Andrejs Kozlovs
Resolution: Fixed Votes: 1
Labels: Agent, kubernetes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-05-15-13-39-26-764.png     PNG File image-2023-05-15-13-39-59-437.png    
Issue Links:
Causes
causes ZBX-23722 Drastically higher memory usage for S... Closed
Duplicate
Team: Team C
Sprint: Sprint 100 (May 2023), Sprint 101 (Jun 2023)
Story Points: 1

 Description   

{}Hello Team,
 
I have installed Zabbix Kubernetes helm chart(v6.0) on AKS cluster. I'm able to get latest data for Kubernetes cluster state whereas no data for Kubernetes Nodes. For Kubernetes nodes, getting last value as Error: alloc failed & problem opened as Kubernetes: Failed to get nodes. Please help me resolve the issue.
 
Note: I have disabled proxy from helm chart & zabbix-agent is reporting to proxy of my own Zabbix tenant outside of kube cluster. 
 
Zabbix-proxy logs:
82883:20230515:104437.224 cannot send list of active checks to "****": host [aks-dev-vm0000] not found
82887:20230515:104437.350 cannot send list of active checks to "****": host [aks-dev**-*****-vm**0000*y] not found
82887:20230515:104437.408 cannot send list of active checks to "****": host [aks-dev**-*****-vms**0000**] not found
 
Zabbix Agent logs:
2023/05/15 15:44:14.837646 failed to accept an incoming connection: connection from "***" rejected, allowed hosts: "*****"
2023/05/15 15:44:24.837072 failed to accept an incoming connection: connection from "****" rejected, allowed hosts: "****"
2023/05/15 15:44:34.837052 failed to accept an incoming connection: connection from "****" rejected, allowed hosts: "*****" ​
 
Thanks and Regards,
Sarang
Result:



 Comments   
Comment by Oleksii Zagorskyi [ 2023 May 23 ]

Let me share another case (Veeam* templates) which, I believe, has the same nature.

First attempt it was with timeout 10 seconds.
After raising it to 30 seconds, another error - "alloc failed" is happening:

~> tail -f /var/log/zabbix/zabbix_proxy.log
3865201:20230523:155910.918 [ VEEAM MANAGER ] ERROR: Error: cannot get URL: Timeout was reached.
3865201:20230523:155955.525 [ VEEAM MANAGER ] ERROR: Error: alloc failed.

The error:

[ VEEAM MANAGER ] ERROR: Error: alloc failed.

comes from this piece of JavaScript code:

catch (error) {
    error += (String(error).endsWith('.')) ? '' : '.';
    Zabbix.log(3, '[ VEEAM MANAGER ] ERROR: ' + error);
    return JSON.stringify({'error': error});
}

of official script item "Veeam Manager: Get metrics" of "Veeam Backup Enterprise Manager by HTTP" official template.

The "alloc failed" message is dynamic variable, returned in case if some specific/related things happens.
The message is defined here: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxembed/duktape.c#3218

It looks to me it might be not about integration, but about JavaScript engine itself and some resources management.

Comment by Andrejs Kozlovs [ 2023 Jun 09 ]

Available in:

Comment by Martins Valkovskis [ 2023 Jun 14 ]

Updated documentation:

Generated at Sat Sep 06 23:52:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.