[ZBX-22434] Zabbix agent2 crashes because of Agent 2 plugins Created: 2023 Feb 28  Updated: 2024 Jul 10  Resolved: 2023 Mar 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: 6.0.13
Fix Version/s: 6.0.15rc1, 6.2.9rc1, 6.4.1rc1, 7.0.0alpha1, 7.0 (plan)

Type: Problem report Priority: Major
Reporter: Brian van Baekel Assignee: Eriks Sneiders
Resolution: Fixed Votes: 1
Labels: agent2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team INT
Sprint: Sprint 98 (Mar 2023)
Story Points: 1

 Description   

Install fresh RHEL like machine.
Keep firewalld enabled, install zabbix-agent2 6.0.13

Observe agent (debug 5) log, while it is hanging on startup:

2023/02/28 20:33:33.621264 [0] starting listener for '0.0.0.0:10050'

Stop firewalld - restart agent, problem resolved.

Expected behaviour: Agent just working with firewalld enabled, like versions before 6.0.13.



 Comments   
Comment by Jurijs Klopovskis [ 2023 Mar 01 ]
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2023-03-01 16:49:02 EET; 33min ago
     Docs: man:firewalld(1)
 Main PID: 851 (firewalld)
    Tasks: 2 (limit: 24874)
   Memory: 38.4M
   CGroup: /system.slice/firewalld.service
           └─851 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopidMar 01 16:49:02 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 01 16:49:02 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 01 16:49:03 localhost.localdomain firewalld[851]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release.>
[root@localhost ~]# systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2023-03-01 17:02:26 EET; 19min ago
 Main PID: 1432 (zabbix_agent2)
    Tasks: 9 (limit: 24874)
   Memory: 15.4M
   CGroup: /system.slice/zabbix-agent2.service
           └─1432 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.confMar 01 17:02:26 localhost.localdomain systemd[1]: Started Zabbix Agent 2.
Mar 01 17:02:26 localhost.localdomain zabbix_agent2[1432]: Starting Zabbix Agent 2 (6.0.13)
Mar 01 17:02:26 localhost.localdomain zabbix_agent2[1432]: Zabbix Agent2 hostname: [Zabbix server]
Mar 01 17:02:26 localhost.localdomain zabbix_agent2[1432]: Press Ctrl+C to exit.
[root@localhost ~]# cat /etc/almalinux-release
AlmaLinux release 8.7 (Stone Smilodon)

brian.baekel, can you please elaborate on the exact system you are using.

Comment by Brian van Baekel [ 2023 Mar 01 ]

yurii test machine:

# cat /etc/*-release
Rocky Linux release 8.7 (Green Obsidian)
NAME="Rocky Linux"
VERSION="8.7 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.7"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.7 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.7"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.7"
Rocky Linux release 8.7 (Green Obsidian)
Rocky Linux release 8.7 (Green Obsidian)
Rocky Linux release 8.7 (Green Obsidian)

We can provide access to various machines, if that might help you

Comment by Jurijs Klopovskis [ 2023 Mar 01 ]

This seems to be unrelated to firewall.

Instead there is a crash occurring. See using journalctl -xe command.

Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: Starting Zabbix Agent 2 (6.0.13)
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: Zabbix Agent2 hostname: [Zabbix server]
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: Press Ctrl+C to exit.
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: panic: failed to obtain PID of dead child process: no child processes
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: goroutine 10 [running]:
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: main.listenOnPluginFail(0x0?, {0xc000177890, 0xa})
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]:         /tmp/build-rhel-8-x86_64.3bCfui3H/buildroot/BUILD/zabbix-6.0.13/src/go/cmd/zabbix_agent2/external_nix.go:96 +0x168
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]: created by main.initExternalPlugin
Mar 01 17:33:48 bvbrocky8 zabbix_agent2[8398]:         /tmp/build-rhel-8-x86_64.3bCfui3H/buildroot/BUILD/zabbix-6.0.13/src/go/cmd/zabbix_agent2/external.go:94 +0x11f
Mar 01 17:33:48 bvbrocky8 systemd[1]: zabbix-agent2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 01 17:33:48 bvbrocky8 systemd[1]: zabbix-agent2.service: Failed with result 'exit-code'.

systemd then attempts to restart the agent, and eventually succeeds.
So it does not hang at the moment of 
starting listener for '0.0.0.0:10050'
It is already dead at that point. But then is eventually restarted by systemd.

Is not related to selinux.

The only workaround for now is to disable mongodb and postgresql plugins, if you don't need them. Unfortunately in 6.0, they cannot be uninstalled while keeping the agent2 installed. To disable them edit their

/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf

files and comment out the

*Plugins.*.System.Path=*

at the very top. Or just wait for it to start eventually.

esneiders, can you have a look at the issue? I'm pretty sure we had something similar before.

Comment by Eriks Sneiders [ 2023 Mar 13 ]

Fixed in 

Generated at Thu Jun 05 22:24:49 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.