为什么AzureSearch SDK会因传输连接问题而自发失败? [英] Why would AzureSearch SDK spontaneously fail with transport connection issue?

查看:78
本文介绍了为什么AzureSearch SDK会因传输连接问题而自发失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我们有些激动.我们使用AzureSearch SDK的两个Web应用程序(都已部署并且至少三个月未使用)在不同时间(一个清晨;另一个在晚上)停止工作. indexClient.Documents.Search方法因以下错误而开始失败:

We had some big excitement yesterday. Two of our web apps (both deployed and untouched for at least 3 months) that use AzureSearch's SDK stopped working at different times (one early morning; the other in the evening). The indexClient.Documents.Search method started failing with this error:

到XXXXsearch.search.windows.net的HTTPS握手(用于#435)失败. System.IO.IOException无法从传输连接中读取数据:现有连接被远程主机强行关闭. <远程主机强行关闭了现有连接

经过疯狂的google争夺之后,我们在修复它的搜索之前添加了这3行.

After a mad google scramble we added these 3 lines just before the search which fixed it.

            const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
            const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
            ServicePointManager.SecurityProtocol = Tls12;

我能想象的是我们错过了某种"AzureSDK正在更改"电子邮件吗?这非常糟糕,我们很幸运能找到一个快速的解决方案,否则可能是一场灾难.有谁知道为什么会这样?

All I can imagine is we missed some kind of "AzureSDK is changing" email? This was very bad and we got lucky on a quick solution or it could have been a disaster. Does anyone know why this would have happened?

推荐答案

我是Azure认知搜索工程团队的程序经理.首先,很遗憾得知您和其他人遇到客户端连接问题,原因是最新的服务更新删除了对TLS 1.0和1.1的支持.这些类型的更改很少见,我们努力在任何更新中都不会破坏客户代码.在这种情况下,至关重要的是帮助保护通过Internet传递的信息的隐私. TLS 1.2是一项标准,可提供比以前版本更高的安全性.您可以在此处了解更多信息.

I am a Program Manager in the Azure Cognitive Search engineering team. First off, I am sorry to hear that you and others had client connectivity issues due to the latest service update that removed support for TLS 1.0 and 1.1. These types of changes are rare and we strive to never break customer code in any update. In this case, it was critical to help protect the privacy of information communicated over the Internet. TLS 1.2 is a standard that provides security improvements over previous versions. You can learn more about this here.

有关如何解决此问题的更多信息,请参见这里.我们强烈建议您避免对TLS版本进行硬编码(如上所述),因为TLS 1.2最终将被最新发布的标准TLS 1.3所取代,该标准更快且具有更高的安全性.最好让.NET或OS为您选择TLS版本,但这在上面的链接中有更多讨论.

More information on how to resolve this issue can be found here. We strongly recommend that you avoid hard coding the TLS version (as mentioned above), as TLS 1.2 will eventually be replaced by the newest released standard TLS 1.3 which is faster and has improved security. It is better to let .NET or the OS choose the TLS version for you but that is discussed more in the above links.

我们已于1月初在门户网站上发送了有关此即将发生的更改的通知,但我们意识到很容易错过这些通知,并对由此引起的问题深表歉意.请知道我们想尽力提供帮助.由于要求我们不要使用StackOverflow来帮助解决个别支持案例,因此,如果您需要有关服务的个别帮助,我们将要求您打开

We had sent a notification on this upcoming change in the portal in early January, but we realize that it is easy to miss these and apologize for the issues it has subsequently caused. Please know we want to do what we can to help. Since we are asked not to use StackOverflow to help resolve individual support cases, if you would like individual help regarding your service, we would ask you to open a support case.

这篇关于为什么AzureSearch SDK会因传输连接问题而自发失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆