apache/hadoop · error · IllegalArgumentException

Received corrupt response

Error message

Received corrupt response

What it means

Error "Received corrupt response" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java:88

  @Override
  public String getMechanismName() {
    return "PLAIN";
  }
  
  @Override
  public byte[] evaluateResponse(byte[] response) throws SaslException {
    if (completed) {
      throw new IllegalStateException("PLAIN authentication has completed");
    }
    if (response == null) {
      throw new IllegalArgumentException("Received null response");
    }
    try {
      String payload;
      try {
        payload = new String(response, StandardCharsets.UTF_8);
      } catch (Exception e) {
        throw new IllegalArgumentException("Received corrupt response", e);
      }
      // [ authz, authn, password ]
      String[] parts = payload.split("\u0000", 3);
      if (parts.length != 3) {
        throw new IllegalArgumentException("Received corrupt response");
      }
      if (parts[0].isEmpty()) { // authz = authn
        parts[0] = parts[1];
      }
      
      NameCallback nc = new NameCallback("SASL PLAIN");
      nc.setName(parts[1]);
      PasswordCallback pc = new PasswordCallback("SASL PLAIN", false);
      pc.setPassword(parts[2].toCharArray());
      AuthorizeCallback ac = new AuthorizeCallback(parts[1], parts[0]);
      cbh.handle(new Callback[]{nc, pc, ac});      
      if (ac.isAuthorized()) {
        authz = ac.getAuthorizedID();

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the SASL PLAIN exchange for truncation or encoding errors; the client response could not be parsed.
  2. Verify client and server use compatible Hadoop versions and the same SASL mechanism.
  3. Inspect the network path (proxies, load balancers) that might alter RPC payloads.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java:88 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/727013be45b70048. Report an issue: GitHub.