{"record":{"id":"24378d227b11c362","repo":"goharbor/harbor","slug":"network-port-should-be-less-than-65535","errorCode":null,"errorMessage":"network port should be less than 65535","messagePattern":"network port should be less than 65535","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/config/metadata/type.go","lineNumber":117,"sourceCode":"\treturn parseInt(str)\n}\n\n// PortType ...\ntype PortType struct {\n\tIntType\n}\n\nfunc (t *PortType) validate(str string) error {\n\tval, err := strconv.Atoi(str)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif val < 0 {\n\t\treturn fmt.Errorf(\"network port should be greater than 0\")\n\t}\n\n\tif val > 65535 {\n\t\treturn fmt.Errorf(\"network port should be less than 65535\")\n\t}\n\n\treturn err\n}\n\n// LdapScopeType - The LDAP scope is a int type, but its is limit to 0, 1, 2\ntype LdapScopeType struct {\n\tIntType\n}\n\n// validate - Verify the range is limited\nfunc (t *LdapScopeType) validate(str string) error {\n\tif str == \"0\" || str == \"1\" || str == \"2\" {\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"invalid scope, should be %d, %d or %d\",\n\t\tcommon.LDAPScopeBase,\n\t\tcommon.LDAPScopeOnelevel,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/config/metadata/type.go#L99-L135","documentation":"Validation in config PortType.validate: the parsed port value exceeds 65535, so it is outside the valid TCP port range for the configuration item.","triggerScenarios":"Thrown at src/lib/config/metadata/type.go:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the port to a value between 1 and 65535","Verify the intended service port (e.g. 443, 8443) was entered correctly","Re-apply the configuration after correcting the port"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}