I'm slowly moving my projects to utilize IPv6, but I found an issue while using a single MQTT IN or OUT node where during a modified node deployment 50% of the time it will disconnect from an IPv6 only broker.
I can reproduce this behavior reliably under NR v3.0.2, ubuntu or rpi os, node.js (v14, v16, or v18) and latest mosquitto broker (TLS or not). I've tested with a few local brokers, remotely on AWS EC2, or test.mosqutto.org (2001:41d0:1:925e::1). I usually only change the QOS level to trigger a modified node deploy.
Logs from NR and broker show only a normal (non-error) IPv6 client disconnect/connect.
Example MQTT IN node:
[
{
"id": "497c7a765e26de0b",
"type": "mqtt in",
"z": "5ac27d09b93b4452",
"name": "",
"topic": "nodered/ipv6/test",
"qos": "1",
"datatype": "auto-detect",
"broker": "5d0c05a3ecea1f46",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 170,
"y": 200,
"wires": [
[
"30b8c8c7159c6c89"
]
]
},
{
"id": "30b8c8c7159c6c89",
"type": "debug",
"z": "5ac27d09b93b4452",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 340,
"y": 200,
"wires": []
},
{
"id": "5d0c05a3ecea1f46",
"type": "mqtt-broker",
"name": "",
"broker": "2001:41d0:1:925e::1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Example MQTT OUT node:
[
{
"id": "99407118f264a1b3",
"type": "mqtt out",
"z": "25e4b7bcd7dc34bb",
"name": "",
"topic": "nodered/ipv6/test",
"qos": "2",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "6fd98d9498ff1cae",
"x": 550,
"y": 780,
"wires": []
},
{
"id": "32b3f8142f268458",
"type": "inject",
"z": "25e4b7bcd7dc34bb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 330,
"y": 780,
"wires": [
[
"99407118f264a1b3"
]
]
},
{
"id": "6fd98d9498ff1cae",
"type": "mqtt-broker",
"name": "",
"broker": "2001:41d0:1:925e::1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]