question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kafka DNS resolution failed

See original GitHub issue

When using the kafka headless service into the kafka advertised listerners , I have:

[2019-03-14 14:34:01,736] WARN The replication factor of topic __confluent.support.metrics is 1, which is less than the desired replication factor of 3.  If you happen to add more brokers to this cluster, then it is important to increase the replication factor of the topic to eventually 3 to ensure reliable and durable metrics collection. (io.confluent.support.metrics.common.kafka.KafkaUtilities)
[2019-03-14 14:34:01,760] INFO ProducerConfig values:
        acks = 1
        batch.size = 16384
        bootstrap.servers = [PLAINTEXT://kafkabroker-0.kafkabroker-headless.test:9092, PLAINTEXT://kafkabroker-1.kafkabroker-headless.test:9092, PLAINTEXT://kafkabroker-2.kafkabroker-headless.test:9092]
        buffer.memory = 33554432
        client.dns.lookup = default
        client.id =
        compression.type = none
        connections.max.idle.ms = 540000
        delivery.timeout.ms = 120000
        enable.idempotence = false
        interceptor.classes = []
        key.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
        linger.ms = 0
        max.block.ms = 10000
        max.in.flight.requests.per.connection = 5
        max.request.size = 1048576
        metadata.max.age.ms = 300000
        metric.reporters = []
        metrics.num.samples = 2
        metrics.recording.level = INFO
        metrics.sample.window.ms = 30000
        partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner
        receive.buffer.bytes = 32768
        reconnect.backoff.max.ms = 1000
        reconnect.backoff.ms = 50
        request.timeout.ms = 30000
        retries = 2147483647
        retry.backoff.ms = 100
        sasl.client.callback.handler.class = null
        sasl.jaas.config = null
        sasl.kerberos.kinit.cmd = /usr/bin/kinit
        sasl.kerberos.min.time.before.relogin = 60000
        sasl.kerberos.service.name = null
        sasl.kerberos.ticket.renew.jitter = 0.05
        sasl.kerberos.ticket.renew.window.factor = 0.8
        sasl.login.callback.handler.class = null
        sasl.login.class = null
        sasl.login.refresh.buffer.seconds = 300
        sasl.login.refresh.min.period.seconds = 60
        sasl.login.refresh.window.factor = 0.8
        sasl.login.refresh.window.jitter = 0.05
        sasl.mechanism = GSSAPI
        security.protocol = PLAINTEXT
        send.buffer.bytes = 131072
        ssl.cipher.suites = null
        ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
        ssl.endpoint.identification.algorithm = https
        ssl.key.password = null
        ssl.keymanager.algorithm = SunX509
        ssl.keystore.location = null
        ssl.keystore.password = null
        ssl.keystore.type = JKS
        ssl.protocol = TLS
        ssl.provider = null
        ssl.secure.random.implementation = null
        ssl.trustmanager.algorithm = PKIX
        ssl.truststore.location = null
        ssl.truststore.password = null
        ssl.truststore.type = JKS
        transaction.timeout.ms = 60000
        transactional.id = null
        value.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
 (org.apache.kafka.clients.producer.ProducerConfig)
[2019-03-14 14:34:01,790] WARN Couldn't resolve server PLAINTEXT://kafkabroker-0.kafkabroker-headless.test:9092 from bootstrap.servers as DNS resolution failed for kafkabroker-0.kafkabroker-headless.test (org.apache.kafka.clients.ClientUtils)
[2019-03-14 14:34:01,798] WARN Couldn't resolve server PLAINTEXT://kafkabroker-1.kafkabroker-headless.test:9092 from bootstrap.servers as DNS resolution failed for kafkabroker-1.kafkabroker-headless.test (org.apache.kafka.clients.ClientUtils)
[2019-03-14 14:34:01,804] WARN Couldn't resolve server PLAINTEXT://kafkabroker-2.kafkabroker-headless.test:9092 from bootstrap.servers as DNS resolution failed for kafkabroker-2.kafkabroker-headless.test (org.apache.kafka.clients.ClientUtils)
[2019-03-14 14:34:01,804] INFO [Producer clientId=producer-1] Closing the Kafka producer with timeoutMillis = 0 ms. (org.apache.kafka.clients.producer.KafkaProducer)
[2019-03-14 14:34:01,807] ERROR Could not submit metrics to Kafka topic __confluent.support.metrics: Failed to construct kafka producer (io.confluent.support.metrics.BaseMetricsReporter)
[2019-03-14 14:34:03,321] INFO Successfully submitted metrics to Confluent via secure endpoint (io.confluent.support.metrics.submitters.ConfluentSubmitter)

Kafka Image version: 5.1.0 and the statefulset.yaml/service.yaml is the same as in the repo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

7reactions
iNithinPrasadcommented, Nov 11, 2019

@justpolidor : Can you please share the resolution steps you took? Thanks.

1reaction
anishprobablecommented, Jan 24, 2020

@iNithinPrasad Have you got the resolution ? I am trying to install confluent schema registry on AKS through confluent helm chart and facing same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Kafka - DNS resolution failed for url in bootstrap ...
1) I set the host.name, port config to server.properties · 2) I add the host ip and alias name to /etc/hosts 127.0. ·...
Read more >
Kafka clients fail to start if one of broker isn't resolved by DNS
Kafka clients fail to start if one of broker isn't resolved by DNS. Status: Assignee: Priority: Resolution: Resolved. Unassigned. Minor.
Read more >
Failure handling - Amazon Managed Streaming for Apache ...
You can see connector creation failures due to unsuccessful DNS resolution queries in your CloudWatch logs, if you've configured these logs for your...
Read more >
If will set bootstrap.servers=kafka:9092 in my connect ...
WARN Couldn't resolve server kafka:9092 from bootstrap.servers as DNS resolution failed for kafka (org.apache.kafka.clients.ClientUtils:74).
Read more >
Why Can't I Connect to Kafka? | Troubleshoot Connectivity
tl;dr When a client wants to send or receive a message from Apache Kafka®, ... Docker container there is no Kafka broker running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found