goharbor/harbor · critical
missing logger config of job service
Error message
missing logger config of job service
What it means
Config.validate() (src/jobservice/config/config.go:363) requires at least one job service logger (c.LoggerConfigs, YAML key 'loggers'). These sinks carry the service's own operational logs; with none configured the service would run blind, so startup aborts with this error.
Source
Thrown at src/jobservice/config/config.go:363
if utils.IsEmptyStr(c.PoolConfig.RedisPoolCfg.RedisURL) {
return errors.New("URL of redis worker is empty")
}
if !strings.Contains(c.PoolConfig.RedisPoolCfg.RedisURL, "://") {
return errors.New("invalid redis URL")
}
if _, err := url.Parse(c.PoolConfig.RedisPoolCfg.RedisURL); err != nil {
return fmt.Errorf("invalid redis URL: %s", err.Error())
}
if utils.IsEmptyStr(c.PoolConfig.RedisPoolCfg.Namespace) {
return errors.New("namespace of redis worker is required")
}
}
// Job service loggers
if len(c.LoggerConfigs) == 0 {
return errors.New("missing logger config of job service")
}
// Job loggers
if len(c.JobLoggerConfigs) == 0 {
return errors.New("missing logger config of job")
}
return nil // valid
}
// MaxUpdateDuration the max time for an execution can be updated by task
func MaxUpdateDuration() time.Duration {
if DefaultConfig != nil && DefaultConfig.ReaperConfig != nil && DefaultConfig.ReaperConfig.MaxUpdateHour > 24 {
return time.Duration(DefaultConfig.ReaperConfig.MaxUpdateHour) * time.Hour
}
return 24 * time.Hour
}
View on GitHub (pinned to 7b2fd08cc5)
Solutions
- Restore the stock logger block from Harbor's default jobservice config template (a STD_OUTPUT or FILE sink at level INFO)
- If building config programmatically, append at least one *LoggerConfig before calling Load/Validate
- Inspect the rendered config.yml inside the container to confirm the loggers list survived templating
Example fix
# before
loggers: []
# after
loggers:
- name: STD_OUTPUT
level: INFO
sweeper_duration: 1
backend: STD_OUTPUT Defensive patterns
Strategy: validation
Validate before calling
if len(cfg.LoggerConfigs) == 0 {
return errors.New("jobservice config must define at least one logger")
} Prevention
- Start from Harbor's stock jobservice config template and override values, do not rebuild it
- Diff the rendered config against the default after template changes
- Validate the full config in a pre-deploy smoke test
When it happens
Trigger: A jobservice config whose 'loggers' array is empty or entirely missing — e.g. a trimmed-down config.yml where only the pool section was copied — when Load() runs validation.
Common situations: Custom minimal configs in bespoke images; Helm values rendering loggers: []; config templates left incomplete after a Harbor upgrade.
Related errors
- missing logger config of job
- invalid redis URL
- namespace of redis worker is required
- Error: must set log endpoint host to enable external host
- Error: must set log endpoint port to enable external host
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/aa068a0dc2e61ec1.
Report an issue: GitHub.