Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # dev - [jira] [Updated] (KAFKA-697) ConsoleConsumer throws InvalidConfigException for "." in client id


Copy link to this message
-
[jira] [Updated] (KAFKA-697) ConsoleConsumer throws InvalidConfigException for "." in client id
"Jun Rao 2013-01-13, 21:52

     [ https://issues.apache.org/jira/browse/KAFKA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-697:
--------------------------

    Attachment: kafka-697.patch

In kafka-683 we changed client.id for a consumer to be config.clientId + "-" + consumerIdString + fetcherId + sourceBroker.id. ConsumerIdString has the format of consumerHostName + currentTimeMillis + randomUUID. The problem is that consumerHostName may have ".", which breaks the naming convention. However, such a client.id is too verbose.  For debugging, we need to know the client IP address. We can fix that for every type of request in a separate jira. With client IP address and correlation id, we should have enough information for debugging. So, for now, just attach a patch to revert client.id to just config.ClientId.
                
> ConsoleConsumer throws InvalidConfigException for "." in client id
> ------------------------------------------------------------------
>
>                 Key: KAFKA-697
>                 URL: https://issues.apache.org/jira/browse/KAFKA-697
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: John Fung
>         Attachments: kafka-697.patch
>
>
> kafka.common.InvalidConfigException: client.id console-consumer-16946-ConsumerFetcherThread-console-consumer-16946_XXXX-host18.corp-1358006528116-991e3f2d-0-1 is illegal, contains a character other than ASCII alphanumerics, _ and -
>         at kafka.common.Config$class.validateChars(Config.scala:32)
>         at kafka.consumer.ConsumerConfig$.validateChars(ConsumerConfig.scala:25)
>         at kafka.consumer.ConsumerConfig$.validateClientId(ConsumerConfig.scala:55)
>         at kafka.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:88)
>         at kafka.server.AbstractFetcherThread.<init>(AbstractFetcherThread.scala:44)
>         at kafka.consumer.ConsumerFetcherThread.<init>(ConsumerFetcherThread.scala:27)
>         at kafka.consumer.ConsumerFetcherManager.createFetcherThread(ConsumerFetcherManager.scala:93)
>         at kafka.server.AbstractFetcherManager.addFetcher(AbstractFetcherManager.scala:44)
>         at kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:75)
>         at kafka.consumer.ConsumerFetcherManager$$anon$1$$anonfun$doWork$3.apply(ConsumerFetcherManager.scala:72)
>         at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
>         at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
>         at scala.collection.Iterator$class.foreach(Iterator.scala:631)
>         at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:161)
>         at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:194)
>         at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
>         at scala.collection.mutable.HashMap.foreach(HashMap.scala:80)
>         at kafka.consumer.ConsumerFetcherManager$$anon$1.doWork(ConsumerFetcherManager.scala:72)
>         at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:50)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira