FoundryNet / Error codes / MQTT / Sparkplug B CONNACK 5
MQTT / Sparkplug B error code

CONNACK 5 (0x05) — Connection Refused: not authorized

Credentials were understood and rejected, or the client is not permitted to connect at all. Code 4 is the narrower bad-username-or-password case.

Start free MQTT / Sparkplug B → canonical

Diagnosis

When you hit this


Resolution

How to fix it

  1. Separate authentication from authorization
    Broker logs distinguish a bad password from a valid user with no permission. Code 5 is usually the latter.
  2. Check the ACL keyed by client id
    Many brokers bind permissions to a client-id pattern as well as a username. Changing the id can break a working credential.
  3. Verify the certificate's derived identity
    With mutual TLS the username often comes from the certificate CN, which may not be what you assume.

Normalization

What Forge does about it

This is a configuration or addressing mistake on the wire, upstream of anything Forge sees. Where Forge helps is the step after you fix it: once the point returns data, its vendor tag name maps to a canonical field automatically, so you do not also have to hand-maintain a name table for every point you just re-addressed.


Connect

Normalize MQTT / Sparkplug B telemetry

One MCP endpoint serves every protocol adapter. 16,908 curated mappings, 366 canonical fields.

# normalize telemetry from MQTT / Sparkplug B — and 13 other protocols
claude mcp add --transport http forge https://mcp.foundrynet.io/mcp \
  --header 'Authorization: Bearer YOUR_FORGE_KEY'
✓ forge connected — 32 tools available

Related

Keep reading

Other MQTT / Sparkplug B codes: CONNACK 1 CONNACK 2 CONNACK 3 Sparkplug NDATA before NBIRTH Sparkplug seq out of order

Equipment that speaks MQTT / Sparkplug B: MiR (Mobile Industrial Robots) Chemical process Food & beverage process Pharma process (GMP) OTTO Motors Geek+ (Geekplus) Locus Robotics Omron AMR (LD/HD) Trumpf

MQTT / Sparkplug B protocol hub

Other protocols: Modbus OPC UA FANUC FOCAS EtherNet/IP PROFINET / S7 BACnet/IP J1939 (CAN) MTConnect ROS 2 (DDS) SNMP MAVLink HTTP / REST CSV ingest

All error codes · All OEMs · All protocols

Industrial AI fails at the data layer. The Machine Agent explains why, weekly. Read it →
Get the thesis behind this infrastructure — The Machine Agent, weekly.