{"record":{"id":"af26caf78c26381f","repo":"apache/hadoop","slug":"unknown-authentication-method","errorCode":null,"errorMessage":"Unknown authentication method ","messagePattern":"Unknown authentication method ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcClient.java","lineNumber":260,"sourceCode":"        try {\n          serverPrincipal = getServerPrincipal(authType);\n        } catch (IllegalArgumentException ex) {\n          // YARN-11210: getServerPrincipal can throw IllegalArgumentException if Kerberos\n          // configuration is bad, this is surfaced as a non-retryable SaslException\n          throw new SaslException(\"Bad Kerberos server principal configuration\", ex);\n        }\n        if (serverPrincipal == null) {\n          LOG.debug(\"protocol doesn't use kerberos\");\n          return null;\n        }\n        if (LOG.isDebugEnabled()) {\n          LOG.debug(\"RPC Server's Kerberos principal name for protocol=\"\n              + protocol.getCanonicalName() + \" is \" + serverPrincipal);\n        }\n        break;\n      }\n      default:\n        throw new IOException(\"Unknown authentication method \" + method);\n    }\n\n    String mechanism = method.getMechanismName();\n    if (LOG.isDebugEnabled()) {\n      LOG.debug(\"Creating SASL \" + mechanism + \"(\" + method + \") \"\n          + \" client to authenticate to service at \" + saslServerName);\n    }\n    return saslFactory.createSaslClient(\n        new String[] {mechanism}, saslUser, saslProtocol, saslServerName,\n        saslProperties, saslCallback);\n  }\n\n  /**\n   * Try to locate the required token for the server.\n   * \n   * @param authType of the SASL client\n   * @return Token for server, or null if no token available\n   * @throws IOException - token selector cannot be instantiated","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcClient.java#L242-L278","documentation":"Error \"Unknown authentication method \" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcClient.java:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported authentication method (KERBEROS, SIMPLE, TOKEN/DIGEST) as configured on the server.","Fix typos in the authentication method name in client configuration.","Align client and server Hadoop versions so both recognize the same auth methods."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}