GoogleContainerTools/jib · error · NumberFormatException
property + " cannot be less than " + validRange.lowerEndpoin
Error message
property + " cannot be less than " + validRange.lowerEndpoint() + ": " + value
What it means
checkNumericSystemProperty validates the parsed integer against a valid Range. This NumberFormatException is thrown when the value parses but is below the property's lower bound. The message names the property, the minimum allowed, and the offending value.
Source
Thrown at jib-core/src/main/java/com/google/cloud/tools/jib/global/JibSystemProperties.java:139
*/
public static boolean skipExistingImages() {
return Boolean.getBoolean(SKIP_EXISTING_IMAGES);
}
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
- Set jib.httpTimeout to a positive integer (milliseconds), e.g. 20000
- Use a valid proxy port within the allowed range (e.g. 1-65535)
- Check Jib docs for the exact valid range of the property
- Remove the property to fall back to library defaults
Example fix
// before gradle jib -Djib.httpTimeout=0 // after gradle jib -Djib.httpTimeout=20000
Defensive patterns
Strategy: validation
Validate before calling
long v = Long.parseLong(System.getProperty("jib.httpTimeout", "0"));
if (v <= 0) throw new IllegalArgumentException("jib.httpTimeout must be > 0"); Try / catch
try { jibStep(); } catch (NumberFormatException e) { if (e.getMessage().contains("cannot be less than")) { failBuild("Value too small: " + e.getMessage()); } throw e; } Prevention
- Remember jib.httpTimeout is in milliseconds and must be positive
- Never use 0 to mean 'no timeout' — omit the property instead
- Validate template-expanded variables resolve to positive numbers
When it happens
Trigger: Setting -Djib.httpTimeout=0 or a negative timeout (must be > 0), or a proxy port below the allowed minimum (ports must be >= 0/1 as enforced).
Common situations: Setting jib.httpTimeout=0 expecting 'infinite' or 'disabled' timeout; negative port numbers from misread docs; template variables left unexpanded (e.g. ${TIMEOUT} resolving to 0 or negative).
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 greater than " + validRange.upperEndp
- <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/d60c8b5ef3face62.
Report an issue: GitHub.