SourceLabOrg / kafka-webview

Full-featured web-based Apache Kafka consumer UI
MIT License
395 stars 83 forks source link

Failing to connect to GSSAPI/SSL cluster #191

Open sappo opened 5 years ago

sappo commented 5 years ago

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]";
};
rohitrajeshsharma commented 3 years ago

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.

Crim commented 3 years ago

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.