应用连接sql server2005与sql server 2016 报错提示数据库无响应
情况简介:
1.老系统数据库版本sql server2005、数据库连接池dbcp,没有强制配置加密验证;
2.新系统应用jdk版本 1.8;
3.在合肥服务器上ping上海服务器能正常ping通,Telnet也正常;
4.上海数据库没有接收到连接日志;
5.新服务器(合肥)上应用启动报错,获取老服务器(上海)数据库连接无响应,报错信息为“sql server did not return a response”,详情见文末图片。
所做尝试:
1.连接驱动sqljdbc4和sqljdbc42都失败;
2.数据库连接字符串SSL配置设为false也连接失败;
3.只要在新服务器(合肥)上面启应用,都连不上老服务器(上海)的数据库。
解决方法:https://blog.****.net/tanhongwei1994/article/details/84957254
# Example:
# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
#
jdk.tls.legacyAlgorithms= \
K_NULL, C_NULL, M_NULL, \
DH_anon, ECDH_anon, \
RC4_128, RC4_40, DES_CBC, DES40_CBC, \
#3DES_EDE_CBC
注释掉3DES意味着 禁止这个加密方法使用
Note that this is a low-risk change. It is unlikely to cause a regression since it just affects the order of the negotiated algorithms. 3DES would still be used, if listed on the legacy algorithm list, if no other non-legacy algorithm is available.
请注意,这是一个低风险的更改。它不太可能导致回归,因为它只会影响协商算法的顺序。如果没有其他非遗留算法可用并且3DES在遗留算法列表上列出,则仍将使用3DES。