git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SSL Error on Flink-Kafka


Hi Devs,

I am trying to connect to Kaka via SSL and when I run the code on cluster I get bellow SSL error. 
(The code is running on IntelliJ without any issue )

Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id 161
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I had this on my code:
System.setProperty(
  "javax.net.ssl.trustStore", “/Path/to/TrusStore")
System.setProperty(
  "javax.net.ssl.trustStorePassword”, “TrustStore Password")

System.setProperty(
  "javax.net.ssl.keyStore”, “path/to/keyStore")
System.setProperty(
  "javax.net.ssl.keyStorePassword”, “keyStore Password")

also I added this on flink-conf.yml

javax.net.ssl.trustStore: “path to trustStore"
javax.net.ssl.keyStore: “pathToKeyStore"
javax.net.ssl.keyStorePassword: "KeyStorepassword"
javax.net.ssl.trustStorePassword: “TrusStorepassword”

I also ran the code via CLI by passing Java params

./bin/flink run /Users/hnw511/GitHub/DataPipeLine/Enki/harmony-event-pipeline/core/target/ReactiveDecline.jar -Djavax.net.ssl.trustStore=/path/to/truststore.jks

For all of them I get the sun.security.provider.certpath.SunCertPathBuilderException error. 
I am not sure what I am missing and would appreciate any help.

Cheers,
Yaz




( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-flink-development/msg08525.html on line 107
Call Stack
#TimeMemoryFunctionLocation
10.0006364424{main}( ).../msg08525.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-flink-development/msg08525.html on line 107
Call Stack
#TimeMemoryFunctionLocation
10.0006364424{main}( ).../msg08525.html:0