MQTT plugin connection to broker fail without any error message

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.22
    • Component/s: Agent2 plugin (G)
    • None

      Steps to reproduce:

      Ubuntu 24

      Install ** and configure Mosquitto MQTT broker in docker container on host

      Install zabbix agent2 with a following MQTT configuration in  /etc/zabbix/zabbix_agent2.d/plugins.d/mqtt.conf

      Plugins.MQTT.Sessions.docker.Topic=watermeter/main/json
      Plugins.MQTT.Sessions.docker.Url=tcp://192.168.196.10:1883
      Plugins.MQTT.Sessions.docker.User=zbxuser
      Plugins.MQTT.Sessions.docker.Password=PASSWORD

      subscribes to topic. 

      Result:

      upon starting I get an only message that MQTT plugin is loaded in zabbix_agent2 log file (DebugLevel=5)

      2026/01/09 12:08:11.277992 using plugin 'MQTT' (built-in) providing following interfaces: watcher, configurator, maximum capacity: 1000, active checks on start enabled: true

      zabbix agent2 does not even try to connect to a MQTT broker (verified with tcpdump), MQTT broker (mosquitto) log show no connection attempt. However there are no error messages too.

      All credentials then tested with cli tool on same machine are working as expected so permissions and network should be OK.

      mosquitto_sub -h 192.168.196.10 -p 1883 -i moskits -u 'zbxuser' -P 'PASSWORD'  -t 'watermeter/main/json

      mosquitto log show  connection

      1767956902: New connection from 192.168.196.10:50356 on port 1883.
      1767956902: New client connected from 192.168.196.10:50356 as moskits (p2, c1, k60, u'zbxuser').
      1767956902: No will message specified.
      1767956902: Sending CONNACK to moskits (0, 0)
      1767956902: Received SUBSCRIBE from moskits
      1767956902:     watermeter/main/json (QoS 0)
      1767956902: moskits 0 watermeter/main/json
      1767956902: Sending SUBACK to moskits

      Expected:
      zabbix_agent2 on startup should connect to MQTT broker , subscribe to a topic and log attempt of such connection or show an error message in case settings are not correct.

            Assignee:
            Zabbix Development Team
            Reporter:
            Guntis Liepins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: