Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C216E17F51 for ; Wed, 1 Oct 2014 08:40:34 +0000 (UTC) Received: (qmail 47980 invoked by uid 500); 1 Oct 2014 08:40:34 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 47934 invoked by uid 500); 1 Oct 2014 08:40:34 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 47923 invoked by uid 99); 1 Oct 2014 08:40:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 08:40:34 +0000 Date: Wed, 1 Oct 2014 08:40:34 +0000 (UTC) From: "Andras Hatvani (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-1494) Failed to send messages after 3 tries. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154569#comment-14154569 ] Andras Hatvani commented on KAFKA-1494: --------------------------------------- Josh, I've got a very similar Docker-based setup and I was able to successfully produce and consume messages by adjusting the variables I described in my previous comment in this JIRA issue. I suggest that you send this problem description to the user mailing list where we can continue the discussion without polluting this issue. > Failed to send messages after 3 tries. > -------------------------------------- > > Key: KAFKA-1494 > URL: https://issues.apache.org/jira/browse/KAFKA-1494 > Project: Kafka > Issue Type: Bug > Components: controller, core > Affects Versions: 0.8.1.1 > Environment: Mac OS > Reporter: darion yaphets > Assignee: Neha Narkhede > > I use default server & zookeeper config to start-up zookeeper server and kafka broker on my machine to test custom message which based on proto buffer . I write a client to send protobuf-message to kafka broker and source code as following : > Properties properties = new Properties(); > properties.put("serializer.class", "java_example.ProtoBufMessage"); > properties.put("metadata.broker.list", "localhost:9092"); > ProducerConfig config = new ProducerConfig(properties); > testBuf buffer = testBuf.newBuilder().setID(0) > .setUrl("darion.yaphet.org").build(); > Producer producer = new Producer( > config); > producer.send(new KeyedMessage("protobuffer", buffer)); > client debug log report a exception: > [FileSystemMoniter] INFO [main] kafka.utils.Logging$class.info(68) | Disconnecting from localhost:9092 > [FileSystemMoniter] DEBUG [main] kafka.utils.Logging$class.debug(52) | Successfully fetched metadata for 1 topic(s) Set(protobuffer) > [FileSystemMoniter] WARN [main] kafka.utils.Logging$class.warn(83) | Error while fetching metadata [{TopicMetadata for topic protobuffer -> > No partition metadata for topic protobuffer due to kafka.common.LeaderNotAvailableException}] for topic [protobuffer]: class kafka.common.LeaderNotAvailableException > [FileSystemMoniter] ERROR [main] kafka.utils.Logging$class.error(97) | Failed to send requests for topics protobuffer with correlation ids in [0,8] > Exception in thread "main" kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries. > at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90) > at kafka.producer.Producer.send(Producer.scala:76) > at kafka.javaapi.producer.Producer.send(Producer.scala:33) > at java_example.ProducerExamples.main(ProducerExamples.java:26) -- This message was sent by Atlassian JIRA (v6.3.4#6332)