Read kafka ssl from hdfs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Read kafka ssl from hdfs

Aditya exalter

Hi kafka is unable to read the keystore file from hdfs its treating as local filesystem, any suggestions? or workarounds please

hdfs location provided  hdfs://cluster1/user/test/keystore.jks  and its automatically removing the an `/` before cluster1

org.apache.kafka.common.KafkaException: Failed to construct kafka producer

        at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:415)

        at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:287)

        at kafka.producer.NewShinyProducer.<init>(BaseProducer.scala:40)

        at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:48)

        at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)

Caused by: org.apache.kafka.common.KafkaException: org.apache.kafka.common.KafkaException: java.io.FileNotFoundException: hdfs:/cluster1/user/test/keystore.jks (No such file or directory)

        at org.apache.kafka.common.network.SslChannelBuilder.configure(SslChannelBuilder.java:49)

        at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:112)

        at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:58)

        at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:88)

        at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:374)

        ... 4 more

Caused by: org.apache.kafka.common.KafkaException: java.io.FileNotFoundException: hdfs:/cluster1/user/test/keystore.jks (No such file or directory)

        at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:121)

        at org.apache.kafka.common.network.SslChannelBuilder.configure(SslChannelBuilder.java:46)

        ... 8 more

Caused by: java.io.FileNotFoundException: hdfs:/cluster1/user/test/keystore.jks (No such file or directory)

        at java.io.FileInputStream.open0(Native Method)



Thanks & regards,

Aditya