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

Arsenii Krasikov commented on KAFKA-2036:
-----------------------------------------

I find that {{InetSocketAddress}} is only passed into 
clients/src/main/java/org/apache/kafka/common/network.
{{org.apache.kafka.clients.NetworkClient.initiateConnect}}:499 constructs 
incorrectly {{InetSocketAddress}} and passes it to {{Selectable}}. 
{{org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses}} has the same 
problem as {{BlockingChannel}}: we need to create {{InetSocketAddress}} and 
test it at once, we can't return it. So, it seems like the 
{{parseAndValidateAddresses}} logic is incorrect and we need to return sockets 
or use that resolvers/validators at place.

There is some sort of patch for 
{{org.apache.kafka.clients.NetworkClient.initiateConnect}}: 
{{this.connectionStates.connecting(node.id(), now)}} and 
{{selector.connect(...)}}  are swapped around because {{selector.connect()}} 
can throw an error.

> Consumer and broker have different networks
> -------------------------------------------
>
>                 Key: KAFKA-2036
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2036
>             Project: Kafka
>          Issue Type: Bug
>          Components: network
>    Affects Versions: 0.8.2.1
>         Environment: oracle java {7,8}, ipv6 only consumer, ipv4 + ipv6 broker
>            Reporter: Arsenii Krasikov
>            Assignee: Jun Rao
>         Attachments: patch
>
>
> If broker is connected to several networks ( for example ipv6 and ipv4 ) and 
> not all of them are reachable to consumer then 
> {{kafka.network.BlockingChannel}} gives up to connect after the first 
> "Network is unreachable" error not triyng remaining networks



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

Reply via email to