我正在使用 jTDS JDBC SQLServer 库连接到 SQL Server 2008 数据库。它总是在没有 SSL 的情况下工作,但是一旦我们启用它,我就无法连接它。我已经跟踪了如下所示的 Java 并检查了数据库端的日志,并且身份验证工作正常,但在尝试执行查询时立即断开连接。有人见过这个问题吗?
main, received EOFException: ignored
main, called closeInternal(false)
main, SEND TLSv1 ALERT: warning, description = close_notify
Padded plaintext before ENCRYPTION: len = 32
0000: 01 00 DF 4A F1 23 CF E7 6B 62 3D 7D 4D CD C9 AD ...J.#..kb=.M...
0010: 26 7B 16 59 84 9A 09 09 09 09 09 09 09 09 09 09 &..Y............
main, WRITE: TLSv1 Alert, length = 32
[Raw write]: length = 37
0000: 15 03 01 00 20 12 0A 45 80 96 80 F8 04 62 2F 62 .... ..E.....b/b
0010: E0 35 B9 4D 67 B0 4D D7 AC 9C CF C7 57 CA E1 B2 .5.Mg.M.....W...
0020: 9F DC BA 5E F8 ...^.
main, called closeSocket(selfInitiated)
main, called close()
main, called closeInternal(true)
java.sql.SQLException: I/O Error: DB server closed connection.
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1053)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:465)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1304)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:390)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at getConnection.main(getConnection.java:25)
Caused by: java.io.IOException: DB server closed connection.
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:848)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:727)
at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
at net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:88)
at net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3932)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1046)