apache/seatunnel · error · EasysearchConnectorException

GET_EZS_VERSION_FAILED

GET_EZS_VERSION_FAILED

Error message

fail to get easysearch version.

What it means

EasysearchClient.getClusterInfo calls GET / to read version info; any IOException during that request is wrapped as EasysearchConnectorException with GET_EZS_VERSION_FAILED. This call runs during catalog open / connection initialization, so the job fails before processing data.

Source

Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:281

    }

    public EasysearchClusterInfo getClusterInfo() {
        Request request = new Request("GET", "/");
        try {
            Response response = restClient.performRequest(request);
            String result = EntityUtils.toString(response.getEntity());
            ObjectMapper objectMapper = new ObjectMapper();
            JsonNode jsonNode = objectMapper.readTree(result);
            JsonNode versionNode = jsonNode.get("version");
            return EasysearchClusterInfo.builder()
                    .clusterVersion(versionNode.get("number").asText())
                    .distribution(
                            Optional.ofNullable(versionNode.get("distribution"))
                                    .map(e -> e.asText())
                                    .orElse(null))
                    .build();
        } catch (IOException e) {
            throw new EasysearchConnectorException(
                    EasysearchConnectorErrorCode.GET_EZS_VERSION_FAILED,
                    "fail to get easysearch version.",
                    e);
        }
    }

    public void close() {
        try {
            restClient.close();
        } catch (IOException e) {
            log.warn("close easysearch connection error", e);
        }
    }

    public boolean clearScroll(String scrollId) {
        if (scrollId == null || scrollId.isEmpty()) {
            return false;
        }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify the endpoint responds: curl http(s)://host:port/ from the job machine.
  2. Check hosts/scheme/credentials options in the Easysearch catalog/connection config.
  3. Inspect the wrapped IOException cause for connect vs read vs SSL failure.
  4. Retry after confirming cluster health; ensure the root endpoint is not blocked by a proxy.

Example fix

// before
EasysearchConnectionOptions opts = EasysearchConnectionOptions.builder()
    .hosts(Collections.singletonList("localhost:9210")) // wrong port
    .build();
// after
EasysearchConnectionOptions opts = EasysearchConnectionOptions.builder()
    .hosts(Collections.singletonList("localhost:9200"))
    .scheme("http")
    .build();
Defensive patterns

Strategy: retry

Validate before calling

// preflight version endpoint
HttpResponse resp = httpGet(scheme + "://" + host + ":" + port + "/");
if (resp.status() != 200) throw new IllegalStateException("Easysearch root endpoint not reachable");

Try / catch

try {
    clusterInfo = client.getClusterInfo();
} catch (EasysearchConnectorException e) {
    if (EasysearchConnectorErrorCode.GET_EZS_VERSION_FAILED.equals(e.getErrorCode())) {
        // check cause IOException: retry after connectivity check
    } else throw e;
}

Prevention

When it happens

Trigger: Requesting the root endpoint fails while establishing cluster info: host unreachable, connection refused, auth challenge causing IO failure, or response stream broken.

Common situations: Wrong host/port in config; cluster starting up; TLS misconfiguration; proxy blocking the root endpoint; transient network blip at job start.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/650e88a4516569a0. Report an issue: GitHub.