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

Kafka consumers and producers get confused by dualstack A + AAAA DNS records

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.11.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have hostnames with both A (IPv4) and AAAA (IPv6) DNS records. Kafka is configured to only listen on IPv6 by manually setting IP to listen on and advertise outside.

      Brokers have no issue communicating between them, because they are not given the option to resolve hostnames and pick IP protocol version.

      Consumers and producers have to use bootstrap hostnames and do not try to connect to IPv6 at all, they are stuck in SYN_SENT over IPv4:

      syslog-ng 12621      999  123u  IPv6         2411122889      0t0        TCP 192.168.0.2:41626->192.168.0.1:9092 (SYN_SENT)
      

      This happened to consumer in syslog-ng output plugin:

      It also happened to a Flink consumer, although I do no have any more info about that one. We fixed the issue by only providing AAAA records for bootstrapping.

      Previously we saw the opposite problem with dualstack: software does not implement happy eyeballs and only connects to IPv6 address, which is firewalled. This happened to SSH (client gets stuck if you don't supply -4) and Go (https://github.com/golang/go/issues/22225) to give a couple of examples.

      The solution for this is Happy Eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs

      Kafka clients should connect to IPv6 first and then fallback to IPv4 if not available.

      There is also KAFKA-3347.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bobrik Ivan Babrou
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: