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

Gwen Shapira commented on KAFKA-2634:
-------------------------------------

Actually we are doing a bit better than no details in the second case. We do 
have a specific error on the TimeoutException when we fail to get metadata for 
the topic and when we fail to allocate memory. 
We could do better on the exception when we time out waiting for the server to 
respond to the produce-request.

Can you post the specific content of your log with the timeout exceptions so we 
can see what is the error and how we can improve?


> KafkaProducer hangs on future.get()
> -----------------------------------
>
>                 Key: KAFKA-2634
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2634
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8.2.1, 0.8.2.2
>         Environment: Windows 8 PC connecting to local ubuntu VM running kafka 
> in docker image with topic set up having 1 partition and a replication factor 
> of 1
>            Reporter: Jason Kania
>            Priority: Blocker
>
> When running the Kafka Producer at the end of this description, the following 
> problems occur:
> 1) If the ip address of the server running the kafka queue is incorrect or 
> unavailable, the producer times out without ever indicating that the node 
> could not be found. The time out exception should indicate if the node could 
> not be connected to in the first place or if communication timed out during 
> communication with the node.
> 2) In my situation, the client connects to the kafka queue according to 
> server logs, but never returns from the get() call on the producer side. This 
> get call too should time out indicating what the producer was waiting on when 
> it timed out. At present there are no details to indicate how to debug.
> The issue is a blocker in my view because there are no error details that 
> allow debugging of the issue even when the log4j properties of the server are 
> set as detailed as possible.
> public class BrokenProducer
> {
>       public static void main(String[] args)
>       {
>               Properties properties = new Properties();
>               properties.put("bootstrap.servers", "<VM IP address>:9092");
>               properties.put("key.serializer", 
> "org.apache.kafka.common.serialization.StringSerializer");
>               properties.put("value.serializer", 
> "org.apache.kafka.common.serialization.StringSerializer");
>               KafkaProducer producer = new KafkaProducer<String,String>( 
> properties );
>               try
>               {
>                       producer.send(new ProducerRecord("myQueue", 
> "aString")).get();
>               }
>               catch (Exception e)
>               {
>                       e.printStackTrace();
>               }
>               producer.close();
>       }
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to