{"record":{"id":"2dc0a14124b054e4","repo":"goharbor/harbor","slug":"no-worker-worker-is-configured","errorCode":null,"errorMessage":"no worker worker is configured","messagePattern":"no worker worker is configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/jobservice/config/config.go","lineNumber":333,"sourceCode":"\tif !utils.IsValidPort(c.Port) {\n\t\treturn fmt.Errorf(\"port number should be a none zero integer and less or equal 65535, but current is %d\", c.Port)\n\t}\n\n\tif c.Protocol == JobServiceProtocolHTTPS {\n\t\tif c.HTTPSConfig == nil {\n\t\t\treturn fmt.Errorf(\"certificate must be configured if serve with protocol %s\", c.Protocol)\n\t\t}\n\n\t\tif utils.IsEmptyStr(c.HTTPSConfig.Cert) ||\n\t\t\t!utils.FileExists(c.HTTPSConfig.Cert) ||\n\t\t\tutils.IsEmptyStr(c.HTTPSConfig.Key) ||\n\t\t\t!utils.FileExists(c.HTTPSConfig.Key) {\n\t\t\treturn fmt.Errorf(\"certificate for protocol %s is not correctly configured\", c.Protocol)\n\t\t}\n\t}\n\n\tif c.PoolConfig == nil {\n\t\treturn errors.New(\"no worker worker is configured\")\n\t}\n\n\tif c.PoolConfig.Backend != JobServicePoolBackendRedis {\n\t\treturn fmt.Errorf(\"worker worker backend %s does not support\", c.PoolConfig.Backend)\n\t}\n\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","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/config/config.go#L315-L351","documentation":"Jobservice config load fails with 'no worker worker is configured' (a known duplicated-word typo in the message) when the loaded configuration has no worker_pool section, so PoolConfig is nil. It is raised by config validation at startup and prevents jobservice from starting at all.","triggerScenarios":"Launching jobservice with a config.yml whose worker_pool block is missing or mis-indented so it never lands under the top-level key (PoolConfig parses as nil).","commonSituations":"Hand-written minimal configs; template drift after upgrading to a config layout that requires worker_pool; YAML indentation placing worker_pool under another key.","solutions":["Add a worker_pool section with backend: redis plus a redis_pool block (the only supported backend)","Validate YAML indentation against the jobservice config template in the repo","Start from the shipped default config and edit it rather than writing from scratch"],"exampleFix":"# before\nprotocol: http\nhttp_config:\n  port: 8080\n\n# after\nprotocol: http\nhttp_config:\n  port: 8080\nworker_pool:\n  backend: redis\n  redis_pool:\n    redis_url: redis://:password@redis:6379/5\n    namespace: harbor_jobservice\n    worker_count: 10","handlingStrategy":"validation","validationCode":"// Pre-flight the config before handing it to jobservice\nvar cfg Config\n_ = yaml.Unmarshal(raw, &cfg)\nif cfg.PoolConfig == nil {\n    return errors.New(\"config.yml missing worker_pool section\")\n}\nif cfg.PoolConfig.Backend != \"redis\" {\n    return errors.New(\"worker_pool.backend must be redis\")\n}","typeGuard":"func isNoWorkerConfigured(err error) bool { return err != nil && strings.Contains(err.Error(), \"no worker worker is configured\") }","tryCatchPattern":"if err := cfg.Load(...); err != nil {\n    if strings.Contains(err.Error(), \"no worker worker is configured\") {\n        return errors.New(\"add worker_pool { backend: redis, redis_pool: {...} } to config.yml\")\n    }\n    return err\n}","preventionTips":["Validate config.yml in CI with the jobservice config schema","Diff against the shipped template after every upgrade","Lint YAML indentation (worker_pool must be top-level)"],"tags":["harbor","jobservice","config","worker-pool","startup"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}