apache/hadoop · error · IllegalArgumentException

Received null response

Error message

Received null response

What it means

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

Source

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

  private boolean completed;
  private String authz;
  
  SaslPlainServer(CallbackHandler callback) {
    this.cbh = callback;
  }

  @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");

View on GitHub (pinned to 2add963021)

Solutions

  1. Ensure the SASL client sends an initial PLAIN response; a null response indicates a client-side or serialization bug.
  2. Check client and server Hadoop versions for compatibility of the PLAIN SASL mechanism.
  3. Capture the SASL exchange to verify the client actually transmitted the response bytes.

When it happens

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