[ZBX-26395] Agent2 silently crashing (no error in the logs) Created: 2025 May 07  Updated: 2026 Mar 30  Resolved: 2026 Mar 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 (G)
Affects Version/s: 7.2.6
Fix Version/s: 7.0.25rc1, 7.4.9rc1, 8.0.0beta1 (master)

Type: Problem report Priority: Trivial
Reporter: Maksym Buz Assignee: Edgars Melveris
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
Duplicate
Team: Team I
Sprint: Sprint candidates
Story Points: 0.25

 Description   

Open 2 terminals.
1 terminal: tail -f /var/log/zabbix/zabbix_agent2.log
1 terminal to change configs/restart agent2.

Make a config error, like:

Server=127.0.0.1;1.2.3.4

Increase debug level:

DebugLevel=5

Validate config:

zabbix_agent2 -T

and see (expected!):

Validating configuration file "/etc/zabbix/zabbix_agent2.conf"
zabbix_agent2 [1920653]: ERROR: Cannot validate configuration: failed to validate "Server" configuration parameter: invalid "Server" configuration: incorrect address parameter: "127.0.0.1;1.2.3.4".

Good. Let's restart the agent:

systemctl restart zabbix-agent2

Observed result:

2025/05/06 22:01:02.000381 check 'log[/tmp/test.log]' is not supported: Cannot obtain information for file "/tmp/test.log": [2] No such file or directory
2025/05/06 22:01:05.001295 check 'log[/tmp/test.log]' is not supported: Cannot obtain information for file "/tmp/test.log": [2] No such file or directory
2025/05/06 22:01:08.000535 check 'log[/tmp/test.log]' is not supported: Cannot obtain information for file "/tmp/test.log": [2] No such file or directory
2025/05/06 22:01:08.716737 Zabbix Agent 2 stopped. (7.2.6)

Debug 5 is enabled nothing is written in the logs.

systemctl is also not failing.

Trying something stupid with Zabbix-server gives me:

# systemctl restart zabbix-server
Job for zabbix-server.service failed because the control process exited with error code.
See "systemctl status zabbix-server.service" and "journalctl -xeu zabbix-server.service" for details.

No error whatsoever however;

# systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
     Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Tue 2025-05-06 22:12:01 CEST; 8s ago
    Process: 1925742 ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE (code=exited, status=1/FAILURE)
   Main PID: 1925742 (code=exited, status=1/FAILURE)
        CPU: 5ms

Expected result:

Indicate in the agent/system log that the agent cannot start due to incorrect configuration.



 Comments   
Comment by RobertG [ 2025 May 28 ]

I have noticed the same behavior. Increase logging levels on both the agent2 and proxy but no usable information. The thing I did notice is that its the Active Items that arent being sent to the proxy. The passive metrics/checks are still being reported properly. Switching proxies or Proxy Groups also has no effect.

Comment by Jurijs Klopovskis [ 2025 Nov 20 ]

I presume, the main problem i that systemctl restart zabbix-agent2 command is not reporting any errors, unlike agentd or proxy.

The only difference in agent2 service file is that it is of type simple. Other Zabbix components are of type forking.
I'll see what I can do about it.

At any rate, the errors are reported in the system log.

journalctl -xe
Comment by Edgars Melveris [ 2026 Mar 30 ]

implemented workaround in

  • pre-6.0.46rc1
  • pre-7.0.25rc1
  • pre-7.4.9rc1
  • pre-8.0.0alpha2

added

ExecStartPre=/usr/sbin/zabbix_agent2 -t -c $CONFFILE

in systemd unit

Generated at Sun Apr 05 12:44:33 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.