Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26395

Agent2 silently crashing (no error in the logs)

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.2.6
    • Agent2 (G)
    • None

      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.

            zabbix.dev Zabbix Development Team
            mbuz Maksym Buz
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: