[英]Creating Azure Event Grid webhook subscription fails TLS handshake
Trying to create a webhook subscription to an Event Grid topic fails with an error reported in the Azure portal:尝试创建事件网格主题的 Webhook 订阅失败,并在 Azure 门户中报告错误:
Deployment has failed with the following error..."Webhook validation handshake failed for https://xxx.xxx.xxx.xxx:10443/event . Http POST request failed with response code Unknown部署失败,出现以下错误...“ https://xxx.xxx.xxx.xxx:10443/event 的Webhook 验证握手失败。Http POST 请求失败,响应代码未知
My webhook is a .NET core test app using a Kestrel server.我的 webhook 是一个使用 Kestrel 服务器的 .NET 核心测试应用程序。 I can see from logging that there is an incoming connection from Azure when I try to create the subscription, but this is immediately followed by a disconnect.我可以从日志中看到,当我尝试创建订阅时,有来自 Azure 的传入连接,但随后立即断开连接。
Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HMCE876DPTD6" accepted. Microsoft.AspNetCore.Server.Kestrel:调试:接受连接 ID“0HMCE876DPTD6”。 Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HMCE876DPTD6" started. Microsoft.AspNetCore.Server.Kestrel:调试:连接 ID“0HMCE876DPTD6”已启动。 Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets: Debug: Connection id "0HMCE876DPTD6" received FIN. Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets:调试:连接 ID“0HMCE876DPTD6”收到 FIN。 Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets: Debug: Connection id "0HMCE876DPTD6" sending FIN because: "The client closed the connection." Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets:调试:连接 ID“0HMCE876DPTD6”发送 FIN,因为:“客户端关闭了连接。” Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HMCE876DPTD6" disconnecting. Microsoft.AspNetCore.Server.Kestrel:调试:连接 ID“0HMCE876DPTD6”正在断开连接。 Microsoft.AspNetCore.Server.Kestrel: Debug: Connection id "0HMCE876DPTD6" stopped. Microsoft.AspNetCore.Server.Kestrel:调试:连接 ID“0HMCE876DPTD6”已停止。
It appears that there is an error during the TLS handshake. TLS 握手过程中出现错误。 Are there any specific requirements for TLS for the webhook. webhook 的 TLS 是否有任何特定要求。 I'm using the default certificate ("ASP.NET Core HTTPS development certificate").我使用的是默认证书(“ASP.NET Core HTTPS 开发证书”)。 This won't be trusted by Azure - is that a problem?这不会被 Azure 信任 - 这是一个问题吗?
As per the documentation Using self-signed certificates for validation isn't supported.根据文档不支持使用自签名证书进行验证。 You need to use a signed certificate from a commercial certificate authority (CA) instead.您需要使用来自商业证书颁发机构 (CA) 的签名证书。 You can also go through this troubleshooting document if it helps.如果有帮助,您也可以阅读此故障排除文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.