IMD SolutionComputing LibraryShop main store

Troubleshooting

MQTT Transmission fails to validate the primary host online

Edge computing and IIoT Published 5 min read

Short answer

The message means your Transmission Set has a Primary Host ID configured, but no Sparkplug Host Application with that same ID is connected and publishing its STATE online message. Match the identifiers and restore the host connection; clearing the Primary Host ID is a design change that removes the presence check, not a fix.

On this page
  1. What the message actually checks
  2. Check these three conditions
  3. Example: one mismatched ID on a single broker
  4. Bypass versus fix
  5. Verify the fix
  6. Questions asked

The message TransmissionClient : Failed to validate the Primary/Critical app is ONLINE - walking to next server means your Transmission Set has a Primary Host ID configured, and the module cannot find a connected Sparkplug Host Application publishing its STATE online message under that same ID. Transmission is connected to the broker; it is refusing to publish because the consumer it was told to protect is not there. The fix is to make the identifiers match and the host connect. Clearing the Primary Host ID stops the message, but it removes the data-loss protection, so treat that as a design decision, not a repair.

What the message actually checks #

The Primary Host ID is the setting that identifies the main application receiving your MQTT data, so the edge side does not publish into a void. It comes from the Sparkplug specification, where the Primary Host Application is the central consumer and controller of the Sparkplug namespace. Per that specification, a host application connects to the broker with a will message on spBv1.0/STATE/<host id>; when it comes online it publishes that STATE message in JSON announcing itself, and the broker publishes the will message when it drops.

When a Transmission Set carries a Primary Host ID, the module holds its data until it sees that STATE online message from the matching host. That is the vendor's recommended configuration: it stops Transmission from publishing to a Host Application that is not present and listening. The error fires in exactly one situation: the field is set and no matching host STATE has arrived. If your design also relies on store-and-forward during host outages, note that edge buffering depends on this same host presence; see why Ignition Edge buffering needs a Sparkplug B primary host at article:ignition-edge-mqtt-buffering-needs-a-sparkplug-b-primary-host.

Check these three conditions #

Work the list top to bottom; the first two account for most cases:

  1. The Set's Primary Host ID names the host you intend. In the Transmission configuration, open the affected Set and read the Primary Host ID field. A typo, a leftover test value or an ID carried over from a migrated server all produce the error.
  2. The host application uses the same ID and is connected. MQTT Engine, or whatever consumes your Sparkplug data, must be configured with the identical Primary Host ID and be connected to the same MQTT server, publishing its STATE online message. A host on a different broker, a different namespace prefix, or an offline host all fail validation.
  3. The broker delivers the STATE exchange. Verify the host's STATE topic appears on the broker and that the Transmission client's subscription reaches it. A broker-side ACL or namespace mismatch can silence the STATE message while leaving the data connection looking healthy.

If the data path between the edge node and the broker itself is the suspect rather than host state, the failure pattern differs; edge gateway online but PLC offline: diagnose the link walks that case. And if your broker rejects or drops the host's session outright, the underlying cause may be broker policy rather than Transmission, as in when a broker rejects a Sparkplug client over its STATE will.

Example: one mismatched ID on a single broker #

Suppose the Transmission Set is configured with Primary Host ID Plant-SCADA-01, and MQTT Engine on the same broker is configured with Primary Host ID scada-1. Both sides connect, MQTT Engine publishes its STATE online message on spBv1.0/STATE/scada-1, and Transmission waits for a STATE message on spBv1.0/STATE/Plant-SCADA-01 that never comes. Result: Failed to validate the Primary/Critical app is ONLINE - walking to next server on every connect, forever, with a healthy broker and a healthy host. Correcting either field so both read Plant-SCADA-01 lets Transmission see the STATE message and begin publishing within its normal startup sequence. The same logic applies if the host is simply stopped: an exact ID match against a stopped host still fails, because the check is on the online STATE message, not on the configuration alone.

Bypass versus fix #

Clearing the Primary Host ID in the Set configuration (reported by users as MQTT Transmission Settings > Sets > Primary Host ID) makes the message disappear and Transmission connects immediately. Do this only when operating without host-presence validation is an intentional design decision: after the change, Transmission publishes regardless of whether anything is consuming the data, so birth certificates and data can be lost to an absent host. The recommended resolution keeps the field set and makes the intended Sparkplug Host Application publish its STATE online message under the matching ID. If you are weighing how Sparkplug host behavior fits your broker and consumers more broadly, does an MQTT broker support Sparkplug separates broker capability from Sparkplug host roles, and when to use the Sparkplug rebirth tag covers the recovery message once the host is back.

Verify the fix #

After correcting the ID and starting the host, enable Transmission and confirm in the module logs that the validation message is gone and the client status shows connected and publishing. Publish a known tag change and confirm it arrives at the host application with a current timestamp, not a buffered historical value. If values flow but look stale or arrive in bursts, that points to buffering behavior rather than host validation; covering the QoS 0 loss window in Sparkplug MQTT transmission covers that distinct failure mode.

One safety note: removing the primary host check on a line where an operator panel or SCADA host acts on the data means commands and alarms can be published with no consumer attached. If that host is part of a safe-stop or operator-acknowledgment path, keep the validation in place and fix the host connection instead.

The decision, stated plainly: identifiers match and the host connects, and the error is gone; the host is gone by design, and you clear the Primary Host ID knowing you gave up the presence check; anything else, and the error is telling you the truth, so fix the host.

Questions asked

Where is the Primary Host ID configured in MQTT Transmission?

It is a field in the Transmission Set configuration, reached through the module's settings under the Sets section (reported by users as MQTT Transmission Settings > Sets > Primary Host ID). On the host side, MQTT Engine configures its Primary Host control separately, so a mismatch between the two sides is the most common cause of the validation failure.

Can I clear the Primary Host ID to stop the validation error?

Yes, clearing the field stops the validation and Transmission connects, but it also removes the guarantee that the receiving application is present and listening before data is sent. That is a deliberate design change, not a repair. The fix is to keep the field and make the host application connect and publish its STATE online message with the matching ID.

What does the primary host check protect against?

It prevents Transmission from publishing data when the central Sparkplug consumer is not connected. Without it, an edge node happily publishes into a broker with nobody listening, and birth certificates and data go unread. With it, Transmission holds back until it sees the host's STATE online message, so you know the data has a destination.

What message proves the primary host is online?

Per the Sparkplug specification, the host application connects with a last-will topic on spBv1.0/STATE followed by the host id. When the host connects it publishes that STATE message in JSON with its online status, and if it disconnects the broker delivers the will message announcing it offline. Transmission watches for exactly that exchange under the configured host ID.

Keep reading

  • Explainer

    When to use the Sparkplug rebirth tag on an edge node

    The Node Control/Rebirth tag is a manual recovery command with three legitimate uses: metrics added at the edge that the host has not discovered, a host restart with no primary host ID in play, and metric properties that changed at the edge. Configure the primary host ID on every edge node and resynchronization after host restarts happens by itself, so a rebirth you fire by hand marks a configuration gap.

    Edge computing and IIoT

  • Troubleshooting

    Why a broker rejects your Sparkplug client over its STATE will

    The broker refuses the CONNECT because the client's MQTT Last Will is declared on a STATE topic its ACL does not authorize for publish, and wills are checked at connect time before any PUBLISH. Grant publish rights on that one STATE topic or place an intermediate broker between client and cloud; changing subscriptions does nothing.

    Edge computing and IIoT

  • Troubleshooting

    Why MQTT Engine shows online status after an edge node drops

    An Info/Online tag that stays true with Good quality is not proof the edge node is alive: Engine's online state comes from the node's Sparkplug death certificate, and earlier Engine versions marked tags stale only on Engine shutdown. Read Info/Online, tag quality and Store & Forward stored metrics as three separate indicators, retest on Engine 4.0.8 with Ignition 8.0.16 or later, and compare against a node that reports correctly before escalating.

    Edge computing and IIoT