Support Questions
Find answers, ask questions, and share your expertise

Failed to construct kafka consumer. java.lang.IllegalArgumentException: No serviceName defined in either JAAS or Kafka config. No serviceName defined in either JAAS or Kafka config

Highlighted

Failed to construct kafka consumer. java.lang.IllegalArgumentException: No serviceName defined in either JAAS or Kafka config. No serviceName defined in either JAAS or Kafka config

New Contributor

I have a Kafka consumer web application hosted on IBM Websphere. In order to establish the connection, I have added the following into jass.conf.

KafkaClient {

com.ibm.security.auth.module.Krb5LoginModule required useKeytab="/usr/local/WebSphere/AppServer/profiles/node/properties/XXX.keytab"

principal="XXX@HPC.XXX.COM"

credsType=both;

};

when I tried to test the connectivity, I am getting the following error:

Error connecting to Kafka. Failed to construct kafka consumer. java.lang.IllegalArgumentException: No serviceName defined in either JAAS or Kafka config. No serviceName defined in either JAAS or Kafka config

Unfortunately the com.ibm.security.auth.module.Krb5LoginModule class only accepts these options. How do I need to specify serviceName as 'kafka' with IBM JDK?

 Kerberos options
       principal=principalName
       credsType=initiator|acceptor|both (default=initiator)
       forwardable=true|false (default=false)
       proxiable=true|false (default=false)
       renewable=true|false (default=false)
       useCcache=URL
       useKeytab=URL
       useDefaultCcache=true|false (default=false)
       useDefaultKeytab=true|false (default=false)
 JAAS-suggested options:
       debug=true|false (default=unset, JGSS debug options used)
       tryFirstPass=true|false (default=false)
       useFirstPass=true|false (default=false)
       moduleBanner=true|false (default=false)