I am Running spark in cluster mode which is giving error as
ERROR SslEngineBuilder: Modification time of key store could not be obtained: hdfs://ip:port/user/hadoop/jks/kafka.client.truststore.jks
java.nio.file.NoSuchFileException: hdfs:/ip:port/user/hadoop/jks/kafka.client.truststore.jks
I ran below command and verified that jks
files are present at the location.
hadoop fs -ls hdfs://ip:port/user/hadoop/\<folder1\>
I have written below code to connect to kafka in spark project.
Spark Code:
sparkSession.readStream
.format("kafka")
.option("kafka.bootstrap.servers", )
.option("subscribe", )
...
.option("kafka.ssl.keystore.password", "pswd")
.option("kafka.ssl.key.password", "pswrd"))
.option("kafka.ssl.truststore.location","hdfs:///node:port/user/hadoop/\<folder1\>/kafka.client.truststore.jks")
.option("kafka.ssl.keystore.location", "hdfs:///node:port/user/hadoop/\<folder1\>/kafka.client.keystore.jks")
- Please suggest what is missing?
- How to achieve the same with
jks
file in s3?