goharbor/harbor · error

failed to load configuration, error: %v

Error message

failed to load configuration, error: %v

What it means

Error "failed to load configuration, error: %v" thrown in goharbor/harbor.

Source

Thrown at src/jobservice/main.go:50

	tracelib "github.com/goharbor/harbor/src/lib/trace"
	_ "github.com/goharbor/harbor/src/pkg/accessory/model/base"
	_ "github.com/goharbor/harbor/src/pkg/accessory/model/cosign"
	_ "github.com/goharbor/harbor/src/pkg/accessory/model/notation"
	_ "github.com/goharbor/harbor/src/pkg/accessory/model/nydus"
	_ "github.com/goharbor/harbor/src/pkg/accessory/model/subject"
	_ "github.com/goharbor/harbor/src/pkg/config/inmemory"
	_ "github.com/goharbor/harbor/src/pkg/config/rest"
	_ "github.com/goharbor/harbor/src/pkg/scan/sbom"
	_ "github.com/goharbor/harbor/src/pkg/scan/vulnerability"
)

func main() {
	// Start pprof server
	lib.StartPprof()

	cfgLib.DefaultCfgManager = common.RestCfgManager
	if err := cfgLib.DefaultMgr().Load(context.Background()); err != nil {
		panic(fmt.Sprintf("failed to load configuration, error: %v", err))
	}

	// Get parameters
	configPath := flag.String("c", "", "Specify the yaml config file path")
	flag.Parse()

	// Missing config file
	if configPath == nil || utils.IsEmptyStr(*configPath) {
		flag.Usage()
		panic("no config file is specified")
	}

	// Load configurations
	if err := config.DefaultConfig.Load(*configPath, true); err != nil {
		panic(fmt.Sprintf("load configurations error: %s\n", err))
	}

	// Append node ID

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/jobservice/main.go:50 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/f8fadabacd946145. Report an issue: GitHub.