none
SQLServer2008R2 开启强制SSL加密(想要咨询有没有这方面的案例或者解决方案) RRS feed

  • 问题

  • SQLServer2008R2 开启强制SSL加密,使用的是iis生成的自签名证书和通过AD证书管理生成的证书(两者都试过) 使用jdbc连接驱动java语言进行连接时 报 “Connection reset” 错误 

    连接驱动 :String DBDriver="com.microsoft.sqlserver.jdbc.SQLServerDriver";

    String Url="jdbc:sqlserver://192.168.1.124:1433;databaseName=TEST;encrypt=true;SERVER=WIN-3J8GL2DMQ1P";

    错误信息:

    com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2435)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1991)
    at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6310)
    at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7545)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:843)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:752)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:654)
    at dylantest.TestSSLConnection.main(TestSSLConnection.java:32)
    Caused by: java.net.SocketException: Connection reset
    2017年8月24日 9:50