{"record":{"id":"ecbc34b13b05649c","repo":"eclipse-vertx/vert.x","slug":"no-results-for-server","errorCode":null,"errorMessage":"No results for \" + server","messagePattern":"No results for \" \\+ server","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/impl/HttpClientImpl.java","lineNumber":710,"sourceCode":"              lookup = null;\n              protocol = null;\n            }\n          }\n          if (lookup == null) {\n            altUsed = null;\n            lookup = endpoint.selectServer();\n          } else {\n            OriginServer unwrap = (OriginServer) lookup.unwrap();\n            altUsed = unwrap.primary ? null : unwrap.authority;\n          }\n        } else {\n          protocol = protocol_;\n          lookup = endpoint.selectServer(routingKey);\n          altUsed = null;\n        }\n        ServerEndpoint lookup2 = lookup;\n        if (lookup2 == null) {\n          throw new IllegalStateException(\"No results for \" + server);\n        }\n        SocketAddress address = lookup2.address();\n        return getPool(\n          followAlternativeServices && useSSL && altUsed == null,\n          useSSL,\n          protocol,\n          sslOptions,\n          address,\n          authority != null ? authority : HostAndPort.create(address.host(), address.port()),\n          new Function<SharedHttpClientConnectionGroup, Future<ConnectionObtainedResult>>() {\n            @Override\n            public Future<ConnectionObtainedResult> apply(SharedHttpClientConnectionGroup pool) {\n              Future<Lease<HttpClientConnection>> fut2 = pool.requestConnection(streamCtx, connectTimeout);\n              ServerInteraction endpointRequest = lookup2.newInteraction();\n              return fut2.andThen(ar -> {\n                if (ar.failed()) {\n                  endpointRequest.reportFailure(ar.cause());\n                }","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/impl/HttpClientImpl.java#L692-L728","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"request.future()\n  .recover(err -> {\n    if (err instanceof IllegalStateException && err.getMessage().startsWith(\"No results for\")) {\n      return retryAfterDelay();\n    }\n    return Future.failedFuture(err);\n  });","preventionTips":["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."],"tags":["load-balancer","endpoint","no-results"],"backgroundTag":"empty-result-set","analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}