1

i am trying to access hive which is running on on-prmisis from a glue job

As hive use jdbc connection which requires authentication, i attached certificate(certificate.pem) in the job(using connection) and trying to load the table with below code:

Glue version: 2 spark:2.4

jdbcDF = spark.read \
    .format("jdbc") \
    .option("url", "jdbc:hive2://bigdatamr:10000/mydb;ssl=true;transportMode=http;httpPath=gateway/default/hive;trustStorePassword=selfSigned") \
    .option("dbtable", "mydb") \
    .option("user", "myusername") \
    .option("password", "xxxxxxx") \
    .load()

but job return below error:

javax.net.ssl.sslhandshakeexception pkix path building failed sun.security.provider.certpath
unable to find valid certification path to requested target

how to resolve this ?

user207421
  • 305,947
  • 44
  • 307
  • 483
cloud_hari
  • 147
  • 1
  • 8
  • Does this answer your question? ["PKIX path building failed" and "unable to find valid certification path to requested target"](https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ) – user207421 Mar 01 '22 at 09:34
  • I don't think so since the above solution related to jvm and not to spark running on AWS-glue where attaching certificate is parameterized from s3.. – cloud_hari Mar 01 '22 at 09:45

0 Answers0