prestodb/presto · error · ClientException
Invalid server URL:
Error message
Invalid server URL:
What it means
getServerInfo in QueryExecutor converts the given server URI to an OkHttp HttpUrl; when HttpUrl.get(server) returns null the URI is not a valid absolute HTTP(S) URL, so this ClientException is thrown. The faulting input is the malformed coordinator URL supplied in the JDBC connection string.
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/QueryExecutor.java:53
private static final JsonCodec<ServerInfo> SERVER_INFO_CODEC = jsonCodec(ServerInfo.class);
private final OkHttpClient httpClient;
public QueryExecutor(OkHttpClient httpClient)
{
this.httpClient = requireNonNull(httpClient, "httpClient is null");
}
public StatementClient startQuery(ClientSession session, String query)
{
return newStatementClient(httpClient, session, query);
}
public ServerInfo getServerInfo(URI server)
{
HttpUrl url = HttpUrl.get(server);
if (url == null) {
throw new ClientException("Invalid server URL: " + server);
}
url = url.newBuilder().encodedPath("/v1/info").build();
Request request = new Request.Builder().url(url).build();
JsonResponse<ServerInfo> response = JsonResponse.execute(SERVER_INFO_CODEC, httpClient, request);
if (!response.hasValue()) {
throw new RuntimeException(format("Request to %s failed: %s [Error: %s]", server, response, response.getResponseBody()));
}
return response.getValue();
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the coordinator URL in the JDBC string is an absolute http:// or https:// URL
- Check for missing scheme, stray characters, or whitespace in the configured URL
- Validate the URL with java.net.URI before constructing the connection
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/QueryExecutor.java:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e59751892c387bef.
Report an issue: GitHub.