You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Srikrishna Alla <al...@gmail.com> on 2017/03/27 21:22:00 UTC

KafkaProducer overriding security.protocol config value and unable to connect to Broker

Hi everyone,

I am facing an issue when writing to Kafka broker. I am instantiating a
KafkaProducer by passing it configuration properties, on a secured Kafka
Broker with SASL_PLAINTEXT security.protocol. I can see that I am passing
the right security.protocol when instantiating the Producer, but log shows
its been set to Null for some reason. Has anyone seen this kind of error
before. My client is Kafka 9 and Cluster is Kafka 10. Please see the error
below. I am printing the properties between KAFKA PROPS and I see I am
passing security.protocol right, but below it shows it is null.

45806 [15:37:05:224] [Loader-1] INFO  c.a.b.d.etl.monitor.AlertProducer [,,
]   - =================KAFKA PROPS======================
45806 [15:37:05:224] [Loader-1] INFO  c.a.b.d.etl.monitor.AlertProducer [,,
]   - {*security.protocol=SASL_PLAINTEXT,* bootstrap.servers=blp**com:6667,
value.serializer=org.apache
.kafka.common.serialization.StringSerializer, buffer.memory=33554432,
retries=0,
key.serializer=org.apache.kafka.common.serialization.StringSerializer,
linger.ms=0, batch.size=16384, acks=a
ll}
45806 [15:37:05:224] [Loader-1] INFO  c.a.b.d.etl.monitor.AlertProducer [,,
]   - =================KAFKA PROPS======================
45817 [15:37:05:235] [Loader-1] INFO  o.a.k.c.producer.ProducerConfig [,,
]   - ProducerConfig values:
        compression.type = none
        metric.reporters = []
        metadata.max.age.ms = 300000
        metadata.fetch.timeout.ms = 60000
        acks = all
        batch.size = 16384
        reconnect.backoff.ms = 10
        bootstrap.servers = [blpd**.com:6667]
        receive.buffer.bytes = 32768
        retry.backoff.ms = 100
        buffer.memory = 33554432
        timeout.ms = 30000
        key.serializer = class
org.apache.kafka.common.serialization.StringSerializer
        retries = 0
        max.request.size = 1048576
        block.on.buffer.full = true
        value.serializer = class
org.apache.kafka.common.serialization.StringSerializer
        metrics.sample.window.ms = 30000
        send.buffer.bytes = 131072
        max.in.flight.requests.per.connection = 5
        metrics.num.samples = 2
        linger.ms = 0
        client.id =

45847 [15:37:05:265] [Loader-1] WARN  o.a.k.c.producer.ProducerConfig [,,
]   - *The configuration security.protocol = null was supplied but isn't a
known config.*
45954 [15:37:05:372] [kafka-producer-network-thread | producer-1] WARN
o.a.kafka.common.network.Selector [,, ]   - Error in I/O with blpd**.com/
130.5.106.91
java.io.EOFException: null
        at
org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:62)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:248)
        at
org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:192)
        at
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
        at
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
        at java.lang.Thread.run(Thread.java:745)

Thanks a lot for your help,
Sri