{"record":{"id":"ae6ff03ee21be2ed","repo":"goharbor/harbor","slug":"no-config-file-is-specified","errorCode":null,"errorMessage":"no config file is specified","messagePattern":"no config file is specified","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jobservice/main.go","lineNumber":60,"sourceCode":")\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\n\tvCtx := context.WithValue(context.Background(), utils.NodeID, utils.GenerateNodeID())\n\t// Create the root context\n\tctx, cancel := context.WithCancel(vCtx)\n\tdefer cancel()\n\n\t// Initialize logger\n\tif err := logger.Init(ctx); err != nil {\n\t\tpanic(err)\n\t}\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/main.go#L42-L78","documentation":"Fatal startup guard in the jobservice main function: the -c command-line flag for the YAML config file path was not provided (or is empty). Usage is printed, then the process panics because jobservice has no configuration file to load.","triggerScenarios":"Thrown at src/jobservice/main.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start jobservice with the config file flag, e.g. ./jobservice -c /etc/jobservice/config.yml","If running in Docker, ensure the entrypoint/command passes the -c argument and the config file is mounted","Verify the config file path is non-empty in the deployment manifest"],"exampleFix":null,"handlingStrategy":"validation","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"}