apache/hadoop · error · NoAuthWithAWSException
{name}Credentials requested after provider list was closed
Error message
{name}Credentials requested after provider list was closed What it means
Error "{name}Credentials requested after provider list was closed" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/AWSCredentialProviderList.java:164
/**
* Was an implementation of the v1 refresh; now just
* a no-op.
*/
@Deprecated
public void refresh() {
}
/**
* Iterate through the list of providers, to find one with credentials.
* If {@link #reuseLastProvider} is true, then it is re-used.
* @return a set of credentials (possibly anonymous), for authenticating.
*/
@Override
public AwsCredentials resolveCredentials() {
if (isClosed()) {
LOG.warn(CREDENTIALS_REQUESTED_WHEN_CLOSED);
throw new NoAuthWithAWSException(name +
CREDENTIALS_REQUESTED_WHEN_CLOSED);
}
checkNotEmpty();
if (reuseLastProvider && lastProvider != null) {
return lastProvider.resolveCredentials();
}
SdkException lastException = null;
for (AwsCredentialsProvider provider : providers) {
try {
AwsCredentials credentials = provider.resolveCredentials();
Preconditions.checkNotNull(credentials,
"Null credentials returned by %s", provider);
if ((credentials.accessKeyId() != null && credentials.secretAccessKey() != null) || (
provider instanceof AnonymousCredentialsProvider
|| provider instanceof AnonymousAWSCredentialsProvider)) {
lastProvider = provider;
LOG.debug("Using credentials from {}", provider);View on GitHub (pinned to 2add963021)
Solutions
- Request credentials before closing the provider list; check lifecycle ordering in the calling code.
When it happens
Trigger: Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/AWSCredentialProviderList.java:164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/f59eaaa33fe968f8.
Report an issue: GitHub.