Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4765

org.apache.kafka.clients.producer.KafkaProducerTest#testConstructorFailureCloseResource and Similar Tests are Failing on some Systems (127.0.53.53 Collision Warning)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.1.1
    • 0.11.0.0
    • unit tests
    • None
    • All DNS environments that properly forward 127.0.53.53

    Description

      The test

      org.apache.kafka.clients.producer.KafkaProducerTest#testConstructorFailureCloseResource
      

      fails on some systems because this below snippet from

      org.apache.kafka.clients.ClientUtils#parseAndValidateAddresses
      
                          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);
                          }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              original-brownbear Armin Braun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: