You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/stream-analytics/stream-analytics-troubleshoot-input.md
+21-29Lines changed: 21 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,69 +6,60 @@ ms.author: sidram
6
6
ms.reviewer: mamccrea
7
7
ms.service: stream-analytics
8
8
ms.topic: conceptual
9
-
ms.date: 12/07/2018
9
+
ms.date: 03/31/2020
10
10
ms.custom: seodec18
11
11
---
12
12
13
13
# Troubleshoot input connections
14
14
15
-
This page describes common issues with input connectionsand how to troubleshoot them.
15
+
This article describes common issues with Azure Stream Analytics input connections, how to troubleshoot input issues, and how to correct the issues. Many troubleshooting steps require diagnostic logs to be enabled for your Stream Analytics job. If you do not have diagnostic logs enabled, see [Troubleshoot Azure Stream Analytics by using diagnostics logs](stream-analytics-job-diagnostic-logs.md).
16
16
17
17
## Input events not received by job
18
-
1. Test your connectivity. Verify connectivity to inputs and outputs by using the **Test Connection** button for each input and output.
18
+
19
+
1. Test your input and output connectivity. Verify connectivity to inputs and outputs by using the **Test Connection** button for each input and output.
19
20
20
21
2. Examine your input data.
21
22
22
-
1. To verify that input data is flowing into Event Hub, use [Service Bus Explorer](https://code.msdn.microsoft.com/windowsapps/Service-Bus-Explorer-f2abca5a) to connect to Azure Event Hub (if Event Hub input is used).
23
-
24
23
1. Use the [**Sample Data**](stream-analytics-sample-data-input.md) button for each input. Download the input sample data.
25
24
26
-
1. Inspect the sample data to understand the shape of the data--that is, the schema and [data types](https://docs.microsoft.com/stream-analytics-query/data-types-azure-stream-analytics).
25
+
1. Inspect the sample data to understand the schema and [data types](https://docs.microsoft.com/stream-analytics-query/data-types-azure-stream-analytics).
26
+
27
+
1. Check [Event Hub metrics](../event-hubs/event-hubs-metrics-azure-monitor.md) to ensure events are being sent. Message metrics should be greater than zero if Event Hubs is receiving messages.
27
28
28
29
3. Ensure that you have selected a time range in the input preview. Choose **Select time range**, and then enter a sample duration before testing your query.
Deserialization issues are caused when the input stream of your Stream Analytics job contains malformed messages. For example, a malformed message could be caused by a missing parenthesis or a brace in a JSON object, or an incorrect timestamp format in the time field.
32
+
33
+
Deserialization issues are caused when the input stream of your Stream Analytics job contains malformed messages. For example, a malformed message could be caused by a missing parenthesis, or brace, in a JSON object or an incorrect timestamp format in the time field.
32
34
33
-
When a Stream Analytics job receives a malformed message from an input, it drops the message and notifies you with a warning. A warning symbol is shown on the **Inputs** tile of your Stream Analytics job. This warning sign exists as long as the job is in running state:
35
+
When a Stream Analytics job receives a malformed message from an input, it drops the message and notifies you with a warning. A warning symbol is shown on the **Inputs** tile of your Stream Analytics job. The following warning symbol exists as long as the job is in running state:
Enable the diagnostics logs to view the details of the warning. For malformed input events, the execution logs contain an entry with the message that looks like:
38
-
```
39
-
Could not deserialize the input event(s) from resource <blob URI> as json.
40
-
```
41
-
42
-
### What caused the deserialization error
43
-
You can take the following steps to analyze the input events in detail to get a clear understanding of what caused the deserialization error. You can then fix the event source to generate events in the right format to prevent you from hitting this issue again.
44
-
45
-
1. Navigate to the input tile and click on the warning symbols to see the list of issues.
39
+
Enable diagnostics logs to view the details of the error and the message (payload) that caused the error. There are multiple reasons why deserialization errors can occur. For more information regarding specific deserialization errors, see [Input data errors](data-errors.md#input-data-errors). If diagnostic logs are not enabled, a brief notification will be available in the Azure portal.
46
40
47
-
2. The input details tile displays a list of warnings with details about each issue. The example warning message below includes the partition, offset, and sequence numbers where there is malformed JSON data.

50
-
51
-
3. To find the JSON data with the incorrect format, run the CheckMalformedEvents.cs code available in the [GitHub samples repository](https://github.com/Azure/azure-stream-analytics/tree/master/Samples/CheckMalformedEventsEH). This code reads the partition ID, offset, and prints the data that's located in that offset.
43
+
In cases where the message payload is greater than 32 KB or is in binary format, run the CheckMalformedEvents.cs code available in the [GitHub samples repository](https://github.com/Azure/azure-stream-analytics/tree/master/Samples/CheckMalformedEventsEH). This code reads the partition ID, offset, and prints the data that's located in that offset.
52
44
53
-
4. Once you read the data, you can analyze and correct the serialization format.
45
+
## Job exceeds maximum Event Hub receivers
54
46
55
-
5. You can also [read events from an IoT Hub with the Service Bus Explorer](https://code.msdn.microsoft.com/How-to-read-events-from-an-1641eb1b).
56
-
57
-
## Job exceeds maximum Event Hub Receivers
58
-
A best practice for using Event Hubs is to use multiple consumer groups to ensure job scalability. The number of readers in the Stream Analytics job for a specific input affects the number of readers in a single consumer group. The precise number of receivers is based on internal implementation details for the scale-out topology logic and is not exposed externally. The number of readers can change when a job is started or during job upgrades.
47
+
A best practice for using Event Hubs is to use multiple consumer groups for job scalability. The number of readers in the Stream Analytics job for a specific input affects the number of readers in a single consumer group. The precise number of receivers is based on internal implementation details for the scale-out topology logic and is not exposed externally. The number of readers can change when a job is started or during job upgrades.
59
48
60
49
The error shown when the number of receivers exceeds the maximum is:
50
+
61
51
`The streaming job failed: Stream Analytics job has validation errors: Job will exceed the maximum amount of Event Hub Receivers.`
62
52
63
53
> [!NOTE]
64
54
> When the number of readers changes during a job upgrade, transient warnings are written to audit logs. Stream Analytics jobs automatically recover from these transient issues.
65
55
66
56
### Add a consumer group in Event Hubs
57
+
67
58
To add a new consumer group in your Event Hubs instance, follow these steps:
68
59
69
60
1. Sign in to the Azure portal.
70
61
71
-
2. Locate your Event Hubs.
62
+
2. Locate your Event Hub.
72
63
73
64
3. Select **Event Hubs** under the **Entities** heading.
74
65
@@ -80,8 +71,7 @@ To add a new consumer group in your Event Hubs instance, follow these steps:
80
71
81
72

82
73
83
-
7. When you created the input in the Stream Analytics job to point to the Event Hub, you specified the consumer group there. $Default is used when none is specified. Once you create a new consumer group, edit the Event Hub input in the Stream Analytics job and specify the name of the new consumer group.
84
-
74
+
7. When you created the input in the Stream Analytics job to point to the Event Hub, you specified the consumer group there. **$Default** is used when none is specified. Once you create a new consumer group, edit the Event Hub input in the Stream Analytics job and specify the name of the new consumer group.
85
75
86
76
## Readers per partition exceeds Event Hubs limit
87
77
@@ -90,7 +80,9 @@ If your streaming query syntax references the same input Event Hub resource mult
90
80
Scenarios in which the number of readers per partition exceeds the Event Hubs limit of five include the following:
91
81
92
82
* Multiple SELECT statements: If you use multiple SELECT statements that refer to **same** event hub input, each SELECT statement causes a new receiver to be created.
83
+
93
84
* UNION: When you use a UNION, it's possible to have multiple inputs that refer to the **same** event hub and consumer group.
85
+
94
86
* SELF JOIN: When you use a SELF JOIN operation, it's possible to refer to the **same** event hub multiple times.
95
87
96
88
The following best practices can help mitigate scenarios in which the number of readers per partition exceeds the Event Hubs limit of five.
0 commit comments