hyperledger/fabric · error

admin is invalid [ , ]

Error message

admin %d is invalid [%s,%s]

What it means

postSetupV142 guard: with NodeOU enforcement enabled, admin certificate %d failed both hasOURole checks — it carries neither the client OU nor the admin OU defined in the MSP config. Both role-check errors are included so the misconfiguration (bad OU config or wrong admin cert) can be diagnosed.

Solutions

  1. Reissue the admin certificate with the client or admin OU defined in FabricNodeOus
  2. Correct the Client/Admin OU identifiers in the MSP config to match the admin certs
  3. Remove the offending admin from the admins list
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at msp/mspimplsetup.go:716 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at msp/mspimplsetup.go:716

		}
	}

	return nil
}

func (msp *bccspmsp) postSetupV142(conf *m.FabricMSPConfig) error {
	// Check for OU enforcement
	if !msp.ouEnforcement {
		// No enforcement required. Call post setup as per V1
		return msp.postSetupV1(conf)
	}

	// Check that admins are clients or admins
	for i, admin := range msp.admins {
		err1 := msp.hasOURole(admin, m.MSPRole_CLIENT)
		err2 := msp.hasOURole(admin, m.MSPRole_ADMIN)
		if err1 != nil && err2 != nil {
			return errors.Errorf("admin %d is invalid [%s,%s]", i, err1, err2)
		}
	}

	return nil
}

View on GitHub (pinned to 2736b63f8f)