FoundryNet / Error codes / MQTT CONNACK 5
MQTT 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 → 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 telemetry

Forge's MQTT adapter reads JSON or raw-value payloads. It does not decode Sparkplug B protobuf payloads yet, so a Sparkplug B stream needs a bridge that republishes metrics as JSON.

One MCP endpoint serves every protocol adapter. 2,478 vendor mappings across 49 vendor packs, 1,031-field canonical schema.

# normalize MQTT telemetry (JSON payloads; Sparkplug B protobuf decode in progress)
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 codes: CONNACK 1 CONNACK 2 CONNACK 3 Sparkplug NDATA before NBIRTH Sparkplug seq out of order

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

MQTT protocol hub

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

All error codes · All OEMs · All protocols

Why does a cross-vendor canonical data model matter? The Machine Agent breaks it down weekly. Read it →
Get the thesis behind this infrastructure: The Machine Agent, weekly.