Menu

MQTT Troubleshooting Guide

Troubleshoot common MQTT gateway failures including TLS certificate issues, topic mismatches, broker connectivity problems, and DNS errors.

Categories:

Overview

This guide covers the most common MQTT failures in gateway and broker integrations: TLS certificate problems, topic mismatches, DNS issues, authentication confusion, and broker reachability problems. Use it with the MQTT guide when publishing BACnet or Modbus data to brokers and cloud platforms.

Diagnostic Flow

  1. Confirm the broker hostname, port, and transport mode.
  2. Confirm the authentication method expected by the broker.
  3. Verify TLS certificate format and certificate chain.
  4. Publish and subscribe to a minimal test topic.
  5. Confirm the production topic structure and payload expectation.

Project Startup Questions

Before an MQTT job is treated like routine commissioning, answer these questions:

  • Which broker or cloud platform is the target?
  • Is TLS required, and are the certificates in the right format?
  • What auth mode is the broker expecting?
  • What exact topic hierarchy and payload contract should the gateway publish?

Symptoms & Solutions

SymptomLikely CauseActionRelated Page
TLS handshake failsWrong certificate format or incomplete CA chainConvert to PEM where required and reload the full chainMQTT
Connects then disconnects repeatedlyDNS resolution or broker identity issueVerify hostname resolution and broker certificate identityMQTT
Messages publish but downstream system ignores themTopic hierarchy or payload mismatchConfirm topic structure and consumer expectationsMQTT
Authentication rejectedWrong auth mode selectedVerify credentials versus certificates versus tokensMQTT
Gateway enters unstable state under large publish loadsJob exceeds practical device or firmware limitsReduce publish volume and validate point and job countQuickServer

Configuration Issues

Check TLS Artifacts First

If a secure MQTT connection fails, inspect certificate format, CA chain, and broker hostname before changing application settings. Many MQTT issues that look like protocol bugs are certificate preparation problems.

Treat Broker Identity As Intake, Not Cleanup

If the hostname, port, auth mode, or cloud platform still changes during commissioning, the project is not yet stable enough for meaningful troubleshooting.

Validate a Minimal Topic

Before publishing the full production set, publish one small known-good topic and confirm it appears correctly in an independent MQTT client. This separates broker connectivity from mapping or payload issues.

Watch for Capacity Assumptions

Large publish jobs, high point counts, or overly aggressive task layouts can destabilize gateway projects. If the system only fails at scale, test a reduced configuration before assuming the broker is the problem.

Tools

ToolTypeDescription
MQTT ExplorerClientTopic browser and live message inspection
MosquittoBroker and CLIBroker plus publish and subscribe CLI testing
MQTTXClientCross-platform test client for broker validation

Need Help?

Before escalating an MQTT issue, capture the broker hostname, port, auth mode, certificate format, a minimal working or failing topic, and any disconnect or DNS error text. That usually cuts the problem space down to connectivity, TLS, or topic design.