{"record":{"id":"f8fadabacd946145","repo":"goharbor/harbor","slug":"failed-to-load-configuration-error-v","errorCode":null,"errorMessage":"failed to load configuration, error: %v","messagePattern":"failed to load configuration, error: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jobservice/main.go","lineNumber":50,"sourceCode":"\ttracelib \"github.com/goharbor/harbor/src/lib/trace\"\n\t_ \"github.com/goharbor/harbor/src/pkg/accessory/model/base\"\n\t_ \"github.com/goharbor/harbor/src/pkg/accessory/model/cosign\"\n\t_ \"github.com/goharbor/harbor/src/pkg/accessory/model/notation\"\n\t_ \"github.com/goharbor/harbor/src/pkg/accessory/model/nydus\"\n\t_ \"github.com/goharbor/harbor/src/pkg/accessory/model/subject\"\n\t_ \"github.com/goharbor/harbor/src/pkg/config/inmemory\"\n\t_ \"github.com/goharbor/harbor/src/pkg/config/rest\"\n\t_ \"github.com/goharbor/harbor/src/pkg/scan/sbom\"\n\t_ \"github.com/goharbor/harbor/src/pkg/scan/vulnerability\"\n)\n\nfunc main() {\n\t// Start pprof server\n\tlib.StartPprof()\n\n\tcfgLib.DefaultCfgManager = common.RestCfgManager\n\tif err := cfgLib.DefaultMgr().Load(context.Background()); err != nil {\n\t\tpanic(fmt.Sprintf(\"failed to load configuration, error: %v\", err))\n\t}\n\n\t// Get parameters\n\tconfigPath := flag.String(\"c\", \"\", \"Specify the yaml config file path\")\n\tflag.Parse()\n\n\t// Missing config file\n\tif configPath == nil || utils.IsEmptyStr(*configPath) {\n\t\tflag.Usage()\n\t\tpanic(\"no config file is specified\")\n\t}\n\n\t// Load configurations\n\tif err := config.DefaultConfig.Load(*configPath, true); err != nil {\n\t\tpanic(fmt.Sprintf(\"load configurations error: %s\\n\", err))\n\t}\n\n\t// Append node ID","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/main.go#L32-L68","documentation":"Fatal startup error in the jobservice main function: loading the base configuration through the default config manager (backed by the REST config manager talking to core) failed. The panic message includes the underlying error and the process exits because jobservice cannot run without its configuration.","triggerScenarios":"Thrown at src/jobservice/main.go:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded underlying error in the panic message to identify the true cause (connectivity to core, malformed config, permissions)","Verify the core service is up and reachable from the jobservice container, since configuration is fetched over REST","Fix the identified configuration source and restart jobservice"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}