kafka-webview icon indicating copy to clipboard operation
kafka-webview copied to clipboard

Failing to connect to GSSAPI/SSL cluster

Open sappo opened this issue 6 years ago • 2 comments

Hi, I'm trying to connect to a GSSAPI cluster with SSL. Doing so results in the following error:

 Error Failed create new KafkaAdminClient (show more)

    org.apache.kafka.common.KafkaException thrown at org.apache.kafka.clients.admin.KafkaAdminClient::createInternal -> Failed create new KafkaAdminClient
    java.lang.IllegalArgumentException thrown at org.apache.kafka.common.security.JaasConfig::loginModuleControlFlag -> Login module control flag is not available in the JAAS config

I use the following jaas configuration:

KafkaClient {
  com.sun.security.auth.module.Krb5LoginModule required
  serviceName=kafka
  useKeyTab=true
  storeKey=true
  useTicketCache=false
  doNotPrompt=true
  client=true
  keyTab="[hidden]"
  principal="[hidden]";
};
Client {
  com.sun.security.auth.module.Krb5LoginModule required
  useKeyTab=true
  storeKey=true
  useTicketCache=false
  doNotPrompt=true
  client=true
  keyTab="[hidden]"
  principal="[hidden]";
};

sappo avatar Oct 24 '19 07:10 sappo

same issue, @Crim any update?

Error connecting to cluster: Failed to create new KafkaAdminClient (show more) java.lang.IllegalArgumentException thrown at org.apache.kafka.common.security.JaasConfig::loginModuleControlFlag -> Login module control flag is not available in the JAAS config

It should pick the Login module passed in jass conf.

rohitrajeshsharma avatar Aug 12 '21 06:08 rohitrajeshsharma

I believe this error occurs when the Kafka library is unable to properly parse your JAAS configuration.

How confident are you that the value you provided is correctly formatted? If you're pretty sure its correct, it may be possible that the formatting is getting bungled somewhere between being provided to the webui and being passed to the underlying kafka library.

Crim avatar Aug 12 '21 07:08 Crim