hyperledger/fabric · error
FABRIC_CFG_PATH %s does not exist
Error message
FABRIC_CFG_PATH %s does not exist
What it means
Raised during InitViper when the configured FABRIC_CFG_PATH directory does not exist on disk (the alternative branch reports a non-directory). It means viper cannot be pointed at a real config directory, so core.yaml and peers' configuration cannot be located — typically FABRIC_CFG_PATH is unset in a non-default install or points to a wrong/typo'd path.
Source
Thrown at core/config/config.go:98
const OfficialPath = "/etc/hyperledger/fabric"
// ----------------------------------------------------------------------------------
// InitViper()
// ----------------------------------------------------------------------------------
// Performs basic initialization of our viper-based configuration layer.
// Primary thrust is to establish the paths that should be consulted to find
// the configuration we need. If v == nil, we will initialize the global
// Viper instance
// ----------------------------------------------------------------------------------
func InitViper(v *viper.Viper, configName string) error {
altPath := os.Getenv("FABRIC_CFG_PATH")
if altPath != "" {
// If the user has overridden the path with an envvar, its the only path
// we will consider
if !dirExists(altPath) {
return fmt.Errorf("FABRIC_CFG_PATH %s does not exist", altPath)
}
AddConfigPath(v, altPath)
} else {
// If we get here, we should use the default paths in priority order:
//
// *) CWD
// *) /etc/hyperledger/fabric
// CWD
AddConfigPath(v, "./")
// And finally, the official path
if dirExists(OfficialPath) {
AddConfigPath(v, OfficialPath)
}
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Set FABRIC_CFG_PATH to a valid directory containing the config files
- Create the directory and supply a core.yaml
- Fall back to the official path /etc/hyperledger/fabric
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at core/config/config.go:98 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/2eb67113ce7c265f.
Report an issue: GitHub.