apache/seatunnel · warning
Graph read operation failed on attempt
Error message
Graph read operation failed on attempt {}/{}. Error: {} What it means
WARN from HugeGraphClient.executeReadOperation when a read/schema-lookup call (e.g. getPropertyKey, createVertexLabelIfNotExist) fails on a retryable error and will be retried after reconnect(). Non-retryable server rejections are logged as ERROR and thrown immediately. If all attempts fail, an exception with BUILD_CLIENT_FAILED is raised.
Solutions
- Allow retries to proceed; schema lookups usually succeed on the next attempt
- Check server responsiveness (curl the schema endpoint) if retries keep failing
- Increase timeout/retry settings for heavily loaded HugeGraph instances
- Ensure server stability before launching large sink jobs that do many schema lookups
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight schema endpoint check curl -sf http://hugegraph:8080/graphs/<graph>/schema/propertykeys
Try / catch
try {
schemaReady = client.getPropertyKeyOrNull(key);
} catch (HugeGraphConnectorException e) {
// retries exhausted during schema discovery; fail fast with context
throw new IllegalStateException("Schema lookup failed for " + key, e);
} Prevention
- Start sink jobs only after the HugeGraph service passes health checks
- Increase read timeouts when the server is under heavy schema/load pressure
- Avoid job storms that hammer schema endpoints simultaneously at startup
- Keep retry counts high for initialization-phase reads (cheap and idempotent)
When it happens
Trigger: Schema discovery/read calls during sink initialization (getPropertyKey, getPropertyKeyOrNull, getVertexLabelOrNull, createPropertyKeyIfNotExist, createVertexLabelIfNotExist, createEdgeLabelIfNotExist) hit a retryable transport error (timeout, connection reset) and attempt < totalAttempts.
Common situations: HugeGraph server briefly restarting while a job initializes, slow schema endpoint responses under load, network instability between worker and server, or LB dropping idle connections before the first schema lookups.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- Connection issue detected. Forcing reconnection...
- Graph operation failed on attempt
- HugeGraph connection failed on attempt
- HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA
- HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/396a210e0b963688.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/client/HugeGraphClient.java:327
}
return true;
}
private <T> T executeReadOperation(ReadOperation<T> operation) {
int totalAttempts = this.maxRetries + 1;
for (int attempt = 1; attempt <= totalAttempts; attempt++) {
try {
ensureClientInitialized();
return operation.execute();
} catch (ServerException | ClientException e) {
if (!isRetryable(e)) {
LOG.error("Server rejected the request (non-retryable): {}", e.getMessage());
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,
"Server rejected the request (non-retryable): " + e.getMessage(),
e);
}
LOG.warn(
"Graph read operation failed on attempt {}/{}. Error: {}",
attempt,
totalAttempts,
e.getMessage());
reconnect();
if (attempt == totalAttempts) {
LOG.error("Max retries ({}) reached. Failing task.", this.maxRetries);
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.GRAPH_OPERATION_FAILED,
"Failed to execute graph read operation after "
+ totalAttempts
+ " attempt(s). Last error: "
+ e.getMessage(),
e);
}
sleepBeforeRetry(attempt);View on GitHub (pinned to cf67b549a7)