Troubleshooting
Fixing MQTT cloud broker data not reaching SCADA tags
Short answer
Get the gate right first: MQTT over TLS belongs on port 8883, with the TLS mode and client identity the broker actually requires. An independent client such as MQTT Explorer on the same PC proves only its own settings, not the driver's. If the driver cannot perform the service-specific handshake Azure IoT Hub needs, no tag mapping will ever fill.
On this page
- What should I check first when cloud MQTT data never reaches my SCADA tags?
- Why does MQTT Explorer connect when the SCADA driver will not?
- Which port should the driver use for MQTT over TLS?
- Why did the port change to 443 after I enabled certificate security?
- Can my SCADA MQTT driver talk to Azure IoT Hub at all?
- How do I test the connection layer by layer from the runtime PC?
- How do I prove the tag mapping once the driver connects?
- What do I do when the driver cannot do the cloud handshake?
- Questions asked
Start at the gate, not at the tags: MQTT over TLS belongs on port 8883 with the TLS mode and client identity the broker actually requires, and everything else is downstream of that. A connection made by MQTT Explorer on the same PC proves that client's settings and nothing about the SCADA driver, which keeps its own certificates, client ID and protocol limits. And before any tag mapping, confirm the driver can perform the cloud service's handshake at all — Azure IoT Hub is a registered-device gateway, not a general broker, and at least one commercial SCADA MQTT driver has been vendor-confirmed unable to complete that exchange. This article walks the layers in order and gives the decision at each one.
What should I check first when cloud MQTT data never reaches my SCADA tags? #
Record seven facts from the broker's own configuration before you open the SCADA project: endpoint host, listener port, TLS mode, device identity, credential type, topic filters, and the publish or subscribe rights attached to that identity.
Every one of these comes from the broker's configuration page or the cloud console, never from another project:
- Endpoint host: the exact broker hostname the device is meant to reach, not the web portal address.
- Listener port: the number the service documents for MQTT over TLS.
- TLS mode: server validation only, or mutual TLS where the broker also demands a client certificate.
- Device identity: the client ID rules — cloud registries tie it to the registered device name.
- Credential: a token or an X.509 certificate with its private key, whichever the service issued.
- Topic filters: the exact strings, case and separators included.
- Permissions: which of those filters the identity may subscribe to and publish on.
A port number alone establishes nothing about TLS or authentication, and none of these values transfers between Azure and AWS: the two services register and authenticate devices differently. Load the device private key straight into the driver's certificate store, never through a shared folder or email.
Why does MQTT Explorer connect when the SCADA driver will not? #
Because they are separate clients: MQTT Explorer on the runtime PC proves the network path, DNS, firewall and one TLS identity work, and proves nothing about the driver's own certificate store, client ID, MQTT version or connection timeouts.
Run it on the same PC as the SCADA runtime, configured with the driver's exact endpoint, port, TLS mode and credential — but give the test client its own client ID. An MQTT broker is required to disconnect the client already connected when a second one presents the same client ID, so a shared ID makes the driver and the test client kick each other offline and manufacture a fault that was not there. This exact split has been reported against AWS IoT Core: a desktop client connected and exchanged messages on the same endpoint the SCADA runtime could not join. The same layered isolation is what pins down a PLC MQTT client that never reaches your broker.
| Layer | Test from the runtime PC | A pass proves | It does not prove |
|---|---|---|---|
| Name resolution | Resolve the broker hostname | The name points somewhere real | That a listener answers |
| Transport | TCP check to the listener port | The port passes the firewall | Anything above TCP |
| TLS and identity | Test client connects with the device's settings | The handshake and credential work | That the driver can repeat them |
| Topics and rights | Subscribe to the exact filter | The filter and permissions are correct | That payloads map to tags |
| Driver | Its connection status turns healthy | The driver completed the exchange | That tags update |
The decision falls out of the table: if the independent client cannot connect, fix DNS, firewall, TLS or identity before opening the driver. If it connects and sees traffic on the filter, the fault is inside the driver configuration or the driver capability, and no amount of re-typing tags will change that.
Which port should the driver use for MQTT over TLS? #
8883 — in the registered port list it is the MQTT-over-TLS port, while 443 is registered to HTTPS; MQTT on 443 exists only where a service deliberately configures it, and the driver must select that mode, not just the number.
The IANA registry assigns 8883 to secure MQTT and 443 to HTTPS, which is why a plain port swap rarely helps: most equipment between the driver and the cloud treats 443 as web traffic. The documented exceptions are deliberate. AWS IoT Core can serve MQTT with TLS client authentication on 443 through its domain configurations, built for sites whose egress only permits 443. Azure IoT Hub's 443 path is MQTT over WebSocket, a different transport the driver must explicitly support.
Decision: configure the driver for 8883 with mutual TLS as the default. Move to 443 only when the plant firewall provably blocks 8883, and then select the service's documented 443 mode in the driver — never just edit the number.
Why did the port change to 443 after I enabled certificate security? #
Because some driver screens bind the port to the selected security or transport profile: in the reported case, a machine SCADA MQTT configuration moved off the intended 8883 to 443 the moment certificate-based security was switched on.
Treat the flip as evidence that a different transport profile was selected, not as a field to force back. Open the broker's listener details, then save, close and reopen the driver configuration, and compare every displayed value against them: endpoint, port, TLS mode, certificate selection, client ID. While you are there, keep the two certificate roles apart — the broker's CA, which the client trusts, and the device certificate with its key, which proves the client's identity. Loading the CA where the client certificate belongs leaves mutual TLS incomplete and the connection dead with no error on screen.
Decision: if the screen will not hold 8883 together with your chosen security mode, that combination is unsupported in that driver. Stop and confirm it in the documentation instead of saving a mode and a port that disagree.
Can my SCADA MQTT driver talk to Azure IoT Hub at all? #
Not guaranteed: Azure IoT Hub is a cloud gateway with a device registry and a service-specific MQTT exchange on top, and a correct host, port and credentials still fail if the driver cannot complete that exchange.
Microsoft's protocol guide for IoT Hub describes MQTT feature support on the hub as limited and points solutions needing fuller v3.1.1 and v5 behavior to a separate MQTT broker offering; the native device endpoint speaks MQTT 3.1.1 under the registry's identity rules. A hub is not a general-purpose broker, so a driver that speaks clean MQTT to a local broker can still fail the hub's exchange.
The failure mode is real and vendor-confirmed: one commercial machine SCADA driver was declared by its own vendor to implement MQTT differently from the library Azure IoT Hub uses, so every apparently correct host, port and credential still produced no data, with a fix still in work at the time. Ask the driver vendor two questions before you commission: is the cloud service supported by name, and which MQTT version and authentication does the driver actually send? "Generic MQTT client" is a no for Azure IoT Hub. When the answer is yes, X.509 certificate auth to Azure IoT Hub over MQTT is the identity setup to complete first.
How do I test the connection layer by layer from the runtime PC? #
Ladder it: resolve the host, open the listener, connect a test client with the device's settings, then read the driver's own status — stopping at the first layer that fails so you fix one variable at a time.
- Resolve the broker hostname from the runtime PC; a stale or split-horizon DNS answer fails everything below.
- Open the TCP listener: run Test-NetConnection from PowerShell against the broker host with -Port 8883. Success proves reachability and nothing higher.
- In MQTT Explorer on that same PC, enter the driver's exact endpoint, port, TLS mode and credential, keep its client ID distinct, and connect.
- Subscribe to the exact topic filter and watch; publish one test message where the service allows it and confirm the subscription receives it.
- Start the SCADA runtime and read the driver's own connection status and diagnostic counters.
The first failing layer names the fix: step 1 or 2 is network, step 3 is TLS or identity, step 4 is topic names or permissions, step 5 is driver capability or configuration. Fix one layer at a time and re-run the ladder; testing two changes at once tells you nothing.
How do I prove the tag mapping once the driver connects? #
Publish a known number of known messages and make three counts agree: what the test client receives on the same filter, what the driver reports receiving, and how many times the tag updates in the SCADA database.
Worked example: the upstream publisher emits one message every 10 s for 5 minutes, 180 bytes per payload. Expected count: 300 s ÷ 10 s per message = 30 messages. Expected volume: 30 × 180 B = 5,400 B ≈ 5.3 kB — trivial for any link, so bandwidth is never the explanation. MQTT Explorer on the same filter must show exactly 30 arrivals, the driver's subscription counter should read 30, and the tag must log 30 fresh values. Thirty in the client and none in the tag means the connection is healthy and the mapping is the fault — most often the payload shape, as with nested JSON payloads leaving SCADA MQTT points blank.
Match the topic filter character for character, case included; a filter one character off subscribes successfully to nothing. Acceptance is the saved project, not the editor session: reload the runtime once and confirm the connection and the tag updates survive from disk.
What do I do when the driver cannot do the cloud handshake? #
Stop editing the driver and put a small broker or gateway between them: the SCADA driver speaks the dialect it supports to a local endpoint, and a client that does support the cloud's mutual TLS and handshake carries the data up.
Run a small broker on an edge PC next to the SCADA host: the driver connects to it locally with whatever it does support, and a bridge client on the same box holds the cloud identity, performs the mutual-TLS handshake the service requires, and republishes between the two sides. Bridging OPC UA PLC data to MQTT with an edge PC follows exactly this pattern with OPC UA at the controller end. A fanless mini PC in the same cabinet carries both roles with no moving parts and no extra workstation to maintain.
Decision: when the vendor says the driver cannot do the cloud handshake, or cannot say when it will, the gateway is the fix you control — an afternoon of configuration against an open-ended wait for a driver release.
Questions asked
Does it matter which PC I run the test client on?
Yes. Run it on the machine hosting the SCADA runtime. Host firewall rules, proxy settings and VPN routes differ from one workstation to the next, so a successful test from an office PC proves nothing about the runtime host. If the client connects from one machine and not the other, compare their firewall and proxy settings before you blame the driver.
Where can I see the broker's side of the failed connection?
Both Azure IoT Hub and AWS IoT Core log per-device connection attempts and disconnect reasons. Match the timestamp of the driver's attempt against the cloud log: no entry at all means the packets never arrived, so look at DNS, routing or the firewall; an entry with an authentication or authorization reason points to identity, certificates or topic rights; a connect followed seconds later by a disconnect suggests the handshake or a duplicate client ID.
Do Azure IoT Hub and AWS IoT Core use the same device credentials?
No. AWS IoT Core authenticates each device with an X.509 certificate and its private key over mutual TLS. Azure IoT Hub accepts either a shared-access-signature token or an X.509 certificate, and the MQTT client ID must equal the registered device ID. A driver set up with a plain username and password will not authenticate against either service.
Which MQTT version does the driver need for Azure IoT Hub?
MQTT 3.1.1 on the native device endpoint. Microsoft's protocol guide describes IoT Hub's MQTT feature support as limited and points to a separate MQTT broker offering for fuller v3.1.1 and v5 needs. A driver that implements only MQTT 3.1, without the 3.1.1 revision, cannot connect to IoT Hub regardless of ports or certificates.
How long should the acceptance test run before I call it fixed?
At least 30 minutes of live publishing plus one forced interruption: break the plant-side link for about 10 seconds, then confirm the driver reconnects on its own and the tag resumes updating. A two-minute test proves only the happy path; reconnect behavior after a dropped link is where cloud MQTT integrations usually fail in production.