goharbor/harbor · critical
missing logger config of job
Error message
missing logger config of job
What it means
Config.validate() (src/jobservice/config/config.go:368) requires at least one job logger (c.JobLoggerConfigs, YAML key 'job_loggers'). These sinks persist per-job log data (what GetJobLogData later returns); with none configured, job output could not be stored, so startup aborts. The default Harbor config ships two job loggers.
Source
Thrown at src/jobservice/config/config.go:368
}
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
}
// MaxDanglingHour the max time for an execution can be dangling state
func MaxDanglingHour() int {
if DefaultConfig != nil && DefaultConfig.ReaperConfig != nil && DefaultConfig.ReaperConfig.MaxDanglingHour > 24*7 {
return DefaultConfig.ReaperConfig.MaxDanglingHour
}View on GitHub (pinned to 7b2fd08cc5)
Solutions
- Restore the default job_loggers block from Harbor's stock jobservice config template (FILE sink for job output plus a second logger)
- When configuring via env/template, ensure the job_loggers array renders with at least one entry
- Validate the rendered config in CI before deploy
Example fix
# before
job_loggers: []
# after
job_loggers:
- name: FILE
level: INFO
sweeper_duration: 1
settings:
output_file: /var/log/jobs/job_logs
backend: FILE Defensive patterns
Strategy: validation
Validate before calling
if len(cfg.JobLoggerConfigs) == 0 {
return errors.New("jobservice config must define at least one job logger")
} Prevention
- Keep the default job_loggers block (FILE sink for job output) in every environment
- Assert on len(JobLoggerConfigs) in config tests, mirroring Harbor's own config_test.go
- Never hand-delete logger sections when trimming config
When it happens
Trigger: A jobservice config whose 'job_loggers' array is empty or missing while the service-level 'loggers' is populated.
Common situations: Hand-written configs that only copy the loggers section; values files that trim job_loggers; programmatic config builders that fill LoggerConfigs but not JobLoggerConfigs.
Related errors
- missing logger config of job service
- 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/7cc7dbe26ddc3971.
Report an issue: GitHub.