apache/iceberg · warning · UncheckedIOException
Failed to close the VendedAdlsCredentialProvider
Error message
Failed to close the VendedAdlsCredentialProvider
What it means
VendedAdlsCredentialProvider.close() closes its CloseableGroup (auth manager and client); if closing throws an IOException it is rethrown as this UncheckedIOException. Failures are suppressed per-sub-closeable where possible (setSuppressCloseFailure(true)), so this usually means multiple or unrecoverable close failures.
Source
Thrown at azure/src/main/java/org/apache/iceberg/azure/adlsv2/VendedAdlsCredentialProvider.java:199
private void checkCredential(Credential credential, String property) {
Preconditions.checkState(
credential.config().containsKey(property),
"Invalid ADLS Credentials: %s not set",
property);
}
@Override
public void close() {
CloseableGroup closeableGroup = new CloseableGroup();
closeableGroup.addCloseable(authSession);
closeableGroup.addCloseable(authManager);
closeableGroup.addCloseable(client);
closeableGroup.setSuppressCloseFailure(true);
try {
closeableGroup.close();
} catch (IOException e) {
throw new UncheckedIOException("Failed to close the VendedAdlsCredentialProvider", e);
}
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Inspect the wrapped IOException cause to identify which component failed to close.
- Ensure token refresh threads are stopped before closing the provider.
- If thrown during application shutdown, log and continue; it is rarely recoverable, but check for leaked connections/threads in subsequent runs.
Defensive patterns
Strategy: try-catch
Try / catch
try { provider.close(); } catch (UncheckedIOException e) { log.warn("VendedAdlsCredentialProvider close failed: {}", e.getCause().toString()); } Prevention
- Close the provider during orderly application shutdown only.
- Stop background token refresh activity before closing.
- Treat close failures as warnings; investigate cause but do not block shutdown.
When it happens
Trigger: Calling close() on the VendedAdlsCredentialProvider when the underlying OAuth token fetcher/auth manager or Azure client fails to shut down cleanly.
Common situations: Shutdown during active token refresh; I/O errors during client teardown; resource cleanup in error paths after initialization partially failed.
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
- Location does not exist: %s
- Location already exists: %s
- Failed to create output stream for location:
- Failed to delete path: {}
- Unable to load metrics class: '{}', falling back to null met
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cee6f95011c783e6.
Report an issue: GitHub.