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

Jay Kreps commented on KAFKA-1501:
----------------------------------

Oh, man, my heart is broken, I was sure that was going to work.

It looks like a few projects do a few extra steps to check availability 
including creating a datagram socket using the given port. For example:
http://stackoverflow.com/questions/434718/sockets-discover-port-availability-using-java

The comments mention something in Apache Mina which is essentially the same.

I have no idea why that is needed, but maybe worth trying that in choosePorts? 
I like the idea of improving choosePorts rather than changing SocketServer...

> transient unit tests failures due to port already in use
> --------------------------------------------------------
>
>                 Key: KAFKA-1501
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1501
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Guozhang Wang
>              Labels: newbie
>         Attachments: KAFKA-1501.patch
>
>
> Saw the following transient failures.
> kafka.api.ProducerFailureHandlingTest > testTooLargeRecordWithAckOne FAILED
>     kafka.common.KafkaException: Socket server failed to bind to 
> localhost:59909: Address already in use.
>         at kafka.network.Acceptor.openServerSocket(SocketServer.scala:195)
>         at kafka.network.Acceptor.<init>(SocketServer.scala:141)
>         at kafka.network.SocketServer.startup(SocketServer.scala:68)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:95)
>         at kafka.utils.TestUtils$.createServer(TestUtils.scala:123)
>         at 
> kafka.api.ProducerFailureHandlingTest.setUp(ProducerFailureHandlingTest.scala:68)



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

Reply via email to