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

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

Can you try the second test-case on 0.9.0 release? We have a request.timeout.ms 
(defaulting to 30s) - after this time the .get() should return with a timeout 
no matter what. 

In which case, the lack of details of what caused the time out is still an 
issue.

> 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