apache/hadoop · error · IllegalArgumentException

Can't find {selectedAlgorithm}

Error message

Can't find {selectedAlgorithm}

What it means

Error "Can't find {selectedAlgorithm}" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java:242

  }

  /**
   * Creates a new {@link KeyGenerator} instance configured with the currently selected
   * algorithm and key length.
   *
   * @return a new {@code KeyGenerator} instance
   * @throws IllegalArgumentException if the specified algorithm is not available
   */
  private static synchronized KeyGenerator createKeyGenerator() {
    LOG.debug("Creating key generator instance {} - {} bit with thread {}",
        selectedAlgorithm, selectedLength, Thread.currentThread());
    try {
      KeyGenerator keyGen = KeyGenerator.getInstance(selectedAlgorithm);
      keyGen.init(selectedLength);
      keygenInitialized = true;
      return keyGen;
    } catch (NoSuchAlgorithmException nsa) {
      throw new IllegalArgumentException("Can't find " + selectedAlgorithm, nsa);
    }
  }

  /**
   * Creates a new {@link Mac} instance using the currently selected algorithm.
   *
   * @return a new {@code Mac} instance
   * @throws IllegalArgumentException if the specified algorithm is not available
   */
  private static synchronized Mac createMac() {
    LOG.debug("Creating mac instance {} with thread {}", selectedAlgorithm, Thread.currentThread());
    try {
      Mac mac = Mac.getInstance(selectedAlgorithm);
      macInitialized = true;
      return mac;
    } catch (NoSuchAlgorithmException nsa) {
      throw new IllegalArgumentException("Can't find " + selectedAlgorithm, nsa);
    }

View on GitHub (pinned to 2add963021)

Solutions

  1. Set a valid HMAC algorithm: the configured algorithm '{selectedAlgorithm}' is not available in this JVM. Use a supported name such as 'HmacSHA1' and check the provider/security configuration.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java:242 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/c4c66242d367bb98. Report an issue: GitHub.