#1 2019-10-21 09:20:17

taksama
Member
Registered: 2018-11-07

Error JDBC connect to MS SQLServer 2008R2

An error occurs while connecting to the data source.
Error:
Could not open connection to: jdbc:sqlserver://{ip}:1433;databaseName={database} with user: sa. com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "java.security.cert.CertificateException: Certific

1.Connect from ReportServer:
Fedora 29 (Server), Apache Tomcat 9.0.13, ReportServer RS3.0.5-6005 + JDBC: mssql-jdbc-7.0.0.jre8.jar
2.Connect to MS SQLServer 2008R2
3.Connect string:
jdbc:sqlserver://{ip}:1433;databaseName={database}

Normal connect from Windows 10:
iReport (Java (build 1.7.0_80-b15)) + JDBC: sqljdbc41.jar
MS SQLServer 2008R2
jdbc:sqlserver://{ip}:1433;databaseName={database}

Normal connect from ReportServer:
Fedora 29 (Server), Apache Tomcat 9.0.13, ReportServer RS3.0.5-6005 + JDBC: mssql-jdbc-7.0.0.jre8.jar
MS SQLServer 2017
jdbc:sqlserver://{ip}:1433;databaseName={database}

Tried different options in the connection line JDBC:
integratedSecurity=true/false
encrypt=true/false
trustServerCertificate=true/false

Сan anyone tell you how to properly resolve the issue.

Offline

#2 2019-10-21 09:35:17

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error JDBC connect to MS SQLServer 2008R2

Hi taksama,

are you trying to do a "normal" connection or a secure connection?

Anyway, in your "normal connect from windows 10" I see you use the driver: sqljdbc41.jar
But in reportserver you are trying with the driver "mssql-jdbc-7.0.0.jre8.jar".

Please try with the same  sqljdbc41.jar driver it is working from windows. And don't forget to delete the mssql-jdbc-7.0.0.jre8.jar.

Does it work with this driver ?

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB