apache/pulsar · error · SaslException

error on GSSAPI boot

Error message

error on GSSAPI boot

What it means

PulsarSaslServer.createSaslServer failed while creating the GSSAPI SaslServer under the JAAS subject (Kerberos setup problem — missing keytab, principal, or JDK configuration), so the SASL handshake cannot start.

Source

Thrown at pulsar-broker-auth-sasl/src/main/java/org/apache/pulsar/broker/authentication/PulsarSaslServer.java:111

                    .log("SASL configuration");

                try {
                    return Subject.doAs(subject, new PrivilegedExceptionAction<SaslServer>() {
                            @Override
                            public SaslServer run() {
                                try {
                                    SaslServer saslServer;
                                    saslServer = Sasl.createSaslServer(GSSAPI, servicePrincipalName, serviceHostname,
                                        null, callbackHandler);
                                    return saslServer;
                                } catch (SaslException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
                    );
                } catch (PrivilegedActionException e) {
                    throw new SaslException("error on GSSAPI boot", e.getCause());
                }
            } catch (IndexOutOfBoundsException e) {
                throw new SaslException("error on GSSAPI boot", e);
            }
        } else {
            String errorMessage = "Authentication use SASL/JAAS/GSSAPI but server not have Principals";
            log.error(errorMessage);
            throw new SaslException(errorMessage);
        }
    }

    public boolean isComplete() {
        return saslServer.isComplete();
    }

    /**
     * Reports the authorization ID in effect for the client of this
     * session.

View on GitHub (pinned to 820761864e)

Solutions

  1. Verify the broker's Kerberos keytab/principal and JAAS configuration
  2. Check krb5.conf and that the service principal is resolvable via DNS
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pulsar-broker-auth-sasl/src/main/java/org/apache/pulsar/broker/authentication/PulsarSaslServer.java:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/62b0a5e05b4f1e1c. Report an issue: GitHub.