DataikuException: java.lang.RuntimeException: Failed to resolve connection settings
client = dataiku.api_client()
connection_info = client.get_connection('project_name').get_info() #error in this line i.e., subject.
Error in Python process: At line 160: <class 'Exception'>: None: b'Failed to connect to S3, caused by: RuntimeException: Failed to resolve connection settings, caused by: IllegalArgumentException: Failed to acquire credentials, caused by: SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, caused by: ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, caused by: SunCertPathBuilderException: unable to find valid certification path to requested target'
I cannot get s3 credentials and connect to the s3 bucket.
Please help all the pipelines are failing.
Answers
-
JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 296 Dataiker
Hi @goku
,First, instead of passing the project name to the get_connection method, you need to pass the name of the connection. Furthermore, this method does not connect to the S3 bucket, it is a handle to the connection that you defined in DSS. Please see the DSS Python API connection documentation: https://developer.dataiku.com/latest/api-reference/python/client.html#dataikuapi.DSSClient.get_connection
The "unable to find valid certification path to requested target" error suggests that the SSL certificate on the endpoint you are reaching is either self-signed or signed by your own CA. If self-signed, then you will need to add the rootCA certificate you have used to sign it. If the certificate was signed by your internal CA, then you will need to add that certificate as well to the Java Truststore:
https://doc.dataiku.com/dss/latest/installation/custom/advanced-java-customization.html#adding-ssl-certificates-to-the-java-truststoreYou can also add the following line to disable SSL certificate check:client._session.verify = FalseThanks,Jordan