apache/seatunnel · error · DingTalkConnectorException
SEND_RESPONSE_FAILED
SEND_RESPONSE_FAILED
Error message
Send response message to DinkTalk server failed
What it means
DingTalkWriter.send executes the robot send request via the DingTalk SDK client; if the SDK throws ApiException during the HTTP exchange, it is wrapped as DingTalkConnectorException(SEND_RESPONSE_FAILED, 'Send response message to DinkTalk server failed'). It indicates the transport-level exchange with the DingTalk robot endpoint (oapi.dingtalk.com) failed.
Source
Thrown at seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/sink/DingTalkWriter.java:81
public RobotClient(String url, String secret) {
this.url = url;
this.secret = secret;
}
public OapiRobotSendResponse send(String message) throws IOException {
if (null == client) {
client = new DefaultDingTalkClient(getUrl());
}
OapiRobotSendRequest request = new OapiRobotSendRequest();
request.setMsgtype("text");
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text();
text.setContent(message);
request.setText(text);
try {
return this.client.execute(request);
} catch (ApiException e) {
throw new DingTalkConnectorException(
DingTalkConnectorErrorCode.SEND_RESPONSE_FAILED,
"Send response message to DinkTalk server failed",
e);
}
}
public String getUrl() throws IOException {
Long timestamp = System.currentTimeMillis();
String sign = getSign(timestamp);
return url + "×tamp=" + timestamp + "&sign=" + sign;
}
public String getSign(Long timestamp) throws IOException {
try {
String stringToSign = timestamp + "\n" + secret;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8));View on GitHub (pinned to cf67b549a7)
Solutions
- Verify network egress to oapi.dingtalk.com from the SeaTunnel node (curl the endpoint)
- Check proxy settings (http_proxy/https_proxy, JVM properties) and firewall rules
- Validate the robot access_token/webhook URL in the sink config
- Retry the job; if ApiException persists, check DingTalk service status
Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: curl -sS https://oapi.dingtalk.com/robot/send?access_token=... to verify reachability
Try / catch
try { writer.write(row); } catch (DingTalkConnectorException e) { if ("SEND_RESPONSE_FAILED".equals(e.getErrorCode())) { /* backoff/retry or alert on network egress */ } else { throw e; } } Prevention
- Whitelist oapi.dingtalk.com in firewalls/proxies on all worker nodes
- Validate robot access_token/webhook before submitting jobs
- Add retry with backoff for transient network errors
When it happens
Trigger: client.execute(request) throwing ApiException — network outage, DNS failure, proxy blocking oapi.dingtalk.com, TLS issues, or SDK misconfiguration (invalid endpoint) during message send.
Common situations: Corporate firewalls/proxies blocking DingTalk API domains; wrong robot webhook/access_token config; DingTalk API outages or throttling; containers without outbound internet.
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
- Failed to fetch metadata from Gravitino for metadata: %s
- fail get tableSchema:
- REST_SERVICE_FAILED
- Failed to get response from Doris
- SCHEMA_CHANGE_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/0267a4e9a1140807.
Report an issue: GitHub.