GoogleContainerTools/jib · error · NumberFormatException
property + " cannot be greater than " + validRange.upperEndp
Error message
property + " cannot be greater than " + validRange.upperEndpoint() + ": " + value
What it means
The mirror of the lower-bound check: thrown when a numeric Jib system property parses but exceeds the property's upper bound. The message includes the property name, the maximum allowed, and the offending value.
Source
Thrown at jib-core/src/main/java/com/google/cloud/tools/jib/global/JibSystemProperties.java:142
}
private static void checkNumericSystemProperty(String property, Range<Integer> validRange) {
String value = System.getProperty(property);
if (value == null) {
return;
}
int parsed;
try {
parsed = Integer.parseInt(value);
} catch (NumberFormatException ex) {
throw new NumberFormatException(property + " must be an integer: " + value);
}
if (validRange.hasLowerBound() && validRange.lowerEndpoint() > parsed) {
throw new NumberFormatException(
property + " cannot be less than " + validRange.lowerEndpoint() + ": " + value);
} else if (validRange.hasUpperBound() && validRange.upperEndpoint() < parsed) {
throw new NumberFormatException(
property + " cannot be greater than " + validRange.upperEndpoint() + ": " + value);
}
}
private JibSystemProperties() {}
}
View on GitHub (pinned to fb949e2676)
Solutions
- Use a proxy port in 1-65535, e.g. -Djib.proxy.port=8080
- Cap jib.httpTimeout at the documented maximum (Integer-range) milliseconds
- Remove the property to use defaults
- Fix typos/extra digits in the value
Example fix
// before gradle jib -Djib.proxy.port=80800 // after gradle jib -Djib.proxy.port=8080
Defensive patterns
Strategy: validation
Validate before calling
int port = Integer.parseInt(System.getProperty("jib.proxy.port", "0"));
if (port < 1 || port > 65535) throw new IllegalArgumentException("jib.proxy.port out of range: " + port); Try / catch
try { jibStep(); } catch (NumberFormatException e) { if (e.getMessage().contains("cannot be greater than")) { failBuild("Value too large: " + e.getMessage()); } throw e; } Prevention
- Keep ports within 1-65535
- Watch for typos with extra digits in port numbers
- Cap timeouts at Integer.MAX_VALUE milliseconds
When it happens
Trigger: Setting -Djib.httpTimeout above the maximum allowed milliseconds value, or -Djib.proxy.port greater than 65535.
Common situations: Setting a port like 80800 (typo, extra digit), huge timeout values meant as 'infinite', unexpanded template variables resolving to absurd numbers.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- property + " must be an integer: " + value
- property + " cannot be less than " + validRange.lowerEndpoin
- <field> is required but not set
- jib.to.tags contains empty tag
- <from><platforms> contains a platform configuration that is
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/85fbbf172d5c9428.
Report an issue: GitHub.