我们有一个StreamAnalyticsJob,我们刚刚注意到它正在进行反序列化事件'失败'在其活动日志中不时记录。
活动日志的JSON中发布的错误是:
"Property with name 'username' already exists."
我们的输入流中没有任何名为username
的属性,除了IOT Hub输入外,我们的工作也不会反序列化任何内容。关于导致失败的原因的任何线索?
以下是从Stream Analytics作业活动日志中检索到的错误的编辑JSON:
{
"channels": "Operation",
"correlationId": "00000000-0000-0000-0000-000000000000",
"description": "",
"eventDataId": "00000000-0000-0000-0000-000000000000",
"eventName": {
"value": "streamingNode0.iot-hub-by-consumer-group_6_00000000_0000_0000_0000_000000000000#9$0",
"localizedValue": "streamingNode0.iot-hub-by-consumer-group_6_00000000_0000_0000_0000_000000000000#9$0"
},
"category": {
"value": "Administrative",
"localizedValue": "Administrative"
},
"eventTimestamp": "2018-02-14T23:08:25.1981067Z",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/red-test-rg/providers/Microsoft.StreamAnalytics/streamingjobs/IOT-Entry-Point/events/00000000-0000-0000-0000-000000000000/ticks/636542465051981067",
"level": "Informational",
"operationId": "00000000-0000-0000-0000-000000000000",
"operationName": {
"value": "Deserialize Events",
"localizedValue": "Deserialize Events"
},
"resourceGroupName": "red-test-rg",
"resourceProviderName": {
"value": "Microsoft.StreamAnalytics",
"localizedValue": "Microsoft.StreamAnalytics"
},
"resourceType": {
"value": "Microsoft.StreamAnalytics/streamingjobs",
"localizedValue": "Microsoft.StreamAnalytics/streamingjobs"
},
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/red-test-rg/providers/Microsoft.StreamAnalytics/streamingjobs/IOT-Entry-Point",
"status": {
"value": "Failed",
"localizedValue": "Failed"
},
"subStatus": {
"value": "",
"localizedValue": ""
},
"submissionTimestamp": "2018-02-14T23:09:01.480545Z",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"properties": {
"Message Time": "2018-02-14 23:08:25Z",
"Error": "",
"Message": "Property with name 'username' already exists.",
"Type": "SerializerError",
"Correlation ID": "00000000-0000-0000-0000-000000000000"
},
"relatedEvents": []
}
上面的JSON中是否有关于导致问题的确切输入消息的线索?
答案 0 :(得分:0)
反序列化错误应包括消息分区ID和偏移量,您可能希望检索原始消息并检查有效负载是否为有效JSON。
https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-malformed-events
答案 1 :(得分:0)
在您的活动日志中,选择诊断错误,而不是snapshot中突出显示的反序列化事件。然后你应该看到类似的东西:
"properties": {
"Message Time": "2018-03-20 21:13:12Z",
"Error": null,
"Message": "First Occurred: 03/20/2018 21:13:10 | Resource Name: ehIncorrectJson | Message: Could not deserialize the input event(s) from resource 'Partition: [0], Offset: [3936], SequenceNumber: [69]' as Json. Some possible reasons: 1) Malformed events 2) Input source configured with incorrect serialization format",
"Type": "DiagnosticMessage",
"Correlation ID": "42d778ec-bd2c-42a0-87be-212245d2c28b"
},
然后,您可以使用消息字段中的信息进行调试,如他指出的那样。