apache/hadoop · error · IOException

Unknown status: ${status}, message: ${message}

Error message

Unknown status: ${status}, message: ${message}

What it means

While reading a DataTransferEncryptorMessageProto (the SASL/encryption negotiation message on a data connection), the response's status enum hits the default branch of the switch - a value outside SUCCESS, ERROR, ERROR_UNKNOWN_KEY. Either the peer runs a different Hadoop version whose proto schema has additional enum values, or the byte stream is corrupted and parsed into a bogus enum number.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java:229

    return resolver;
  }

  private static <T> T readSaslMessage(InputStream in,
      Function<DataTransferEncryptorMessageProto, ? extends T> handler) throws IOException {
    DataTransferEncryptorMessageProto proto =
        DataTransferEncryptorMessageProto.parseFrom(vintPrefixed(in));
    switch (proto.getStatus()) {
    case ERROR_UNKNOWN_KEY:
      throw new InvalidEncryptionKeyException(proto.getMessage());
    case ERROR:
      if (proto.hasAccessTokenError() && proto.getAccessTokenError()) {
        throw new InvalidBlockTokenException(proto.getMessage());
      }
      throw new IOException(proto.getMessage());
    case SUCCESS:
      return handler.apply(proto);
    default:
      throw new IOException(
          "Unknown status: " + proto.getStatus() + ", message: " + proto.getMessage());
    }
  }

  /**
   * Reads a SASL negotiation message.
   *
   * @param in stream to read
   * @return bytes of SASL negotiation messsage
   * @throws IOException for any error
   */
  public static byte[] readSaslMessage(InputStream in) throws IOException {
    return readSaslMessage(in, proto -> proto.getPayload().toByteArray());
  }

  /**
   * Reads a SASL negotiation message and negotiation cipher options.
   *

View on GitHub (pinned to 2add963021)

Solutions

  1. Align Hadoop versions between client and DataNodes (upgrade the older side) so both share the same proto schema
  2. Inspect the exception's 'message' field and DataNode logs for the server-side context
  3. Rule out middleboxes/NAT rewriting or terminating the data connection
Defensive patterns

Strategy: retry

Try / catch

catch (IOException e) {
  if (e.getMessage() != null && e.getMessage().startsWith("Unknown status:")) {
    // proto schema skew or corrupted stream: reconnect with a client matching the server version
    recreateConnectionWithMatchingClient();
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: DataTransferEncryptor/SaslDataTransferClient reads a vint-prefixed response proto over the data socket and proto.getStatus() is not one of the three statuses known to this client.

Common situations: Rolling upgrades with mixed client/server versions; a proxy, LB or middlebox mangling the data stream; truncated or garbage bytes on the connection.

Related errors


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