[ 
https://issues.apache.org/jira/browse/KAFKA-1057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14109094#comment-14109094
 ] 

Gerard Maas commented on KAFKA-1057:
------------------------------------

Here's an example that has costed me a good day of work:
{code}
14/08/25 12:40:06 WARN 
kafka.consumer.ConsumerFetcherManager$LeaderFinderThread: 
[abc.private-1408970387063-6283475b-leader-finder-thread], Failed to find 
leader for Set([dev,0], [dev,1])
kafka.common.KafkaException: fetching topic metadata for topics [Set(dev)] from 
broker [ArrayBuffer(id:0,host:172.17.0.88 ,port:9092)] failed
        at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:67)
        at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:88)
        at 
kafka.consumer.ConsumerFetcherManager$LeaderFinderThread.doWork(ConsumerFetcherManager.scala:66)
        at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51)
Caused by: java.nio.channels.UnresolvedAddressException
        at sun.nio.ch.Net.checkAddress(Net.java:127)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:644)
        at kafka.network.BlockingChannel.connect(BlockingChannel.scala:57)
        at kafka.producer.SyncProducer.connect(SyncProducer.scala:141)
        at 
kafka.producer.SyncProducer.getOrMakeConnection(SyncProducer.scala:156)
        at 
kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:68)
        at kafka.producer.SyncProducer.send(SyncProducer.scala:112)
        at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:53)
{code}

This exception is thrown b/c the configured ip address contains a space:
{code}
advertised.host.name=172.17.0.91  
{code}

(BTW, this ip address is configured by a script using 'hostname -I' which adds 
a space after the address)

+1 for this bug

> Trim whitespaces from user specified configs
> --------------------------------------------
>
>                 Key: KAFKA-1057
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1057
>             Project: Kafka
>          Issue Type: Bug
>          Components: config
>            Reporter: Neha Narkhede
>            Assignee: Neha Narkhede
>              Labels: newbie
>             Fix For: 0.8.2
>
>
> Whitespaces in configs are a common problem that leads to config errors. It 
> will be nice if Kafka can trim the whitespaces from configs automatically



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to