hyperledger/fabric · critical

Unsupported msp type

Error message

Unsupported msp type 

What it means

During peer startup, serve() checks the local MSP's type and panics unless it is the standard FABRIC (X.509) MSP. Fabric's peer does not support running with an Idemix (or other) MSP as the local MSP, so an unsupported configuration crashes the process with this panic message including the provider type string.

Source

Thrown at internal/peer/node/start.go:218

	}
	logger.Infof("Peer config with combined core.yaml settings and environment variable overrides:\n%s", settingsYaml)

	// Debug logging for peer environment variables
	logger.Debugf("Environment variables:")
	envVars := os.Environ()
	for _, envVar := range envVars {
		logger.Debug(envVar)
	}

	// currently the peer only works with the standard MSP
	// because in certain scenarios the MSP has to make sure
	// that from a single credential you only have a single 'identity'.
	// Idemix does not support this *YET* but it can be easily
	// fixed to support it. For now, we just make sure that
	// the peer only comes up with the standard MSP
	mspType := mgmt.GetLocalMSP(factory.GetDefault()).GetType()
	if mspType != msp.FABRIC {
		panic("Unsupported msp type " + msp.ProviderTypeToString(mspType))
	}

	// Trace RPCs with the golang.org/x/net/trace package. This was moved out of
	// the deliver service connection factory as it has process wide implications
	// and was racy with respect to initialization of gRPC clients and servers.
	grpc.EnableTracing = true

	// obtain coreConfiguration
	coreConfig, err := peer.GlobalConfig()
	if err != nil {
		return err
	}

	platformRegistry := platforms.NewRegistry(platforms.SupportedPlatforms...)

	opsSystem := newOperationsSystem(coreConfig)
	err = opsSystem.Start()
	if err != nil {

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Set the peer's local MSP (peer.mspConfigPath / CORE_PEER_MSPCONFIGPATH) to a standard X.509 FABRIC MSP directory.
  2. Remove any NodeOUs/provider overrides that make the local MSP register as idemix; ensure config.yaml of the MSP is a Fabric MSP.
  3. Use Idemix identities only via channel/join configuration (e.g. for clients), never as the peer's local MSP, then restart the peer.

Example fix

// before (core.yaml / env)
CORE_PEER_MSPCONFIGPATH=/path/to/idemix-msp
// after
CORE_PEER_MSPCONFIGPATH=/path/to/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp
Defensive patterns

Strategy: validation

Validate before calling

// before starting the peer, assert the local MSP is a Fabric X.509 MSP
if !strings.HasSuffix(os.Getenv("CORE_PEER_MSPCONFIGPATH"), "/msp") || idemixConfigPresent() {
    return errors.New("peer local MSP must be a FABRIC (X.509) MSP")
}

Try / catch

// this is a panic, not an error return — recover at the process supervisor level
func main() {
    defer func() { if r := recover(); r != nil { if s, ok := r.(string); ok && strings.HasPrefix(s, "Unsupported msp type") { log.Fatalf("fix CORE_PEER_MSPCONFIGPATH: %s", s) } ; panic(r) } }()
    _ = serve(nil)
}

Prevention

When it happens

Trigger: Starting the peer when CORE_PEER_LOCALMSPID / msp config points to a non-FABRIC MSP type, e.g. an Idemix MSP directory configured as the peer's local MSP via msp.GetLocalMSP.

Common situations: Pointing the peer's local MSP at an Idemix provider (Idemix is only valid as a client/channel MSP config, not the peer's local MSP); copying MSP config from an idemix example; misconfigured msp provider type in core.yaml or msp config.yaml.

Related errors


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