eclipse-vertx/vert.x · error · java.lang.IllegalArgumentException
queryTimeout must be > 0
Error message
queryTimeout must be > 0
What it means
Configuration validation in DnsClientOptions.setQueryTimeout: the time after which a DNS query is considered failed must be at least 1 ms. A zero or negative timeout would fail every query immediately, so the setter rejects it.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/dns/DnsClientOptions.java:148
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 DnsClientOptions setQueryTimeout(long queryTimeout) {
if (queryTimeout < 1) {
throw new IllegalArgumentException("queryTimeout must be > 0");
}
this.queryTimeout = queryTimeout;
return this;
}
/**
* @return {@code true} when network activity logging is enabled
*/
public boolean getLogActivity() {
return logActivity;
}
/**
* @return {@code ByteBufFormat} get Netty's log format
*/
public ByteBufFormat getActivityLogFormat() {
return activityLogFormat;
}View on GitHub (pinned to fb308bd8c3)
Solutions
- Pass a positive timeout in milliseconds
- Validate configuration loaded from JSON before constructing the client options
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/dns/DnsClientOptions.java:148 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/182067a77ae0f810.
Report an issue: GitHub.