apache/seatunnel · error · RedisConnectorException
RedisErrorCode-03
RedisErrorCode-03
Error message
Failed to get the write response
What it means
Thrown by RedisSingleClient.processResponses after a pipelined batch write: each queued Response.get() may surface a JedisException (stored by the pipeline), and if any does, it is wrapped as RedisConnectorException with code GET_RESPONSE_FAILED. It means one or more commands in the batch write failed.
Source
Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/client/RedisSingleClient.java:288
String cursor, ScanParams scanParams, RedisDataType type) {
if (type == null) {
// redis 5
return jedis.scan(cursor, scanParams);
} else {
// redis 7
return jedis.scan(cursor, scanParams, type.name());
}
}
private void processResponses(List<Response<?>> responseList) {
try {
for (Response<?> response : responseList) {
// If the response is an exception object, it will be thrown
response.get();
}
} catch (JedisException e) {
throw new RedisConnectorException(RedisErrorCode.GET_RESPONSE_FAILED, e);
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Check the wrapped JedisException message for the actual server error (WRONGTYPE, OOM command not allowed, connection reset)
- Fix key type conflicts — ensure existing keys match the target type or delete/flush conflicting keys before writing
- Increase Redis maxmemory or add eviction policy if writes fail with OOM
- Reduce pipeline batch size and socket timeouts to avoid timeouts on large batches
- Verify network stability and Redis server logs for errors at the failure time
Defensive patterns
Strategy: try-catch
Validate before calling
// before batch write: check key type matches
String t = jedis.type(key);
if (!expectedType.equals(t) && !"none".equals(t)) { throw new IllegalStateException("WRONGTYPE for " + key); } Try / catch
try { client.batchWriteHash(map); } catch (RedisConnectorException e) {
if (e.getCause() instanceof JedisException je && je.getMessage().contains("WRONGTYPE")) { /* fix key type or rename keys */ }
// OOM: reduce batch / raise maxmemory; connection: retry with backoff
} Prevention
- Check INFO memory / maxmemory before large bulk writes
- Verify existing key types before writing (TYPE command)
- Keep pipeline batches modest (hundreds, not tens of thousands)
- Monitor Redis server logs and connection health
When it happens
Trigger: batchWriteString/batchWriteList/batchWriteSet/batchWriteHash/batchWriteZset call processResponses, and a pipelined command fails — connection dropped mid-pipeline, OOM on the server, WRONGTYPE, or read timeout on response.get().
Common situations: Redis server memory limit (maxmemory) rejecting writes; writing a value with the wrong type for an existing key (WRONGTYPE); network instability between the SeaTunnel worker and Redis; pipeline batches too large causing timeouts.
Related errors
- RedisErrorCode-01
- WRITER_OPERATION_FAILED
- Failed to write %d items to table %s after %d retries
- ADD_BATCH_DATA_FAILED
- WRITE_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/0c3f254252188c94.
Report an issue: GitHub.