eclipse-vertx/vert.x · error · IllegalStateException
No results for " + server
Error message
No results for " + server
What it means
Inside HttpClientImpl, after the load balancer/endpoint selects a server for the request, a null selection is an unrecoverable state and throws this IllegalStateException. It means the endpoint had no available servers to satisfy the request for the given routing key.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/http/impl/HttpClientImpl.java:710
lookup = null;
protocol = null;
}
}
if (lookup == null) {
altUsed = null;
lookup = endpoint.selectServer();
} else {
OriginServer unwrap = (OriginServer) lookup.unwrap();
altUsed = unwrap.primary ? null : unwrap.authority;
}
} else {
protocol = protocol_;
lookup = endpoint.selectServer(routingKey);
altUsed = null;
}
ServerEndpoint lookup2 = lookup;
if (lookup2 == null) {
throw new IllegalStateException("No results for " + server);
}
SocketAddress address = lookup2.address();
return getPool(
followAlternativeServices && useSSL && altUsed == null,
useSSL,
protocol,
sslOptions,
address,
authority != null ? authority : HostAndPort.create(address.host(), address.port()),
new Function<SharedHttpClientConnectionGroup, Future<ConnectionObtainedResult>>() {
@Override
public Future<ConnectionObtainedResult> apply(SharedHttpClientConnectionGroup pool) {
Future<Lease<HttpClientConnection>> fut2 = pool.requestConnection(streamCtx, connectTimeout);
ServerInteraction endpointRequest = lookup2.newInteraction();
return fut2.andThen(ar -> {
if (ar.failed()) {
endpointRequest.reportFailure(ar.cause());
}View on GitHub (pinned to fb308bd8c3)
Solutions
- Verify the target server is reachable and registered before sending requests.
- Retry the request after the endpoint pool is repopulated (reconnection/debounce).
- Inspect the load balancer configuration so at least one candidate is selectable.
- Catch IllegalStateException and surface a 503-style error to the caller.
Defensive patterns
Strategy: try-catch
Try / catch
request.future()
.recover(err -> {
if (err instanceof IllegalStateException && err.getMessage().startsWith("No results for")) {
return retryAfterDelay();
}
return Future.failedFuture(err);
}); Prevention
- Monitor endpoint pool health before issuing requests.
- Configure a retry with backoff for transient empty selections.
- Ensure services register with the endpoint/resolver before traffic starts.
When it happens
Trigger: Requesting a connection when the underlying endpoint's server list is empty — all servers removed/dead, the load balancer returned no candidate, or the routing key matched no registered endpoint.
Common situations: Target service down or unregistered while a request is in flight; load balancer configuration excluding all candidates (circuit-breaking, weights of 0); shutting down the endpoint pool while requests still arrive.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/ecbc34b13b05649c.
Report an issue: GitHub.