Troubleshooting
SCADA MQTT connection fails with values 260 and 9: isolate layers
Short answer
In VTScada, TCP/IP Port status 260 means an established socket disconnected, and MQTT Client Driver error 9 means the driver timed out waiting for CONNACK. Together against a HiveMQ broker, they indicate a transport, TLS, SNI, or socket-timer failure before MQTT session negotiation completes rather than a bad topic or tag mapping. Match the working Node-RED endpoint on TCP port 8883 with the exact broker hostname, trust ISRG Root X1 in Windows SChannel, and set Disconnect Delay above Keep Alive.

On this page
- Decode status 260 and error 9 before changing settings
- Compare the working Node-RED path against the SCADA host
- Isolate where the connection chain stops
- Check Windows SChannel trust and TLS handshake requirements
- Size Keep Alive, driver timeout, and Disconnect Delay
- Step-by-step fix and live-value verification
- Questions asked
In VTScada, TCP/IP Port tag status 260 (hex 0x104) means the established TCP socket was lost or closed by the remote host, and MQTT Client Driver value 9 (hex 0x9) means the driver timed out waiting for an MQTT CONNACK packet. Seeing both together against a HiveMQ broker points to a transport, TLS handshake, Server Name Indication (SNI), or socket-timer mismatch before MQTT session negotiation finishes. Do not edit topic subscriptions or tag scaling until the parent socket stays open and the driver clears to 0 (0x0, No Error).
Decode status 260 and error 9 before changing settings #
A raw number beside a SCADA communications tag only makes sense when paired with the exact tag type and installed software version. According to the VTScada TCP/IP Port Tag documentation, status 260 (0x104, Connection was lost / TCP/IP Port Disconnected) means the TCP connection opened and then dropped, was closed by the broker, or timed out. By contrast, status 259 (0x103, Port did not connect) means the initial TCP handshake never completed.
On the child tag, the VTScada MQTT Client Driver documentation defines 9 (0x9) as Timeout waiting for CONNACK. Because the parent port tag dropped first or stalled during TLS negotiation, no CONNACK packet ever reached the driver. Verify which tag owns each number before acting: VTScada reuses the 256–260 range across different child drivers, where Modbus 260 (0x104) means Failure in Associated Device and OPC UA Publisher 260 means Server protocol error.
If the connection had cleared TLS and reached the MQTT application layer, the broker would have replied with a CONNACK error code rather than letting the driver time out. Under OASIS MQTT 3.1.1 Clause 3.2.2.3, Connect Return Codes 1 through 5 map directly to VTScada MQTT Client Driver codes 1 (unacceptable protocol version), 2 (identifier rejected), 3 (server unavailable), 4 (bad username or password), and 5 (authorization error). OASIS MQTT 5.0 Clauses 3.2.2.2 and 4.13.2 likewise define Connect Reason Codes 0x80 and higher, such as 0x86 (Bad User Name or Password) and 0x87 (Not Authorized). Seeing 9 instead of 1–5 tells you the failure happened below MQTT authentication.
Compare the working Node-RED path against the SCADA host #
A working Node-RED flow proves that the HiveMQ cluster is online and accepting connections on Node-RED's network path, listener, and TLS stack. It does not prove that the VTScada machine reaches the same listener or uses the same transport. A single broker commonly exposes separate listeners for plaintext MQTT, MQTT over TLS, and MQTT over WebSockets, and a working WebSocket session in Node-RED does not validate a direct TCP/TLS connection from SCADA.
HiveMQ Cloud documentation specifies mandatory TLS (TLS 1.2 or TLS 1.3) on IANA-registered TCP port 8883 (recommended for secure-mqtt in OASIS MQTT 5.0 Clause 5.2, referencing RFC 5246) and does not allow plaintext connections on TCP port 1883. Just as how Node-RED MQTT fails when a broker rejects plain connections, pointing a VTScada TCP/IP Port tag at the plaintext port or leaving TLS mismatched causes the remote listener to close the socket immediately.
Earlier VTScada releases also removed legacy automatic default port assignments (3001 for TCP and 3123 for UDP), so you must enter the exact broker port on the TCP/IP Port tag's Connection tab. Inspect Node-RED's live broker node settings—hostname, port, TLS checkbox, protocol version, username, and client ID—and compare them field by field against the VTScada configuration.
Isolate where the connection chain stops #
Record the exact timestamp of a VTScada connection attempt and match it against the HiveMQ broker log. The table below separates each layer so you change only the failing stage.
| Layer | Where to inspect | Observed code or log | Next action |
|---|---|---|---|
| DNS and TCP reachability | VTScada TCP/IP Port tag and firewall logs | Status 259 (0x103) or no broker log entry |
Fix hostname resolution, routing, or outbound firewall rules to the broker listener |
| Transport and TLS handshake | VTScada Connection tab, Windows SChannel logs, HiveMQ log |
Parent 260 (0x104) and child 9 (0x9) |
Verify TLS port, exact cluster hostname for SNI, TLS version, and trusted root CA |
| MQTT session negotiation | VTScada MQTT Client Driver and HiveMQ auth log | Driver codes 1–5 (refused CONNACK) |
Fix protocol version (3.1 or 3.1.1), credentials, permissions, or unique Client ID |
| Keep-alive and socket timers | Connection tab Disconnect Delay and driver Keep Alive |
Intermittent 260 with 6 (0x6) or 12 (0xc, PINGRESP timeout) |
Set Disconnect Delay strictly above Keep Alive and Timeout at or below 90% of Keep Alive |
| Subscription and payload | HiveMQ topic ACLs and VTScada I/O tags | Driver 0 (0x0) or 10 (0xa, SUBACK timeout), stale values |
Verify topic spelling, case, ACLs, and payload format |
When the driver later shows 0 (0x0) but process tags remain stale, move downstream to fixing MQTT cloud broker data that does not reach SCADA tags instead of re-editing the TCP/IP Port tag.
Check Windows SChannel trust and TLS handshake requirements #
VTScada delegates client TCP/IP port TLS negotiation to Windows SChannel, so certificate and handshake faults appear as SChannel warnings rather than MQTT CONNACK codes—a pattern shared with why a PC SCADA MQTT client fails against a cloud TLS broker. Four conditions trigger an immediate broker close (260) and CONNACK timeout (9):
- Missing SNI or raw IP address: HiveMQ Cloud requires the TLS Server Name Indication extension in the
Client Hellopacket carrying the exact cluster hostname (for exampleexample-cluster.s2.eu.hivemq.cloud). Entering a raw IP address in VTScada'sName/Addressfield omits a valid hostname match and causes the broker to drop the socket during the TLS handshake. - Untrusted root CA: HiveMQ Cloud server certificates are issued by Let's Encrypt and chain to
ISRG Root X1. On isolated or older plant Windows machines,ISRG Root X1may be absent from the Windows Local Computer Trusted Root Certification Authorities store, causing SChannel to abort the handshake. - SChannel certificate store and clock errors: Documented VTScada SChannel warnings include
Was not found(missing from the Windows certificate store or misnamed inSetup.INI),Is not yet valid / Has expired(Windows clock skew against certificate validity dates),Does not have the required Enhanced Key Usage(missing server or client authentication EKU), andUnable to acquire private key / SChannel handle(the VTScada service account lacks read permission on the private key). Review clock skew and certificate trust failures in industrial MQTT TLS handshakes if the plant host runs offline without NTP synchronization. - TLS version support: VTScada version
12.1.30introducedTLS 1.3support for client and server TCP sockets while relying on Windows OS configuration to control enabled TLS versions. Verify that the Windows host enablesTLS 1.2orTLS 1.3for outbound SChannel clients.
Size Keep Alive, driver timeout, and Disconnect Delay #
Even when TLS succeeds, mismatched VTScada timers will drop an idle socket and trigger 260 alongside driver error 6 (0x6, Connection lost or bad), 9 (0x9), or 12 (0xc, Timeout waiting for PINGRESP). The VTScada documentation sets two strict inequalities:
- Set the MQTT Client Driver
Timeoutstrictly above0and at most90%of the driver'sKeep Aliveinterval (0is allowed but not recommended). - Set the parent TCP/IP Port tag's
Disconnect Delay (sec)strictly greater than both the child driverTimeoutand the MQTT Client DriverKeep Aliveinterval.
Illustrative configuration example: Assume you configure an MQTT Client Driver Keep Alive of 60 s.
- Compute the upper limit for driver
Timeout:0.90 × 60 s = 54 s. Select a practical value well below that ceiling, such as15 s, to allow WAN TLS handshake latency without hanging the driver. - Check the parent
Disconnect Delay (sec): if left at30 s, the TCP/IP Port tag abruptly closes the idle socket after30 s—halfway through the keep-alive window—generating status260on a healthy broker link. - Set
Disconnect Delay (sec)to90 s(60 s × 1.5 = 90 s). That leaves a30 smargin above keep-alive (90 s - 60 s = 30 s) and exceeds the driver timeout, so the MQTT driver completes its keep-alive ping before the port tag ever treats the socket as idle.
Step-by-step fix and live-value verification #
Follow these steps in order and inspect VTScada diagnostics plus the HiveMQ broker log after each change:
- Back up and record the baseline. Save the current VTScada configuration, note the installed VTScada version, and log the exact timestamp when
260and9appear. - Verify DNS and TCP reachability from the SCADA host. Confirm that the VTScada machine resolves the exact HiveMQ cluster hostname and can open a TCP socket to port
8883through plant firewalls. - Configure the dedicated TCP/IP Port tag. Enter the exact broker hostname in
Name/Address(never a raw IP address), setPort Numberto8883, enable TLS, and setDisconnect Delay (sec)above your plannedKeep Aliveinterval (such as90 sfor a60 skeep-alive). - Validate Windows SChannel trust. Confirm that
ISRG Root X1is present in the Windows Local Computer Trusted Root Certification Authorities store, verify the SCADA host system clock, and check Windows Event Viewer for SChannel warnings. - Configure the MQTT Client Driver. Point the driver to its dedicated TCP/IP Port tag, select MQTT
3.1.1, enter the HiveMQ console-generated username and password, setKeep AliveandTimeoutwithin the 90% rule, and keep a uniqueMQTT Client ID. By default, VTScada builds a unique ID fromMQTTClientIDPrefix(defaultVTScada), the application GUID, the workstation identifier, and the tag name; never copy Node-RED's client ID or the broker will disconnect the existing session. - Confirm session stability and test one live value. Verify that the TCP/IP Port tag clears
260, the MQTT Client Driver reports0(0x0), and HiveMQ logs an accepted session. Subscribe to an authorized test topic in VTScada, publish a changing value from Node-RED, and confirm the SCADA tag updates in real time rather than relying on a retained message.
Questions asked
What do Windows Winsock codes 10048 and 10061 mean on a VTScada TCP/IP Port tag?
For socket errors not mapped in VTScada port documentation, the TCP/IP Port tag passes through native Windows Win32 and Winsock codes. Error 10061 means connection refused because no broker listener is accepting traffic on that target port or a firewall actively rejected the packet. Error 10048 means the local socket address is already in use by another process on the SCADA host.
Can two VTScada MQTT Client Driver tags share one TCP/IP Port tag to the same broker?
No. VTScada requires each MQTT Client Driver tag to use its own dedicated TCP/IP Port tag and explicitly prohibits sharing a port tag between MQTT drivers, even when both target the same HiveMQ cluster. Sharing a port mixes socket state and causes disconnect loops. Create one port tag per driver and verify that each client uses a distinct MQTT Client ID.
When should you configure the TLS tab on a VTScada TCP/IP Port tag?
The TLS tab applies only when the TCP/IP Port tag operates in client mode, with both Name/Address and Port Number populated, and it configures mutual TLS client-certificate authentication. For standard HiveMQ Cloud connections that authenticate with console-generated username and password credentials, server certificate validation runs through Windows SChannel using the local computer Trusted Root Certification Authorities store.
Does VTScada support Sparkplug B alongside standard MQTT 3.1.1 clients?
Yes, starting in VTScada version 12.2, which added native Sparkplug B Edge Node and Edge Device tags alongside the existing MQTT Client Driver. The standard MQTT Client Driver natively supports MQTT 3.1 and 3.1.1 over a dedicated TCP/IP Port tag and does not use a Polling Driver because MQTT operates by report-by-exception. Confirm which payload format your broker and edge devices expect.


