eclipse-vertx/vert.x · error · java.lang.IllegalArgumentException
queryTimeout must be > 0
Error message
queryTimeout must be > 0
What it means
Configuration validation in setQueryTimeout: a DNS query timeout of zero or negative milliseconds is invalid because the resolver would consider every query failed instantly. The setter enforces a minimum of 1 ms before accepting the value.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java:397
return this;
}
/**
* @return the query timeout in milliseconds
*/
public long getQueryTimeout() {
return queryTimeout;
}
/**
* Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.
*
* @param queryTimeout the query timeout in milliseconds
* @return a reference to this, so the API can be used fluently
*/
public AddressResolverOptions setQueryTimeout(long queryTimeout) {
if (queryTimeout < 1) {
throw new IllegalArgumentException("queryTimeout must be > 0");
}
this.queryTimeout = queryTimeout;
return this;
}
/**
* @return the maximum number of queries to be sent during a resolution
*/
public int getMaxQueries() {
return maxQueries;
}
/**
* Set the maximum number of queries when an hostname is resolved.
*
* @param maxQueries the max number of queries to be sent
* @return a reference to this, so the API can be used fluently
*/View on GitHub (pinned to fb308bd8c3)
Solutions
- Use a positive timeout in milliseconds (e.g. 5000 for 5 seconds)
- Set the timeout from a validated configuration source rather than raw user input
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java:397 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/f3baefaaafd1fe54.
Report an issue: GitHub.