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

ASF GitHub Bot commented on KAFKA-4765:
---------------------------------------

GitHub user original-brownbear opened a pull request:

    https://github.com/apache/kafka/pull/2552

    KAFKA-4765: Fixed Intentionally Broken Hosts Resolving to 127.0.53.53

    Fixes https://issues.apache.org/jira/browse/KAFKA-4765 by simply using 
artificially broken hosts that are not resolved as potential collisions 
(127.0.53.53s) by some DNS servers.
    
    This change is the only way to build while using Google's `8.8.8.8` (at 
least in my network).
    I can't see a downside to making this change, simply makes the build more 
stable and portable :)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/original-brownbear/kafka KAFKA-4765

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2552.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2552
    
----
commit e62468c43930390fa545d0ff24376d8bd784e691
Author: Armin Braun <m...@obrown.io>
Date:   2017-02-15T09:13:58Z

    KAFKA-4765 Fixed Intentionally Broken Hosts Resolving to 127.0.53.53

----


> org.apache.kafka.clients.producer.KafkaProducerTest#testConstructorFailureCloseResource
>  and Similar Tests are Failing on some Systems (127.0.53.53 Collision Warning)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-4765
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4765
>             Project: Kafka
>          Issue Type: Bug
>          Components: unit tests
>    Affects Versions: 0.10.1.1
>         Environment: All DNS environments that properly forward 127.0.53.53
>            Reporter: Armin Braun
>
> The test
> {code}
> org.apache.kafka.clients.producer.KafkaProducerTest#testConstructorFailureCloseResource
> {code}
> fails on some systems because this below snippet from 
> {code}
> org.apache.kafka.clients.ClientUtils#parseAndValidateAddresses
> {code}
> {code}
>                     InetSocketAddress address = new InetSocketAddress(host, 
> port);
>                     if (address.isUnresolved()) {
>                         log.warn("Removing server {} from {} as DNS 
> resolution failed for {}", url, CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, 
> host);
>                     } else {
>                         addresses.add(address);
>                     }
> {code}
> will add the address *some.invalid.hostname.foo.bar* to the addresses list 
> without error since it is resolved to *127.0.53.53* to indicate potential 
> future collision of the _.bar_ tld.
> The same issue applies to a few other test cases that try to intentionally 
> run into broken hostnames.
> This can (and should) be fixed by using broken hostname examples that do not 
> collide. I would suggest just putting a ".local" suffix on all that are 
> currently affected by this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to