apache/hadoop · error · KeyProviderException

Failure to initialize configuration for {accountName}. Inval

Error message

Failure to initialize configuration for {accountName}. Invalid base64 value in fs.azure.account.key

What it means

Error "Failure to initialize configuration for {accountName}. Invalid base64 value in fs.azure.account.key" thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/SimpleKeyProvider.java:52

 * configuration as plaintext.
 */
public class SimpleKeyProvider implements KeyProvider {
  private static final Logger LOG = LoggerFactory.getLogger(SimpleKeyProvider.class);

  @Override
  public String getStorageAccountKey(String accountName, Configuration rawConfig)
      throws KeyProviderException {
    String key = null;

    try {
      AbfsConfiguration abfsConfig = new AbfsConfiguration(rawConfig, accountName);
      key = abfsConfig.getPasswordString(ConfigurationKeys.FS_AZURE_ACCOUNT_KEY_PROPERTY_NAME);

      // Validating the key.
      validateStorageAccountKey(key);
    } catch (IllegalAccessException | InvalidConfigurationValueException e) {
      LOG.debug("Failure to retrieve storage account key for {}", accountName, e);
      throw new KeyProviderException("Failure to initialize configuration for "
          + accountName
          + ". Invalid base64 value in " + ConfigurationKeys.FS_AZURE_ACCOUNT_KEY_PROPERTY_NAME, e);
    } catch(IOException ioe) {
      LOG.warn("Unable to get key for {} from credential providers. {}",
          accountName, ioe, ioe);
    }

    return key;
  }

  /**
   * A method to validate the storage key.
   *
   * @param key the key to be validated.
   * @throws InvalidConfigurationValueException
   */
  private void validateStorageAccountKey(String key)
      throws InvalidConfigurationValueException {

View on GitHub (pinned to 2add963021)

Solutions

  1. Set fs.azure.account.key.<account> to a valid base64-encoded storage account key.
  2. Re-copy the key from the Azure portal to avoid corruption.

When it happens

Trigger: The simple key provider finds a non-base64 value in the account key configuration.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/a982e8cf361455a0. Report an issue: GitHub.