Getting Data In

How to fix MSSQL DB Connect Validation Error

Footoasis0868
Explorer

Hi all,

I have trouble connecting my test MSSQL with DB Connect.

Screenshot_1.png

I am able to connect the DB using DBVisualizer using the credential I use for the identity.

I am using the Generic MSSQL Driver:

Clipboard01.png

 

The log:

 

 

2022-05-27 21:37:44.537 +0800  [dw-59 - GET /api/connections/mssql-test/status] INFO  com.splunk.dbx.connector.logger.AuditLogger - operation=validation connection_name=mssql-test stanza_name= state=error sql='unknown' message='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:da36105c-f9e9-44e9-aeeb-023742b9a4eb'

 

 

 

I don't know why the error log shows SSL error when I have not enabled SSL for the connection.

Below is the db_connections.conf

 

 

[mssql-test]
connection_type = generic_mssql
database = master
disabled = 0
host = 192.168.74.238
identity = mssql-test
jdbcUseSSL = false
localTimezoneConversionEnabled = false
port = 1433
readonly = false
timezone = Etc/GMT

 

 

 

Thanks in advance.

 

Labels (1)
0 Karma
1 Solution

Footoasis0868
Explorer

I found the solution and I hope this can help somebody somewhere in the future.

 

For some reasons, the Generic MSSQL driver has enabled TLS encryption connection by default.

 

All you have to do is to add the following driver property in the key value to disable the encryption connection:

 

Screenshot_1.png

View solution in original post

Imadam
Observer

Hello, 

After adding that property I have now error:

The driver could not establish a secure connection to SQL Server 
by using Secure Sockets Layer (SSL) encryption.
Error: "Certificates do not conform to algorithm constraints". ClientConnectionId:f6d04b57-f4f7-4bc2-93ca-d3ac59ad7b4b

Splunk: 9.0.4.1

Db Connect: 3.14.1

Java: openjdk 17.0.8.1

 

Funny thing i don't have that problem on other server

Splunk: 9.0.4.1

DB Connect: 3.12.2

Java: openjdk 17.0.7

0 Karma

Footoasis0868
Explorer

I found the solution and I hope this can help somebody somewhere in the future.

 

For some reasons, the Generic MSSQL driver has enabled TLS encryption connection by default.

 

All you have to do is to add the following driver property in the key value to disable the encryption connection:

 

Screenshot_1.png

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...