Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sparkplug-wg] NBIRTH error

I have corrected my errors in the bdSeq being Uint64 modifying to Int64 and also setting seq to 0.  The NBirth payload as read back by the broker's logs is:
{
    "timestamp": 1679135608434,
    "metrics": [{
            "name": "bdSeq",
            "timestamp": 1679135608434,
            "dataType": "Int64",
            "value": 19
        }, {
            "name": "Node Control/Rebirth",
            "timestamp": 1679135608434,
            "dataType": "Boolean",
            "value": false
        }
    ],
    "seq": 0
}

This is generating a new error:
com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag.

The error has me looking closely at the end of the metrics array or the end of the payload, but that all appears correct.  What are some troubleshooting suggestions?  Thanks again for all your help,

On Mon, Mar 6, 2023 at 5:30 PM Bryce Nakatani <bnakatani@xxxxxxxxxx> wrote:
Hello Zachary,

I haven't seen your protobuf exception but reading about it on the internet, it sounds like something about the data could be amiss or possibly something happening in the conversion/interpretation. 

I have a couple comments about your NBIRTH payload.

Your "bdSeq" type must be an Int64 and the "seq" must be zero (because it's an NBIRTH).

The Tahu package has a Java example project called the "listener". This is a minimal project that subscribes and publishes payloads. It might be a good place to start to compare what is being published to the MQTT Server.

Bryce


On Mon, Mar 6, 2023 at 3:01 PM Zachary Roisum <zacharyroisum@xxxxxxxxx> wrote:
After a successful MQTT connection, subscription to the node command topic, I am attempting to publish an NBIRTH payload.  The broker is Ignition - CirrusLink MQTT Distributor.  The error message from Ignition's logs is:

Failed to handle Sparkplug B message on topic spBv1.0/Home/NBIRTH/NodeTest

com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag.

The payload as reported by Ignition's logs is:

content <{"timestamp":1677746244901,"metrics":[{"name":"bdSeq","timestamp":1677746244901,"dataType":"Uint64","value":16},{"name":"Node Control/Rebirth","timestamp":1677746244901,"dataType":"Boolean","value":false}],"seq":1}>
Or in human-readable format (copied from Ignition's logs, deleted "content <" and ">", applied JSON formatting):
{
    "timestamp": 1677746244901,
    "metrics": [{
            "name": "bdSeq",
            "timestamp": 1677746244901,
            "dataType": "Uint64",
            "value": 16
        }, {
            "name": "Node Control/Rebirth",
            "timestamp": 1677746244901,
            "dataType": "Boolean",
            "value": false
        }
    ],
    "seq": 1
}

This message as close as I can read matches some example messages from the specification.  I have tried using the SparkplugTCK, but it appears that this error happens too early for that tool to log, or I configured SparkplugTCK incorrectly.  Is there an embarrassing typo I didn't catch, or what are suggestions to continue troubleshooting?  Thank you for your help,
_______________________________________________
sparkplug-wg mailing list
sparkplug-wg@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sparkplug-wg
_______________________________________________
sparkplug-wg mailing list
sparkplug-wg@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sparkplug-wg

Back to the top