Support Questions
Find answers, ask questions, and share your expertise

Application running on secured Kafka

Highlighted

Application running on secured Kafka

I am trying to send data to Kafka in an secured Kafka and I'm receiving this error message:

INFO  [2016-01-18 17:41:17,878] kafka.producer.SyncProducer: Connected to broker:6667 for producing
INFO  [2016-01-18 17:41:17,887] kafka.producer.SyncProducer: Disconnecting from broker:6667
WARN  [2016-01-18 17:41:17,899] kafka.client.ClientUtils$: Fetching topic metadata with correlation id 0 for topics [Set(abc_test)] from broker [id:0,broker,port:6667] failed
! java.io.EOFException: Received -1 when reading from channel, socket has likely been closed.

My Properties look like:

props.put("metadata.broker.list", conf.getBroker());
props.put("serializer.class", Encoder.class.getName());
props.put("security.protocol", "PLAINTEXTSASL");
props.put("sasl.kerberos.service.name", "kafka");
ProducerConfig pConf = new ProducerConfig(props);
producer = new Producer<>(pConf);

Can anyone help ?

4 REPLIES 4
Highlighted

Re: Application running on secured Kafka

Mentor
@Sascha Kerbler

please view this topic and see if it can help.

Highlighted

Re: Application running on secured Kafka

Hi Artem,

I'm startin with java -Djava.security.auth.login.config=/usr/hdp/current/kafka-broker/config/kafka_jaas.conf -jar application.

So the jaas.conf is already included

Highlighted

Re: Application running on secured Kafka

Have you set permissions on the topic, using kafka-acls.sh? Can you write to the topic using for example kafka-console-producer from the same host and as the same user?

Highlighted

Re: Application running on secured Kafka

Mentor

@Sascha Kerbler has this been resolved? Can you post your solution or accept best answer?