提示远程主机强迫关闭了一个现有的连接 这个要哪里设置下啊
提示远程主机强迫关闭了一个现有的连接 这个要哪里设置下啊
对应的英文错误详细信息```
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
后者可以使用组策略:开始菜单运行栏输入 gpedit.msc 访问本地组策略编辑器,计算机配置——管理模板——网络——SSL配置设置——SSL密码套件顺序——已启用。或者 PowerShell 脚本——
foreach ($CipherSuite in $(Get-TlsCipherSuite).Name)
{
if ( $CipherSuite.substring(0,7) -eq "TLS_DHE" )
{
"Disabling cipher suite: " + $CipherSuite
Disable-TlsCipherSuite -Name $CipherSuite
}
else
{
"Existing enabled cipher suite will remain enabled: " + $CipherSuite
}
}
前者需要安装补丁或升级系统。
>+ Windows Server 2016, version 1607
+ KB 4537806: February 25, 2020-KB4537806 (OS Build 14393.3542)
+ KB 4540670: March 10, 2020-KB4540670 (OS Build 14393.3564)
+ Updates that supersede KB4537806 and KB4540670 for the respective OS versions
+ Windows Server 2019 RTM and later versions.
+ Windows 10, version 1511, and later versions of Windows 10
当然可以查看一下SQLServer中有无错误日志。尝试其他客户端看能否正常连接,检查防火墙设置,检查 SSL/TLS 设置, SQL Server 配置管理器下是否启用了TCP/IP协议等等。
@geyee 奇怪,连接和部分内容被吞了,参考自 Applications experience forcibly closed TLS connection errors when connecting SQL Servers in Windows。官方的文章个人理解是客户端和服务端是否包含前导0补丁更新导致的使用 TLS_DHE 时计算值不同,而连接被关闭。解决方法是要么安装补丁或升级系统,要么禁用 TLS_DHE 。