microsoft / mssql-jdbc

The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity with SQL Server through the standard JDBC application program interfaces (APIs).
MIT License
1.06k stars 424 forks source link

[QUESTION] SQL Connection failing with JDBC Driver #1463

Closed senthiltk closed 3 years ago

senthiltk commented 3 years ago

Question

JDBC connections are failing with with exception in FINE level for

[FINE   ] 
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2435)
com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1991)
com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6310)
com.microsoft.sqlserver.jdbc.TDSReader.nextPacket(IOBuffer.java:6269)
com.microsoft.sqlserver.jdbc.TDSReader.ensurePayload(IOBuffer.java:6247)
com.microsoft.sqlserver.jdbc.TDSReader.readBytes(IOBuffer.java:6531)
com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:833)
com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:821)
com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:1003)
com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:985)
com.cisco.ciscossl.provider.ciscojce.ssl.OpenSSLBIOInputStreamRawTLS$BackgroundReader.run(OpenSSLBIOInputStreamRawTLS.java:78)

Wireshark recording shows that connection was reset. How can we further debug to see the cause for this issue.

image

I tried both Sql Server JDBC 6 & 7. Both versions I am running in to this issue.

Relevant Issues and Pull Requests

rene-ye commented 3 years ago

What do you mean by "I tried both SQL Server JDBC 6 & 7"? If you're using a version of mssql-jdbc that supports Java 6 and Java 7, then the driver is out of support. If you're connecting to a more recent version of SQL Server with those drivers, the login packet might not be what it needs to be and in that scenario your connection will be terminated by the server. Please provide the mssql-jdbc driver version and SQL Server version.

peterbae commented 3 years ago

Hi @senthiltk, any updates on this issue?

senthiltk commented 3 years ago

Hi @senthiltk, any updates on this issue?

Hi @peterbae,

Apologies for the delayed response, we worked around this by using a different provider. We are not looking for a fix for this issue now, so closing this issue.

Thanks for the support, -Senthil

fapinheiro commented 2 years ago

different provider.

Hi @senthiltk , could please tell me which driver have you used so far? I've been struggling with the same problem.

Many thxs