<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Kafka ConsumerGroupCommand Error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190398#M152487</link>
    <description>&lt;P&gt;Hi Jasper,&lt;/P&gt;&lt;P&gt;I don't think you have a problem while logging in. &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/streamsets/datacollector/blob/master/apache-kafka_0_9-lib/src/main/java/org/apache/kafka/common/security/kerberos/Login.java" target="_blank"&gt;https://github.com/streamsets/datacollector/blob/master/apache-kafka_0_9-lib/src/main/java/org/apache/kafka/common/security/kerberos/Login.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After skimming through the above link, I guess if there was any error w.r.t. having a valid ticket, you would've got a log in KerberosLogin itself. &lt;/P&gt;&lt;P&gt;What principal are you using? &lt;/P&gt;&lt;P&gt;Can you check contents of kafka_client_jaas.conf. Is it of the form below:&lt;/P&gt;&lt;P&gt;KafkaClient&lt;/P&gt;&lt;P&gt;{
com.sun.security.auth.module.Krb5LoginModule required &lt;/P&gt;&lt;P&gt;useTicketCache=true;
};&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Or you have keytab configuration?&lt;/P&gt;&lt;P&gt;If former, please see kafka_jaas.conf for Client section and &lt;STRONG&gt;kinit with user/keytab mentioned there&lt;/STRONG&gt;. Try running the command again as:&lt;/P&gt;&lt;P&gt;/usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-groups.sh --bootstrap-server $BROKER_LIST --security-protocol PLAINTEXTSASL --new-consumer --describe --group spoutconsumer &lt;CODE&gt;-Djava.security.auth.login.config=&lt;/CODE&gt;&lt;CODE&gt;/etc/kafka/kafka_jaas.conf&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;If above command does not work, try exporting that variable.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 14:28:37 GMT</pubDate>
    <dc:creator>tsharma</dc:creator>
    <dc:date>2017-09-19T14:28:37Z</dc:date>
    <item>
      <title>Kafka ConsumerGroupCommand Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190397#M152486</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am on HDP-2.5.5 and Kafka 0.10.0. Cluster is Kerberised. When I run the new ConsumerGroupCommand I get the error below:&lt;/P&gt;&lt;PRE&gt;ubuntu@hds-01:~$ /usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-groups.sh --bootstrap-server $BROKER_LIST --security-protocol PLAINTEXTSASL --new-consumer --describe --group spoutconsumer

[2017-09-17 19:43:54,039] WARN TGT refresh thread time adjusted from Sun Sep 17 12:49:30 UTC 2017 to Sun Sep 17 19:44:54 UTC 2017 since the former is sooner than the minimum refresh interval (60 seconds) from now. (org.apache.kafka.common.security.kerberos.KerberosLogin)
[2017-09-17 19:43:54,526] WARN Bootstrap broker hds-02.field.hortonworks.com:6667 disconnected (org.apache.kafka.clients.NetworkClient)
[2017-09-17 19:43:54,533] WARN Bootstrap broker hds-04.field.hortonworks.com:6667 disconnected (org.apache.kafka.clients.NetworkClient)
[2017-09-17 19:43:54,535] WARN Bootstrap broker hds-01.field.hortonworks.com:6667 disconnected (org.apache.kafka.clients.NetworkClient)
[2017-09-17 19:43:54,638] WARN Bootstrap broker hds-03.field.hortonworks.com:6667 disconnected (org.apache.kafka.clients.NetworkClient)
Error while executing consumer group command Request GROUP_COORDINATOR failed on brokers List(hds-02.field.hortonworks.com:6667 (id: -2 rack: null), hds-04.field.hortonworks.com:6667 (id: -4 rack: null), hds-01.field.hortonworks.com:6667 (id: -1 rack: null), hds-03.field.hortonworks.com:6667 (id: -3 rack: null))
java.lang.RuntimeException: Request GROUP_COORDINATOR failed on brokers List(hds-02.field.hortonworks.com:6667 (id: -2 rack: null), hds-04.field.hortonworks.com:6667 (id: -4 rack: null), hds-01.field.hortonworks.com:6667 (id: -1 rack: null), hds-03.field.hortonworks.com:6667 (id: -3 rack: null))
	at kafka.admin.AdminClient.sendAnyNode(AdminClient.scala:67)
	at kafka.admin.AdminClient.findCoordinator(AdminClient.scala:72)
	at kafka.admin.AdminClient.describeGroup(AdminClient.scala:125)
	at kafka.admin.AdminClient.describeConsumerGroup(AdminClient.scala:147)
	at kafka.admin.ConsumerGroupCommand$KafkaConsumerGroupService.describeGroup(ConsumerGroupCommand.scala:320)
	at kafka.admin.ConsumerGroupCommand$ConsumerGroupService$class.describe(ConsumerGroupCommand.scala:97)
	at kafka.admin.ConsumerGroupCommand$KafkaConsumerGroupService.describe(ConsumerGroupCommand.scala:308)
	at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:76)
	at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;What is wrong here? The user has valid ticket. &lt;/P&gt;&lt;P&gt;I am quite sure the --security-protocol PLAINTEXTSASL  should be OK, cause it works on both a console consumer and a producer.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 02:35:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190397#M152486</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-09-19T02:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka ConsumerGroupCommand Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190398#M152487</link>
      <description>&lt;P&gt;Hi Jasper,&lt;/P&gt;&lt;P&gt;I don't think you have a problem while logging in. &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/streamsets/datacollector/blob/master/apache-kafka_0_9-lib/src/main/java/org/apache/kafka/common/security/kerberos/Login.java" target="_blank"&gt;https://github.com/streamsets/datacollector/blob/master/apache-kafka_0_9-lib/src/main/java/org/apache/kafka/common/security/kerberos/Login.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After skimming through the above link, I guess if there was any error w.r.t. having a valid ticket, you would've got a log in KerberosLogin itself. &lt;/P&gt;&lt;P&gt;What principal are you using? &lt;/P&gt;&lt;P&gt;Can you check contents of kafka_client_jaas.conf. Is it of the form below:&lt;/P&gt;&lt;P&gt;KafkaClient&lt;/P&gt;&lt;P&gt;{
com.sun.security.auth.module.Krb5LoginModule required &lt;/P&gt;&lt;P&gt;useTicketCache=true;
};&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Or you have keytab configuration?&lt;/P&gt;&lt;P&gt;If former, please see kafka_jaas.conf for Client section and &lt;STRONG&gt;kinit with user/keytab mentioned there&lt;/STRONG&gt;. Try running the command again as:&lt;/P&gt;&lt;P&gt;/usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-groups.sh --bootstrap-server $BROKER_LIST --security-protocol PLAINTEXTSASL --new-consumer --describe --group spoutconsumer &lt;CODE&gt;-Djava.security.auth.login.config=&lt;/CODE&gt;&lt;CODE&gt;/etc/kafka/kafka_jaas.conf&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;If above command does not work, try exporting that variable.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 14:28:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190398#M152487</guid>
      <dc:creator>tsharma</dc:creator>
      <dc:date>2017-09-19T14:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka ConsumerGroupCommand Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190399#M152488</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/21188/tsharma.html" nodeid="21188"&gt;@tsharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for your suggestion. It turns out the kafka-consumer-groups.sh eventually uses :&lt;/P&gt;&lt;PRE&gt;KAFKA_KERBEROS_PARAMS=-Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_jaas.conf&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;The contents of this file is:&lt;/P&gt;&lt;PRE&gt;KafkaServer {
   com.sun.security.auth.module.Krb5LoginModule required
   useKeyTab=true
   keyTab="/etc/security/keytabs/kafka.service.keytab"
   storeKey=true
   useTicketCache=false
   serviceName="kafka"
   principal="kafka/dem-mtrn-hds-01.field.hortonworks.com@FIELD.HORTONWORKS.COM";
};
KafkaClient {
   com.sun.security.auth.module.Krb5LoginModule required
   useTicketCache=true
   renewTicket=true
   serviceName="kafka";
};
Client {
   com.sun.security.auth.module.Krb5LoginModule required
   useKeyTab=true
   keyTab="/etc/security/keytabs/kafka.service.keytab"
   storeKey=true
   useTicketCache=false
   serviceName="zookeeper"
   principal="kafka/dem-mtrn-hds-01.field.hortonworks.com@FIELD.HORTONWORKS.COM";
};
&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;So it does not make a difference what principal is used to kinit. Even when I take the kafka/dem-mtrn-hds-01.field.hortonworks.com@FIELD.HORTONWORKS.COM principal I get the same result:&lt;/P&gt;&lt;PRE&gt;Error while executing consumer group command Request GROUP_COORDINATOR failed on brokers List(dem-mtrn-hds-01.field.hortonworks.com:6667 (id: -1 rack: null), dem-mtrn-hds-04.field.hortonworks.com:6667 (id: -4 rack: null), dem-mtrn-hds-02.field.hortonworks.com:6667 (id: -2 rack: null), dem-mtrn-hds-03.field.hortonworks.com:6667 (id: -3 rack: null))
java.lang.RuntimeException: Request GROUP_COORDINATOR failed on brokers List(dem-mtrn-hds-01.field.hortonworks.com:6667 (id: -1 rack: null), dem-mtrn-hds-04.field.hortonworks.com:6667 (id: -4 rack: null), dem-mtrn-hds-02.field.hortonworks.com:6667 (id: -2 rack: null), dem-mtrn-hds-03.field.hortonworks.com:6667 (id: -3 rack: null))
	at kafka.admin.AdminClient.sendAnyNode(AdminClient.scala:67)
	at kafka.admin.AdminClient.findCoordinator(AdminClient.scala:72)
	at kafka.admin.AdminClient.describeGroup(AdminClient.scala:125)
	at kafka.admin.AdminClient.describeConsumerGroup(AdminClient.scala:147)
	at kafka.admin.ConsumerGroupCommand$KafkaConsumerGroupService.describeGroup(ConsumerGroupCommand.scala:320)
	at kafka.admin.ConsumerGroupCommand$ConsumerGroupService$class.describe(ConsumerGroupCommand.scala:97)
	at kafka.admin.ConsumerGroupCommand$KafkaConsumerGroupService.describe(ConsumerGroupCommand.scala:308)
	at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:76)
	at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)
&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Sep 2017 03:44:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190399#M152488</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-09-21T03:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka ConsumerGroupCommand Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190400#M152489</link>
      <description>&lt;P&gt;It is solved now. Turns out that the ' --security-protocol PLAINTEXTSASL ' is not honored by the kafka-consumer-groups.sh tool.&lt;/P&gt;&lt;P&gt;But it does work if you provide the same through the --command-config flag like:&lt;/P&gt;&lt;PRE&gt;echo "security.protocol=PLAINTEXTSASL" &amp;gt; /tmp/consgroupcmd.prop
/usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-groups.sh --bootstrap-server $BROKER_LIST --new-consumer --describe --group console-consumer-spout1 --command-config /tmp/consgroupcmd.prop
&lt;/PRE&gt;&lt;P&gt;But now, to my suprise it turns out that the kafka-consumer-groups.sh / kafka.admin.ConsumerGroupCommand tool does NOT recognize any consumer group of the --new-consumer type for which offsets are stored on Kafka.&lt;/P&gt;&lt;P&gt;Good old kafka-consumer-offset-checker.sh is still the go-to tool for this (works both on zookeeper and Kafka kept offsets):&lt;/P&gt;&lt;PRE&gt;/usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-offset-checker.sh --zookeeper $ZOOKEEPER_HOSTS --security-protocol PLAINTEXTSASL --topic spout_test --group console-consumer-spout1
KAFKA_KERBEROS_PARAMS=-Djava.security.auth.login.config=/usr/hdp/2.5.5.0-157/kafka/config/kafka_client_jaas.conf
[2017-09-20 21:13:30,168] WARN WARNING: ConsumerOffsetChecker is deprecated and will be dropped in releases following 0.9.0. Use ConsumerGroupCommand instead. (kafka.tools.ConsumerOffsetChecker$)
Group           Topic                          Pid Offset          logSize         Lag             Owner
console-consumer-spout1 spout_test                     0   36156           68201           32045           none
console-consumer-spout1 spout_test                     1   0               68198           68198           none
console-consumer-spout1 spout_test                     2   12053           68198           56145           none
console-consumer-spout1 spout_test                     3   0               68200           68200           none
&lt;/PRE&gt;&lt;P&gt;It is weird that the deprecation warning recommends to use ConsumerGroupCommand while this does not even work on the new-consumer Kafka offsets:&lt;/P&gt;&lt;PRE&gt;/usr/hdp/2.5.5.0-157/kafka/bin/kafka-consumer-groups.sh --bootstrap-server $BROKER_LIST --new-consumer --describe --group console-consumer-spout1 --command-config /tmp/consgroupcmd.prop
KAFKA_KERBEROS_PARAMS=-Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_jaas.conf
Consumer group `console-consumer-spout1` does not exist or is rebalancing.
[2017-09-20 21:11:04,189] WARN TGT renewal thread has been interrupted and will exit. (org.apache.kafka.common.security.kerberos.KerberosLogin)
&lt;/PRE&gt;&lt;P&gt;The group 'console-consumer-spout1' does exist as can be seen in the output of the previous command...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 04:35:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190400#M152489</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-09-21T04:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka ConsumerGroupCommand Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190401#M152490</link>
      <description>&lt;P&gt;Reason kafka-consumer-groups.sh returned "Consumergroup`console-consumer-spout1` does not exist or is rebalancing." was that the consumergroup was not active at that moment. If it is not consuming, it is not shown with this command.&lt;/P&gt;&lt;P&gt;In that respect kafka-consumer-offset-checker.sh does a better job as it always returns the offsets, consumer active or not&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 20:58:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-ConsumerGroupCommand-Error/m-p/190401#M152490</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-09-29T20:58:22Z</dc:date>
    </item>
  </channel>
</rss>

