apache/hadoop · error · AbfsDriverException
Parsing of XML List Response Failed in BlobClient.
Error message
Parsing of XML List Response Failed in BlobClient.
What it means
While deserializing a ListBlobs XML response on a non-HNS account, a SAXException or IOException from the parser (BlobListXmlParser over a per-thread SAXParser) is wrapped in AbfsDriverException('Parsing of XML List Response Failed in BlobClient.'), itself an AbfsRestOperationException. The original parse failure is chained, and the URI is logged — the XML returned by the service (or mangled in transit) could not be parsed.
Source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:1690
*/
@Override
public ListResponseData parseListPathResults(AbfsHttpOperation result, URI uri)
throws AzureBlobFileSystemException {
try (InputStream stream = result.getListResultStream()) {
try {
BlobListResultSchema listResultSchema;
final SAXParser saxParser = saxParserThreadLocal.get();
saxParser.reset();
listResultSchema = new BlobListResultSchema();
saxParser.parse(stream,
new BlobListXmlParser(listResultSchema, getBaseUrl().toString()));
result.setListResultSchema(listResultSchema);
LOG.debug("ListBlobs listed {} blobs with {} as continuation token",
listResultSchema.paths().size(),
listResultSchema.getNextMarker());
return filterRenamePendingFiles(listResultSchema, uri);
} catch (SAXException | IOException ex) {
throw new AbfsDriverException(ERR_BLOB_LIST_PARSING, ex);
}
} catch (AbfsDriverException ex) {
// Throw as it is to avoid multiple wrapping.
LOG.error("Unable to deserialize list results for Uri {}", uri != null ? uri.toString(): "NULL", ex);
throw ex;
} catch (Exception ex) {
LOG.error("Unable to get stream for list results for uri {}", uri != null ? uri.toString(): "NULL", ex);
throw new AbfsDriverException(ERR_BLOB_LIST_PARSING, ex);
}
}
/**
* Parse the XML response body returned by GetBlockList API on Blob Endpoint.
* @param stream InputStream contains the response from server.
* @return List of blockIds.
* @throws IOException if parsing fails.
*/
@OverrideView on GitHub (pinned to 2add963021)
Solutions
- Retry the listing — truncated/transient parse failures usually succeed on a fresh request
- If reproducible on one path, list that path directly and inspect the raw response (wire log) for truncation or rewriting
- Bypass or correctly configure HTTP proxies/SSL inspection for *.blob.core.windows.net traffic
- Reduce listing page pressure (larger maxEntriesInListing) if truncation correlates with page size
Defensive patterns
Strategy: retry
Try / catch
try {
return fs.listStatus(path);
} catch (AbfsDriverException e) {
// XML from ListBlobs failed to parse (cause is SAXException/IOException);
// truncated/transient responses usually parse on retry
return retryWithBackoff(() -> fs.listStatus(path), 3);
} Prevention
- Exclude Azure Storage endpoints from SSL-inspecting proxies
- Retry listings once or twice before escalating parse failures
- Capture wire logs when a specific path reproducibly fails to parse
When it happens
Trigger: fs.listStatus()/listFiles on a blob endpoint where the XML body is malformed or truncated: proxy/interceptor rewriting the response, connection drops mid-body producing IOException from the stream, or response-size limits truncating large listings.
Common situations: Corporate proxies or inspection appliances altering Azure responses; flaky links truncating long list responses; extremely large directories exceeding buffer settings; transient service-side serialization glitches.
Related errors
- %s is invalid.
- Cannot create file {} because parent folder does not exist.
- PathConflict
- Parallel access to the create path detected. Failing request
- Parallel access to the create path detected. Failing request
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/889508fd4544ac3f.
Report an issue: GitHub.