{"record":{"id":"5951aab428c031b0","repo":"goharbor/harbor","slug":"namespace-of-redis-worker-is-required","errorCode":null,"errorMessage":"namespace of redis worker is required","messagePattern":"namespace of redis worker is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/jobservice/config/config.go","lineNumber":357,"sourceCode":"\n\t// When backend is redis\n\tif c.PoolConfig.Backend == JobServicePoolBackendRedis {\n\t\tif c.PoolConfig.RedisPoolCfg == nil {\n\t\t\treturn fmt.Errorf(\"redis worker must be configured when backend is set to '%s'\", c.PoolConfig.Backend)\n\t\t}\n\t\tif utils.IsEmptyStr(c.PoolConfig.RedisPoolCfg.RedisURL) {\n\t\t\treturn errors.New(\"URL of redis worker is empty\")\n\t\t}\n\t\tif !strings.Contains(c.PoolConfig.RedisPoolCfg.RedisURL, \"://\") {\n\t\t\treturn errors.New(\"invalid redis URL\")\n\t\t}\n\n\t\tif _, err := url.Parse(c.PoolConfig.RedisPoolCfg.RedisURL); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid redis URL: %s\", err.Error())\n\t\t}\n\n\t\tif utils.IsEmptyStr(c.PoolConfig.RedisPoolCfg.Namespace) {\n\t\t\treturn errors.New(\"namespace of redis worker is required\")\n\t\t}\n\t}\n\n\t// Job service loggers\n\tif len(c.LoggerConfigs) == 0 {\n\t\treturn errors.New(\"missing logger config of job service\")\n\t}\n\n\t// Job loggers\n\tif len(c.JobLoggerConfigs) == 0 {\n\t\treturn errors.New(\"missing logger config of job\")\n\t}\n\n\treturn nil // valid\n}\n\n// MaxUpdateDuration the max time for an execution can be updated by task\nfunc MaxUpdateDuration() time.Duration {","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/config/config.go#L339-L375","documentation":"Config.validate() (src/jobservice/config/config.go:357) requires a non-empty RedisPoolCfg.Namespace whenever the pool backend is 'redis'. The namespace is the key prefix Harbor uses for every job service key in the shared Redis instance; an empty one risks key collisions with other services, so the job service refuses to boot.","triggerScenarios":"Backend set to 'redis' with a valid redis_url but JOB_SERVICE_POOL_REDIS_NAMESPACE (config.go:41) unset and jobservice.pool.namespace missing or empty in the YAML config.","commonSituations":"Minimal hand-written config.yml that only sets backend and redis_url; Helm chart overrides that drop the namespace key; partially rendered config templates.","solutions":["Set the namespace (jobservice.pool.namespace / JOB_SERVICE_POOL_REDIS_NAMESPACE), e.g. harbor_job_service","Keep the value identical across restarts — changing it orphans previously stored job data in Redis","Redeploy and confirm the variable actually reaches the jobservice container"],"exampleFix":"# before\npool:\n  backend: redis\n  redis_url: redis://:pwd@redis:6379\n# after\npool:\n  backend: redis\n  redis_url: redis://:pwd@redis:6379\n  namespace: harbor_job_service","handlingStrategy":"validation","validationCode":"if cfg.PoolConfig.Backend == config.JobServicePoolBackendRedis {\n    if utils.IsEmptyStr(cfg.PoolConfig.RedisPoolCfg.Namespace) {\n        return errors.New(\"JOB_SERVICE_POOL_REDIS_NAMESPACE is required when backend is redis\")\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat backend, redis_url, and namespace as one unit — never configure one without the others","Pin the namespace in versioned config so it cannot drift between deployments","Validate config in CI with the same Validate() the service uses"],"tags":["redis","configuration","jobservice","harbor","namespace","startup"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}