goharbor/harbor · error

network port should be less than 65535

Error message

network port should be less than 65535

What it means

Validation in config PortType.validate: the parsed port value exceeds 65535, so it is outside the valid TCP port range for the configuration item.

Solutions

  1. Set the port to a value between 1 and 65535
  2. Verify the intended service port (e.g. 443, 8443) was entered correctly
  3. Re-apply the configuration after correcting the port
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/config/metadata/type.go:117 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/24378d227b11c362. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/config/metadata/type.go:117

	return parseInt(str)
}

// PortType ...
type PortType struct {
	IntType
}

func (t *PortType) validate(str string) error {
	val, err := strconv.Atoi(str)
	if err != nil {
		return err
	}
	if val < 0 {
		return fmt.Errorf("network port should be greater than 0")
	}

	if val > 65535 {
		return fmt.Errorf("network port should be less than 65535")
	}

	return err
}

// LdapScopeType - The LDAP scope is a int type, but its is limit to 0, 1, 2
type LdapScopeType struct {
	IntType
}

// validate - Verify the range is limited
func (t *LdapScopeType) validate(str string) error {
	if str == "0" || str == "1" || str == "2" {
		return nil
	}
	return fmt.Errorf("invalid scope, should be %d, %d or %d",
		common.LDAPScopeBase,
		common.LDAPScopeOnelevel,

View on GitHub (pinned to 7b2fd08cc5)