{"record":{"id":"00b09b352baf6dba","repo":"goharbor/harbor","slug":"port-number-should-be-a-none-zero-integer-and-less","errorCode":null,"errorMessage":"port number should be a none zero integer and less or equal 65535, but current is %d","messagePattern":"port number should be a none zero integer and less or equal 65535, but current is (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jobservice/config/config.go","lineNumber":316,"sourceCode":"\t\t\t} else {\n\t\t\t\tc.PoolConfig.RedisPoolCfg.IdleTimeoutSecond = int64(v)\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Check if the configurations are valid settings.\nfunc (c *Configuration) validate() error {\n\tif c.Protocol != JobServiceProtocolHTTPS &&\n\t\tc.Protocol != JobServiceProtocolHTTP {\n\t\treturn fmt.Errorf(\"protocol should be %s or %s, but current setting is %s\",\n\t\t\tJobServiceProtocolHTTP,\n\t\t\tJobServiceProtocolHTTPS,\n\t\t\tc.Protocol)\n\t}\n\n\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}","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/config/config.go#L298-L334","documentation":"Error \"port number should be a none zero integer and less or equal 65535, but current is %d\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/jobservice/config/config.go:316 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}