无法为事件网格创建 Webhook 订阅
Unable to create Webhook Subscription for Event-Grid
我从昨天开始就遇到了 Azure Event-Grid 的这个问题,我找不到哪里做错了。
我使用下面的 link 在 azure cli 中创建自定义事件网格主题。
https://docs.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-create-custom-topic
并使用下面的 link 来处理端点端的验证。
https://docs.microsoft.com/en-us/azure/event-grid/receive-events
并使用以下负载进行测试
[{
"subject": "Contoso/foo/bar/items",
"eventType": "Microsoft.EventGrid.SubscriptionValidationEvent",
"eventTime": "2017-08-16T01:57:26.005121Z",
"id": "602a88ef-0001-00e6-1233-1646070610ea",
"data": {
"validationCode": "123456789"
},
"dataVersion": "",
"metadataVersion": "1"
}]
并返回 123456789 和 200 响应。
当我 运行 下面 link 处的命令时,出现此错误。
Deployment failed. Correlation ID:
6acbe8ab-1bf5-4f35-b133-9c907c2e2545. The operation failed due to an
internal server error. The initial state of the impacted resources (if
any) are restored. Please try again in few minutes. If error still
persists, report 05a94a7a-b132-451b-90ff-ceb2f5d587ae:6/3/2020 3:49:40
PM (UTC) to our forums for assistance or raise a support ticket .
https://docs.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-subscribe-custom-topic
非常感谢
我缺少验证握手的实现(在你的 webhook 实现中),但如果你刚刚 returned 了你的 HTTP-200 响应中的“123456789”,这可能就是原因。
您必须 return 一个 json 负载,其中包含您的代码,如下所示:
{
"validationResponse": "123456789"
}
更详细的解释在docs.
我从昨天开始就遇到了 Azure Event-Grid 的这个问题,我找不到哪里做错了。
我使用下面的 link 在 azure cli 中创建自定义事件网格主题。 https://docs.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-create-custom-topic
并使用下面的 link 来处理端点端的验证。 https://docs.microsoft.com/en-us/azure/event-grid/receive-events
并使用以下负载进行测试
[{
"subject": "Contoso/foo/bar/items",
"eventType": "Microsoft.EventGrid.SubscriptionValidationEvent",
"eventTime": "2017-08-16T01:57:26.005121Z",
"id": "602a88ef-0001-00e6-1233-1646070610ea",
"data": {
"validationCode": "123456789"
},
"dataVersion": "",
"metadataVersion": "1"
}]
并返回 123456789 和 200 响应。
当我 运行 下面 link 处的命令时,出现此错误。
Deployment failed. Correlation ID: 6acbe8ab-1bf5-4f35-b133-9c907c2e2545. The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report 05a94a7a-b132-451b-90ff-ceb2f5d587ae:6/3/2020 3:49:40 PM (UTC) to our forums for assistance or raise a support ticket .
https://docs.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-subscribe-custom-topic
非常感谢
我缺少验证握手的实现(在你的 webhook 实现中),但如果你刚刚 returned 了你的 HTTP-200 响应中的“123456789”,这可能就是原因。
您必须 return 一个 json 负载,其中包含您的代码,如下所示:
{
"validationResponse": "123456789"
}
更详细的解释在docs.