hyperledger/fabric · error

node identity is missing in channel

Error message

node identity is missing in channel

What it means

After locating the channel's membership mapping, getStepClientStream looks up the local node's own stub via LookupByIdentity(ac.NodeIdentity). This error means this orderer's identity (its TLS/ enrollment identity bytes) is not present among the channel's configured members - the node is trying to open an authenticated cluster stream to a peer for a channel in which it is not itself a consenter.

Source

Thrown at orderer/common/cluster/commauth.go:191

				return errors.Errorf("connection to %d(%s) is in state %s", stub.ID, stub.Endpoint, connState)
			}
			return nil
		}

		clusterClient := orderer.NewClusterNodeServiceClient(conn)
		getStepClientStream := func(ctx context.Context) (StepClientStream, error) {
			stream, err := clusterClient.Step(ctx)
			if err != nil {
				return nil, err
			}

			membersMapping, exists := ac.Chan2Members[channel]
			if !exists {
				return nil, errors.Errorf("channel members not initialized")
			}
			nodeStub := membersMapping.LookupByIdentity(ac.NodeIdentity)
			if nodeStub == nil {
				return nil, errors.Errorf("node identity is missing in channel")
			}

			stepClientStream := &NodeClientStream{
				Version:           0,
				StepClient:        stream,
				SourceNodeID:      nodeStub.ID,
				DestinationNodeID: stub.ID,
				Signer:            ac.Signer,
				Channel:           channel,
			}
			return stepClientStream, nil
		}

		workerCountReporter := workerCountReporter{
			channel: channel,
		}

		rc := &RemoteContext{

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Verify this orderer is a consenter in the channel's current config (compare its identity with the channel's consenter MSP/identity list) - re-add it via config update if it was removed.
  2. Confirm NodeIdentity is loaded from the correct local MSP (orderer identity, not admin/client) and that the same identity was used when members were configured.
  3. Regenerate or refresh channel configuration so membership includes the node's current identity after any TLS/MSP material rotation.
  4. Check for duplicate/renumbered consenter IDs after config updates and re-run Configure with correct identities.

Example fix

// before
comm := &cluster.AuthCommMgr{NodeIdentity: wrongClientCertBytes, ...}
stream, err := ... // node identity is missing in channel
// after
id, _ := msp.GetDefaultSigningIdentity() // orderer's own MSP identity
serialized, _ := id.Serialize()
comm := &cluster.AuthCommMgr{NodeIdentity: serialized, ...}
comm.Configure(channel, membersIncludingSelf)
Defensive patterns

Strategy: validation

Validate before calling

func selfIsMember(mgr *cluster.AuthCommMgr, channel string) bool {
    mgr.Lock.RLock()
    defer mgr.Lock.RUnlock()
    mapping, ok := mgr.Chan2Members[channel]
    if !ok { return false }
    return mapping.LookupByIdentity(mgr.NodeIdentity) != nil
}
if !selfIsMember(mgr, "mychannel") {
    return errors.New("this orderer's identity is not in mychannel's consenter set")
}

Type guard

func identityInMapping(mapping cluster.MemberMapping, identity []byte) bool {
    return mapping.LookupByIdentity(identity) != nil
}

Try / catch

stream, err := getStream(ctx)
if err != nil {
    if strings.Contains(err.Error(), "node identity is missing in channel") {
        // self not a member: verify channel config, re-add node or correct NodeIdentity material
        return fmt.Errorf("cannot stream on %s: local identity not in membership", channel)
    }
    return err
}

Prevention

When it happens

Trigger: ac.NodeIdentity (set at manager construction) does not match any member's identity in the channel mapping: the node was removed from the channel config, NodeIdentity was populated from the wrong MSP/identity (e.g. client vs server TLS cert or wrong channel), or identity serialization differences (different MSP config) make LookupByIdentity fail.

Common situations: Orderer removed from the consenters set by a channel reconfiguration but still running the chain; misconfigured GeneralTLS/ identity material (wrong cert chain or MSP); crypto material regenerated after which NodeIdentity no longer matches stored membership; joining a node to the wrong channel.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/256fb9263af2522b. Report an issue: GitHub.