Re: Metadata API returns localhost.localdomain for one of the brokers in EC2

2013-10-03 Thread Jay Kreps
Is there something we could be doing in Kafka to avoid this problem? -Jay On Thu, Oct 3, 2013 at 8:29 AM, Rajasekar Elango wrote: > Hi Aniket, > > We had same issue it turns out that we need to make sure ip to hostname > mapping should be correctly configured in /etc/hosts file. > > For eg: If

Re: Metadata API returns localhost.localdomain for one of the brokers in EC2

2013-10-03 Thread Rajasekar Elango
Hi Aniket, We had same issue it turns out that we need to make sure ip to hostname mapping should be correctly configured in /etc/hosts file. For eg: If you had something like 127.0.0.1 localhost localhost as first line in /etc/hosts file, you will get his error. To fix we need to ad

Re: Metadata API returns localhost.localdomain for one of the brokers in EC2

2013-10-03 Thread Aniket Bhatnagar
Thanks Jun and David. I think the FAQ mentions why it's not possible to connect to broker from outside. In my case, all servers (producers and brokers) are in the same VPC. Call to InetAddress.getLocalHost.getHostAddress should return an internal IP to which producers should be able to connect. Th

Re: Metadata API returns localhost.localdomain for one of the brokers in EC2

2013-10-03 Thread Jun Rao
There is an FAQ too. https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-OnEC2%2Cwhycan%27tmyhighlevelconsumersconnecttothebrokers%3F Thanks, Jun On Thu, Oct 3, 2013 at 6:43 AM, David Arthur wrote: > You can configure the hostname for the broker with the "host.name" > property in the b

Re: Metadata API returns localhost.localdomain for one of the brokers in EC2

2013-10-03 Thread David Arthur
You can configure the hostname for the broker with the "host.name" property in the broker's config (server.properties?). If you don't specify one here, then all interfaces will be bound to and one will be chosen to get published via ZooKeeper (what the metadata API is reading) See: http://kafk