-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Critical
-
Affects Version/s: 8.0.0rc1
-
Component/s: Agent2 (G), Agent2 plugin (G)
-
None
-
Environment:Ubuntu 24.04 LTS amd64
Zabbix Server: 8.0.0rc1
Zabbix Agent 2: 8.0.0rc1
Package: 2:8.0.0~rc1-2+ubuntu24.04
-
Sprint candidates
Steps to reproduce
------------------
1. Install Zabbix Agent 2 8.0.0rc1-2+ubuntu24.04 on Ubuntu 24.04 LTS amd64.
2. Use the standard Agent 2 configuration with:
Include=/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf
3. Do not define MQTT Default.ConnectionTimeout.
4. Start Zabbix Agent 2.
Actual result
-------------
The Agent terminates during startup with:
panic: runtime error: invalid memory address or nil pointer dereference
The stack trace points to:
golang.zabbix.com/agent2/plugins/mqtt.(*Plugin).Configure
src/go/plugins/mqtt/config.go:62
The same crash can be reproduced manually:
/usr/sbin/zabbix_agent2 -f -c /etc/zabbix/zabbix_agent2.conf
The crash occurs during MQTT plugin initialization.
No active MQTT configuration is required to reproduce the problem.
Impact
------
The MQTT plugin crash terminates the entire Zabbix Agent 2 process.
As a result, all Agent-based monitoring becomes unavailable, including unrelated monitoring such as Modbus TCP.
The Modbus configuration itself was not changed.
Workaround
----------
Adding the following parameter to mqtt.conf immediately resolves the problem:
Plugins.MQTT.Default.ConnectionTimeout=5
After adding this single parameter, Zabbix Agent 2 starts normally and monitoring is immediately restored, including Modbus TCP.
No MQTT broker connection is required for the workaround.
Expected result
---------------
Zabbix Agent 2 should start normally when no MQTT Default configuration is specified.
The absence of optional MQTT configuration should not cause the entire Agent 2 process to terminate with a nil pointer dereference.
The MQTT plugin should safely initialize its Default configuration and use the global/default timeout when no explicit ConnectionTimeout is configured.
Additional information
----------------------
The problem appeared after updating to Zabbix Agent 2 8.0.0rc1.
Adding Plugins.MQTT.Default.ConnectionTimeout=5 was tested on the affected system and immediately restored normal Agent 2 operation.
- is duplicated by
-
ZBX-28183 Zabbix Agent 2 8.0.0rc1 crashes with nil pointer dereference in MQTT Plugin.Configure
-
- Closed
-