Hi Stefan,
This looks like a JDBC driver issue with TLS, it could be either that TLS is 
not enabled or that there is an error in establishing the session. The link 
below described a very similar issue with the mssql-jdbc driver, you could try 
their suggested workaround of setting sslProtocol=TLSv1 to see is that helps. 

https://github.com/Microsoft/mssql-jdbc/issues/879 
<https://github.com/Microsoft/mssql-jdbc/issues/879>

There’s a link to a Microsoft article in this issue that suggests upgrading you 
JDBC driver to version 4.2 or later, I’d recommend trying that. I’d not 
recommend leaving sslProtocol=TLSv1 in as a long term solution because you’re 
effectively reducing the strength of the TLS implementation used by doing so.

Regards,
Jim


> On 21 Sep 2021, at 09:30, Stefan Kok <[email protected]> wrote:
> 
> Hi Everyone
> 
> I am unable to establish a JDBC connection to a MS SQL 2012 server 
> below I have listed all the details relating to this problem.
> 
> Thank you in advance
> 
> Regards
> Stefan
> 
> ************************************************************
> ************************************************************
> 
> NIFI:
> 1.14.0
> 
> uname -a:
> 5.13.14-200.fc34.x86_64 #1 SMP Fri Sep 3 15:33:01 UTC 2021 x86_64
> x86_64 x86_64 GNU/Linux
> 
> Java:
> OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
> OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode, sharing)
> 
> JDBC URL:
> jdbc:sqlserver://;serverName=db.xxxxx.xxx.xxx;databaseName=master;trust
> ServerCertificate=true;sslProtocol=TLS
> 
> MS SQL Server:
> Ms SQL server 2010
> 
> OS:
> Windows Server 2012 R2
> 
> ERROR:
> 10:11:42 SASTERRORf312e911-017b-1000-7f31-6ce540797406
> GenerateTableFetch[id=f312e911-017b-1000-7f31-6ce540797406] Failed to
> process session due to java.sql.SQLException: Cannot create
> PoolableConnectionFactory (The driver could not establish a secure
> connection to SQL Server by using Secure Sockets Layer (SSL)
> encryption. Error: "Unexpected rethrowing".): java.io.IOException: SQL
> Server did not return a response. The connection has been closed.
> ClientConnectionId:20991be1-62eb-424a-9df0-5868eb642a12
> ↳ causes: javax.net.ssl.SSLException: Unexpected rethrowing
> ↳ causes: com.microsoft.sqlserver.jdbc.SQLServerException: The driver
> could not establish a secure connection to SQL Server by using Secure
> Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing".
> ↳ causes: java.sql.SQLException: Cannot create
> PoolableConnectionFactory (The driver could not establish a secure
> connection to SQL Server by using Secure Sockets Layer (SSL)
> encryption. Error: "Unexpected rethrowing".)
> ↳ causes: org.apache.nifi.processor.exception.ProcessException:
> java.sql.SQLException: Cannot create PoolableConnectionFactory (The
> driver could not establish a secure connection to SQL Server by using
> Secure Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing".)
> 
> 

Reply via email to