Troubleshooting
Why a Sparkplug edge node stays stuck in a rebirth loop
Short answer
A rebirth loop that never converges means the publisher answers every rebirth correctly and something else then contradicts that birth. With one 0-255 sequence counter per edge node ID, either a second client publishing into the same Group/Edge Node or a bare-name DDATA the birth never defined makes the subscriber reject every cycle. Isolate it with a broker client list and a wildcard capture before touching the publisher.
On this page
- What a non-converging loop tells you
- Two publishers break one counter
- A DDATA name that appears in no birth
- Isolate it at the broker before touching the publisher
- What each isolation approach costs
- Checking the loop arithmetic for a node rejecting one DDATA every 11.6 s
- Confirm the loop has cleared
- What a support ticket for this needs
- Questions asked
A rebirth loop that never converges is not a broken publisher. The publisher answers every rebirth request correctly, and something else then publishes a message that contradicts the fresh birth, so the subscriber rejects it and asks again. Two causes produce exactly that signature: a second client publishing into the same Group/Edge Node ID, which breaks the node's single 0-255 sequence counter, or a DDATA carrying a metric name no birth ever defined. Isolate both the same way — a broker client list plus a wildcard capture on that node's topics — before you restart or reconfigure anything. The incident behind this article logged 16,880 rebirth requests in 50-plus hours on MQTT Engine 4.0.35 and never recovered once.
What a non-converging loop tells you #
Sparkplug B, version 3 of the specification, gives every edge node — and every device under it — one sequence number carried in each message it publishes. The counter starts at zero, steps up by exactly one per message, wraps from 255 back to zero, and resets to zero on a new NBIRTH. There is no per-connection counter: seq belongs to the node identity.
The subscriber here is MQTT Engine at version 4.0.35, and it validates two things against the birth it has stored for the node: the seq must continue the count, and every metric must resolve by name or by alias against that birth. Fail either check and the message is rejected and an NCMD Node Control/Rebirth goes back to the node.
A correct publisher answers with a fresh NBIRTH and DBIRTH, so a single failure clears on one rebirth — the behavior behind rebirth failing after a broker switch. A loop that survives thousands of cycles means the message that breaks validation is produced again after every birth, and that points away from the publisher that answers the command.
Two publishers break one counter #
One counter per node means one publisher per node. When two clients publish DDATA into the same Group/Edge Node, their messages interleave at the broker and each increments its own count, so the merged stream carries jumps the subscriber reads as sequence errors. It cannot tell which source broke the count, so it rejects the message and requests a rebirth. The client that owns the node answers and rebirths correctly; the second client does not act on rebirth commands, publishes again on its own schedule, and breaks the count once more.
A duplicate publisher usually fails the name check at the same time, because its tag set was never in any birth for that node. The sequence error and the unresolvable bare names in this incident are one fault seen from two sides.
A DDATA name that appears in no birth #
The subscriber resolves each DDATA metric against the stored birth by full name or by alias; a metric that resolves neither way is dropped and logged. In this incident the DBIRTH carried 24,989 metrics, every one a full path, while each rejected DDATA carried bare names — Input/DisableDescriptions is the one the log shows. Exactly two SparkplugUtils value-conversion failures per cycle means two metrics in each rejected message failed resolution; the log line names only one, so pull the second from the full log before concluding anything.
Three candidate causes fit, and each has a separating test:
| Candidate cause | Signature | What separates it |
|---|---|---|
| A second client publishing into the same Group/Edge Node | Sequence gaps plus metric names foreign to the birth; rebirths never clear it | The broker client list shows two connections; the captured DDATA's seq does not follow the last birth |
| The publisher builds DDATA names relative to a folder or device while its birth used full paths | One client ID; bare names appear in DDATA only, never in any birth | Compare the rebirth response and the next DDATA name strings byte for byte |
| An alias or partial name the birth never registered | DDATA carries an alias with no entry in that birth's alias table | Decode the birth's alias table against the DDATA metric fields — the same check behind why a rebirth metric can arrive without its alias |
Isolate it at the broker before touching the publisher #
The subscriber's log sees only the merged stream, so it can name the rejected metric but never the source. The broker sees both. Work in this order:
- List the broker's connected clients and note every client ID and source IP. Match each against the gateway that should own the edge node. Two connections able to publish to one node is your answer.
- From a separate test client — never with the subscriber's own client ID — subscribe to that node's topics in the spBv1.0 namespace: its NDATA and device DDATA topics, and the NBIRTH that will answer the next rebirth.
- Capture one full cycle: the birth the owning client sends, then the DDATA the subscriber rejects.
- Read the seq on that DDATA and compare it with the last seq of the birth that precedes it. A jump means the count was broken between the two.
- Compare the bare name against the DBIRTH metric list. A full-path counterpart means the publisher constructs DDATA names differently from its birth — fix the name construction so data uses the same strings as the birth. No counterpart at all means the DDATA comes from a source with a different tag set.
- If two sources exist, change the Edge Node ID — or the Group — on one of them so each publisher owns its own node.
What each isolation approach costs #
| Approach | Shows a duplicate publisher | Shows a name or alias bug | Cost |
|---|---|---|---|
| Subscriber log and gateway Diagnostic Bundle alone | No — the subscriber sees one merged stream | Partly — it names the rejected metric | None |
| Broker client list plus a wildcard capture | Yes — client IDs and raw publish order | Yes — payload names and seq as sent | None |
| Stop or restart the edge node publisher | Yes, if the loop persists with the known publisher stopped | No | Data outage on that node |
Start with the broker capture: it reads the same messages the subscriber rejects, names every client, and costs no downtime. Stop the known publisher only after the capture, as the proof of whether a second source keeps publishing into the node.
Checking the loop arithmetic for a node rejecting one DDATA every 11.6 s #
Inputs, all from this incident's logs: one rejected DDATA every 11.6 s; 16,880 rebirth requests counted; a reported duration of "over 50 hours"; two SparkplugUtils conversion failures per cycle.
The rule in words: in a steady loop, requests multiplied by period must reproduce the elapsed window, and failures per cycle multiplied by cycles must equal the total failure count.
- 16,880 requests × 11.6 s = 195,808 s
- 195,808 s ÷ 3,600 s per hour = 54.4 h
- 2 failures per cycle × 16,880 cycles = 33,760 conversion failures
The 54.4 h sits just above the reported 50-hour floor, and 33,760 is exactly two failures for every request logged. The counts describe one continuous offending stream, not an intermittent one, and the same two metrics are rejected every cycle.
Decision: when requests × period lands on or just above the logged window, treat the source as continuous and go straight to the broker capture — restarting the subscriber or the publisher first proves nothing, because identical cycles show restarts change nothing. When the product lands well short of the window, the rejections are intermittent, so time the capture to the schedule that produces them.
Confirm the loop has cleared #
- Watch the subscriber log for five minutes — 300 s ÷ 11.6 s ≈ 26 former cycles — and confirm the node's rebirth request count stops climbing.
- Confirm the SparkplugUtils conversion failures on the bare name stop appearing.
- On the still-running capture, confirm DDATA seq runs consecutively from a single counter that continues from where the last birth left it.
- Confirm the tag provider's metrics return good quality with advancing timestamps.
- If the publisher replays messages it buffered during the incident, expect rejections of that backfill too: buffered Sparkplug B data rejected after a reconnect is a separate case with its own handling.
What a support ticket for this needs #
If the capture leaves the source in doubt, open a ticket with the module maintainer and include the gateway version and the MQTT Engine module version plus every other module on that gateway, the gateway's Diagnostic Bundle, the client IDs that can publish into the Group/Edge Node and whether more than one existed, the broker product and version, and the capture itself with both the DBIRTH and the rejected DDATA.
Questions asked
Can the subscriber recover from a rebirth loop on its own?
Only when the message that breaks the cycle stops arriving, because recovery needs the next DDATA to validate against the stored birth. This incident logged 16,880 rebirth requests across a 50-plus-hour window with no recovery, which proves the offending publish recurs after every birth. Restarting the subscriber does not clear it either: the birth is rebuilt and the same contradictory DDATA follows within one cycle.
Can two clients publish into the same Sparkplug Group and Edge Node ID?
No. The specification gives each edge node one sequence counter, so a second client's publishes read as gaps in the count and every one of them can be rejected. Give each publisher its own Edge Node ID, or put it in a different Group, and the interleaving, and the loop, stops.
Does a 24,989-metric DBIRTH cause the sequence error by its size?
No. The counter rule is identical whatever the birth size, so a large DBIRTH does not by itself produce sequence errors. Rule out a second publisher and a name or alias mismatch first; only if births arrive truncated should you look at broker message-size and timing limits.
Why does the loop repeat at a steady 11.6 seconds?
Because the period is set by the offending publisher's own timer, not by the subscriber. The subscriber rejects a message and requests a rebirth, the owning client rebirths, and the next scheduled DDATA from the offending source arrives on its usual scan. A steady period is therefore evidence of one steady source, which is what the arithmetic in this incident showed.