goharbor/harbor · error
no config file is specified
Error message
no config file is specified
What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/jobservice/main.go:60 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/ae6ff03ee21be2ed.
Report an issue: GitHub.
Appendix: source
Thrown at src/jobservice/main.go:60
)
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
vCtx := context.WithValue(context.Background(), utils.NodeID, utils.GenerateNodeID())
// Create the root context
ctx, cancel := context.WithCancel(vCtx)
defer cancel()
// Initialize logger
if err := logger.Init(ctx); err != nil {
panic(err)
}
View on GitHub (pinned to 7b2fd08cc5)