SQL Connection Issue

Jhun
Level 2
SQL Connection Issue

Hi Everyone.

Just setting up our first Dataiku system on a virtual box and I stumbled at this SQL connection issue. I did try to go through all the similar issue on the community and tried all the advices but still can't seem to jump this. At first it only looks like a driver issue but it seems not at simple as it looks. 

Error:  Connection failed: Failed to load database driver: Failed to load JDBC driver        (com.microsoft.sqlserver.jdbc.SQLServerDriver), caused by: ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

* I think I have placed the JDBC driver  at the right directory as shown  on the photo

* I have also Stopped and Started the box after putting the JDBC driver

* With similar issue some members did try to play with JDBC driver versions. I also tried by the latest JDBC driver until the version advice on the documentation.

Thank you so much in advance. 


Operating system used: Microsoft DataCenter 2019


Operating system used: Microsoft DataCenter 2019

0 Kudos
5 Replies
Jhun
Level 2
Author

Managed to jumped through this issue but another issue came out. (Grabbed screen attached)

Not sure what is this now.

Can you please help? 

Thank you.

0 Kudos
Jhun
Level 2
Author

Im not sure what error this is.

 

Connection failed: Failed to reach database: Failed to connect to database, caused by: SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:35f8310e-f5da-45e6-ad87-c08823f0be46, 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


Operating system used: Microsoft DataCenter 2019


Operating system used: Microsoft DataCenter 2019

0 Kudos
Turribeach

You are getting this error since your SQL Server is enforcing SSL encryption but the SSL certificate presented by the SQL Server is either self signed or signed by CA root certificate your DSS server doesn't trust. 

0 Kudos
Jhun
Level 2
Author

Thank you. What do you suggest please as a solution?

0 Kudos
quentincastel
Dataiker

Solving this kind of SSL trust is not trivial if you are not used to manipulate certificate.

 

The way to go is first verifying what is the certificate used by the SQL server. If it is indeed self-signed or issued by an untrusted CA, then you got two options:

- You decide to trust them and add their certificate in the DSS JVM trust store. This is typically something you can do if it is your company server and the certificate used is an internal certificate. 

- You are not able to verify the server and not really sure why they are using a untrusted cert. Then perhaps just raise a ticket on their side to understand if it is something they are aware and what they recommend. (Perhaps you are pointing to a legacy server etc). Personally I would not just add their certificate in my trust store until I get a good picture of why they are using such certificate.

 

If you decide to go to trust this server certificate, what you need to do is download their public certificate or their public CA certificate and add it to the trust store of DSS.

DSS uses Java, you can simply add it to the JVM trust store. https://connect2id.com/blog/importing-ca-root-cert-into-jvm-trust-store

0 Kudos