You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Krishna Raj <re...@gmail.com> on 2014/02/23 13:52:15 UTC

Host resolution issue solution

Hi All,

I have banged my head for nearly 3 hours trying to find out why my producer
code did not enqueue the message. And later found a very simple issue.

I dont want anyone else to waste their time in this and hence this email.

1) Broker is in a physical Linux box. The broker was registered using the
"hostname"

Snippet:

[2014-02-23 01:58:09,760] INFO Registered broker 0 at path /brokers/ids/0
with address myhost name:9092. (kafka.utils.ZkUtils$)

2) The producer code was in windows machine. I was setting the property in
the producer code as :
    this.props.put("metadata.broker.list", "17x.xx.xx.xx:9092");


So the message was not enqueue into Kafka.

How I resolved ?

Thanks to,  *Marc Labbe
(**http://grokbase.com/t/kafka/users/136m18rn17/kafka-common-failedtosendmessageexception-0-8#20130620fsm9mjp5zmx2cvej44t7am66c4
<http://grokbase.com/t/kafka/users/136m18rn17/kafka-common-failedtosendmessageexception-0-8#20130620fsm9mjp5zmx2cvej44t7am66c4>*
*)*

*I resolved by resolving the IP with host name in the windows host file.*


Cheers !
Krishna

Re: Host resolution issue solution

Posted by Jun Rao <ju...@gmail.com>.
Thanks for the info. I update FAQ (
https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Whycan'tmyconsumers/producersconnecttothebrokers?)
to reflect this.

Jun


On Sun, Feb 23, 2014 at 4:52 AM, Krishna Raj <re...@gmail.com>wrote:

> Hi All,
>
> I have banged my head for nearly 3 hours trying to find out why my producer
> code did not enqueue the message. And later found a very simple issue.
>
> I dont want anyone else to waste their time in this and hence this email.
>
> 1) Broker is in a physical Linux box. The broker was registered using the
> "hostname"
>
> Snippet:
>
> [2014-02-23 01:58:09,760] INFO Registered broker 0 at path /brokers/ids/0
> with address myhost name:9092. (kafka.utils.ZkUtils$)
>
> 2) The producer code was in windows machine. I was setting the property in
> the producer code as :
>     this.props.put("metadata.broker.list", "17x.xx.xx.xx:9092");
>
>
> So the message was not enqueue into Kafka.
>
> How I resolved ?
>
> Thanks to,  *Marc Labbe
> (**
> http://grokbase.com/t/kafka/users/136m18rn17/kafka-common-failedtosendmessageexception-0-8#20130620fsm9mjp5zmx2cvej44t7am66c4
> <
> http://grokbase.com/t/kafka/users/136m18rn17/kafka-common-failedtosendmessageexception-0-8#20130620fsm9mjp5zmx2cvej44t7am66c4
> >*
> *)*
>
> *I resolved by resolving the IP with host name in the windows host file.*
>
>
> Cheers !
> Krishna
>