Does anybody have any ideas about this? On Saturday, March 26, 2016 10:08 PM, amar dev <amar_9...@yahoo.com> wrote:
Hi Muthu, I checked in the ZK cli, I can see my created topic.Steps:-//enter the ZK shell zookeeper-shell.sh crazybox:2181ls /brokers/topics[kafkatopic] -- this is the topic that I created. Thanks,Bhargo On Saturday, March 26, 2016 9:46 PM, amar dev <amar_9...@yahoo.com> wrote: Hi Muthu, Thanks for replying.PFB my replies:- Is your ZK running on the same system as one of broker instance ? Yes, ZK, broker,console-producer, console-consumer are running on the same box - Is broker able to connect to ZK properly ? May be this can be checked via ZK CLI tools to check if the broker registrations happen properly as soon as you start Kafka brokerI don't think this should be a problem because my console producer can send the messages to the console consumers. But, to be double sure of it, I will verify this. - Is your topic created and accessible via ‘sudo ./bin/kafka-topics.sh’ command remotely with –describe flag? Yes,I can see my topic listed when I use the command - kafka-topics.sh --describe kafkatopic --zookeeper crazybox:2181 - Was console-producer and console-consumer run from a remote machine to check if they really work with the remote broker config changes you have done ? They are run locally so there are no remote connections involved. Thanks,Bhargo On Saturday, March 26, 2016 8:48 PM, Muthukumaran K <muthukumara...@ericsson.com> wrote: #yiv5879891350 -- filtered {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;}#yiv5879891350 filtered {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}#yiv5879891350 filtered {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}#yiv5879891350 filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv5879891350 filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv5879891350 p.yiv5879891350MsoNormal, #yiv5879891350 li.yiv5879891350MsoNormal, #yiv5879891350 div.yiv5879891350MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv5879891350 a:link, #yiv5879891350 span.yiv5879891350MsoHyperlink {color:blue;text-decoration:underline;}#yiv5879891350 a:visited, #yiv5879891350 span.yiv5879891350MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv5879891350 p.yiv5879891350MsoListParagraph, #yiv5879891350 li.yiv5879891350MsoListParagraph, #yiv5879891350 div.yiv5879891350MsoListParagraph {margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv5879891350 span.yiv5879891350EmailStyle17 {color:#1F497D;}#yiv5879891350 .yiv5879891350MsoChpDefault {font-size:10.0pt;}#yiv5879891350 filtered {margin:1.0in 1.0in 1.0in 1.0in;}#yiv5879891350 div.yiv5879891350WordSection1 {}#yiv5879891350 filtered {}#yiv5879891350 filtered {}#yiv5879891350 filtered {}#yiv5879891350 filtered {font-family:Wingdings;}#yiv5879891350 filtered {font-family:Symbol;}#yiv5879891350 filtered {}#yiv5879891350 filtered {font-family:Wingdings;}#yiv5879891350 filtered {font-family:Symbol;}#yiv5879891350 filtered {}#yiv5879891350 filtered {font-family:Wingdings;}#yiv5879891350 ol {margin-bottom:0in;}#yiv5879891350 ul {margin-bottom:0in;}#yiv5879891350 Hi Bhargo, I ran into similar issues mainly due to firewall restrictions in my setup with remote VM running broker and ZK. In my little experience, few things to check concretely before running our own clients to see if the changes of server.properties is properly done - Is your ZK running on the same system as one of broker instance ? - Is broker able to connect to ZK properly ? May be this can be checked via ZK CLI tools to check if the broker registrations happen properly as soon as you start Kafka broker - Is your topic created and accessible via ‘sudo ./bin/kafka-topics.sh’ command remotely with –describe flag? - Was console-producer and console-consumer run from a remote machine to check if they really work with the remote broker config changes you have done ? This can help troubleshooting where the issue lies. Regards Muthu From: amar dev [mailto:amar_9...@yahoo.com.INVALID] Sent: Saturday, March 26, 2016 8:08 PM To: users@kafka.apache.org Subject: Error while publishing messages Hi Team!! I am working on a POC for my project, where I want to replace RabbitMQ with Kafka I am using the 0.9.0.1 version of kafka on my Ubuntu 15.10 version. I have been able to setup the basic setup, where from the console producer I can send messages and from the console consumer, I can consume them as well. But, when I try to create a java program to send the messages to the same topic, I get an exception stacktrace in my IDE console and my console consumer shows the same message 4 times. The exception that I get is the following:- Exception in thread "main" kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries. at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:91) at kafka.producer.Producer.send(Producer.scala:77) at kafka.javaapi.producer.Producer.send(Producer.scala:33) at com.bhargo.main.MainClass.publishMessage(MainClass.java:47) at com.bhargo.main.MainClass.main(MainClass.java:58) I am not sure what the issue is, I have made sure that server.properties file that is used to startup my broker has the correct configurations:- zookeeper.connect=crazybox:2181 advertised.port=9092 advertised.host.name=crazybox host.name=crazybox port=9092 On running the command hostname , I get the result as "crazybox" and hostname -i, gives me 127.0.0.1 I am attaching the code for your reference. Please have a look once. Any help here is much appreciated. Thanks, Bhargo