You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2013/01/15 17:38:14 UTC
[jira] [Resolved] (KAFKA-704) ConsumerFetcherThread can create
illegal clientId
[ https://issues.apache.org/jira/browse/KAFKA-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jun Rao resolved KAFKA-704.
---------------------------
Resolution: Duplicate
This is a duplicate of KAFKA-697.
> ConsumerFetcherThread can create illegal clientId
> -------------------------------------------------
>
> Key: KAFKA-704
> URL: https://issues.apache.org/jira/browse/KAFKA-704
> Project: Kafka
> Issue Type: Bug
> Components: consumer
> Affects Versions: 0.8
> Reporter: ben fleis
> Assignee: Neha Narkhede
>
> When updating to recent changes, I found that my ConsoleConsumer with a custom formatter no longer works. I tracked down the error to a change in ConsumerFetcherThread, whereby the clientId is now the concatenation of user specified config.clientId and 'name'. In turn, 'name' can include the hostname, which in my case was "mn-bfleis.local". '.' is an illegal character, thus in my case, the consumer systematically feeds itself an invalid value. And of course, it breaks.
> I don't know what the proper fix is -- to allow '.', or change the way 'name' is generated. The previous revision didn't concatenate, so I don't know whether it's truly necessary. Locally I am just removed the concat step until this is resolved.
> The breaking change occurred at git hash 03eb903c, whose commit log read:
> KAFKA-683 Fix correlation id in all requests sent to kafka; reviewed by Jun Rao
> I doubt it's needed, but jic, original trace below:
> [2013-01-15 14:13:19,732] WARN [FFFF_bfleis-mn.local-1358255598567-67426e89-leader-finder-thread], Failed to find leader for Set([types,2], [types,1], [types,0]) (kafka.consumer.ConsumerFetcherManager$$anon$1)
> kafka.common.InvalidConfigException: client.id FFFF-ConsumerFetcherThread-FFFF_bfleis-mn.local-1358255598567-67426e89-0-0 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:89)
> 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