pentaho/pentaho-kettle · error · KettleStepException
Unable to read web service response data from input stream
Error message
Unable to read web service response data from input stream
What it means
KettleStepException thrown by WebService.readStringFromInputStream when reading the SOAP response body from the HTTP input stream fails. The method slurps the response into a string; any IOException or stream error during that read is wrapped with this message.
Solutions
- Retry the transformation; transient connection drops are the most common cause.
- Check server/proxy logs around the failure time for aborted responses or timeouts.
- Increase HTTP client socket/connect timeouts used by getHttpClient().
- Verify the endpoint URL and TLS config; a server that resets connections (e.g. wrong scheme) can abort the stream.
Defensive patterns
Strategy: retry
Validate before calling
// Probe connectivity before the run:
HttpURLConnection c = (HttpURLConnection) new java.net.URL(endpoint).openConnection();
c.setConnectTimeout(5000); c.setReadTimeout(30000);
if (c.getResponseCode() >= 400) throw new IllegalStateException("Endpoint unhealthy: " + c.getResponseCode()); Try / catch
try {
// run transformation
} catch (KettleStepException e) {
if (e.getMessage() != null && e.getMessage().contains("read web service response")) {
// retry with backoff; transient connection drops are typical
}
} Prevention
- Set generous socket/connect timeouts on the step's HTTP client.
- Monitor network stability between the Pentaho host and the SOAP endpoint.
- Check proxy configurations that may terminate long-lived responses.
When it happens
Trigger: response() -> readStringFromInputStream: connection dropped mid-response, server closes stream prematurely, gzip/compressed content the reader cannot handle, or an encoding/IO error while consuming is.
Common situations: Slow or unstable network to the SOAP endpoint; server-side timeout killing the connection mid-body; proxy terminating the connection; very large responses hitting socket timeouts.
Related errors
- Cannot load WSDL file: + _wsdlName
- WebServices.ERROR0013.ExceptionLoadingWSDL
- Cannot open control file
- Cannot open data file
- ChangeFileEncoding.Error.CreatingFile
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/14f11d19bbb2ceb1.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java:528
private String readStringFromInputStream( InputStream is, String encoding ) throws KettleStepException {
try {
StringBuilder sb = new StringBuilder( Math.max( 16, is.available() ) );
char[] tmp = new char[ 4096 ];
try {
InputStreamReader reader = new InputStreamReader( is, encoding != null ? encoding : "UTF-8" );
for ( int cnt; ( cnt = reader.read( tmp ) ) > 0; ) {
sb.append( tmp, 0, cnt );
}
} finally {
is.close();
}
return sb.toString();
} catch ( Exception e ) {
throw new KettleStepException( "Unable to read web service response data from input stream", e );
}
}
private void processRows( InputStream anXml, Object[] rowData, RowMetaInterface rowMeta,
boolean ignoreNamespacePrefix, String encoding ) throws KettleException {
// Just to make sure the old transformations keep working...
//
if ( meta.isCompatible() ) {
compatibleProcessRows( anXml, rowData, rowMeta, ignoreNamespacePrefix, encoding );
return;
}
// First we should get the complete string
// The problem is that the string can contain XML or any other format such as HTML saying the service is no longer
// available.
// We're talking about a WEB service here.
// As such, to keep the original parsing scheme, we first read the content.View on GitHub (pinned to f3058517a1)