apache/seatunnel · error · StarRocksConnectorException

QUEST_QUERY_PLAN_FAILED

QUEST_QUERY_PLAN_FAILED

Error message

query failed with empty response

What it means

StarRocksSource's query plan client fetches an HTTP query plan from a StarRocks FE node; after exhausting all configured FE nodes (each attempt caught and logged), it throws QUEST_QUERY_PLAN_FAILED with 'query failed with empty response'. This means no FE returned a usable query plan, so no splits can be produced and the source read fails.

Source

Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/source/StarRocksQueryPlanReadClient.java:174

                            .append(sourceConfig.getDatabase())
                            .append("/")
                            .append(table)
                            .append("/_query_plan")
                            .toString();
            try {
                respString =
                        RetryUtils.retryWithException(
                                () -> httpHelper.doHttpPost(url, getQueryPlanHttpHeader(), body),
                                retryMaterial);
                if (StringUtils.isNoneEmpty(respString)) {
                    return JsonUtils.parseObject(respString, QueryPlan.class);
                }
            } catch (Exception e) {
                log.error("Request query Plan From {} failed: {}", feNode, e.getMessage());
            }
        }

        throw new StarRocksConnectorException(
                StarRocksConnectorErrorCode.QUEST_QUERY_PLAN_FAILED,
                "query failed with empty response");
    }

    private String getBasicAuthHeader(String username, String password) {
        String auth = username + ":" + password;
        byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(StandardCharsets.UTF_8));
        return new StringBuilder("Basic ").append(new String(encodedAuth)).toString();
    }

    private Map<String, String> getQueryPlanHttpHeader() {
        Map<String, String> headerMap = new HashMap<>();
        headerMap.put("Content-Type", "application/json;charset=UTF-8");
        headerMap.put(
                "Authorization",
                getBasicAuthHeader(sourceConfig.getUsername(), sourceConfig.getPassword()));
        return headerMap;
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify cluster FE HTTP port (usually 8030) is reachable from the SeaTunnel node: curl -u user:pass http://<fe>:8030/api/<db>/<table>/_query_plan
  2. Check fe.log on the StarRocks FE for the failed plan request and its root cause
  3. Confirm username/password are correct and the user has SELECT privilege on the table
  4. If multiple FEs are configured, ensure at least one is healthy; check network/DNS and firewall rules
  5. Retry the job — transient FE restarts or load can cause all-attempt failures

Example fix

// before
url = "http://fe-host:9030/api/db/table/_query_plan" // wrong port (mysql port)
// after
url = "http://fe-host:8030/api/db/table/_query_plan"
Defensive patterns

Strategy: retry

Validate before calling

curl -s -u user:pass http://fe-host:8030/api/db/table/_query_plan -X POST -d '{}' # verify FE plan endpoint reachable before running the job

Type guard

boolean feReachable(String feUrl) { try { HttpURLConnection c = (HttpURLConnection) new URL(feUrl).openConnection(); c.setConnectTimeout(3000); return c.getResponseCode() > 0; } catch (Exception e) { return false; } }

Try / catch

try { runJob(); } catch (StarRocksConnectorException e) { if (Objects.equals(e.getErrorCode(), StarRocksConnectorErrorCode.QUEST_QUERY_PLAN_FAILED)) { /* check FE health, retry with backoff or fail fast with FE diagnostics */ } throw e; }

Prevention

When it happens

Trigger: All FE HTTP endpoints fail during queryPlan(): FE unreachable/wrong port (default 8030 http vs 9030 mysql), wrong username/password, query plan HTTP call returning non-200 or empty body, or network/firewall blocking the FE HTTP port.

Common situations: cluster.query_url pointing at FE RPC port instead of HTTP port; FE nodes down or behind a LB dropping the request; auth failure against FE; Kerberos/HTTP auth setup differences; containerized deployments where FE hostname is not resolvable from the SeaTunnel worker.

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/ac59488986f12928. Report an issue: GitHub.