Skip to content

Commit 882fabd

Browse files
authored
Merge pull request #109392 from mamccrea/patch-42
Stream Analytics: Update stream-analytics-troubleshoot-input.md
2 parents 6e84f79 + 5f5cd6e commit 882fabd

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

articles/stream-analytics/stream-analytics-troubleshoot-input.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,69 +6,60 @@ ms.author: sidram
66
ms.reviewer: mamccrea
77
ms.service: stream-analytics
88
ms.topic: conceptual
9-
ms.date: 12/07/2018
9+
ms.date: 03/31/2020
1010
ms.custom: seodec18
1111
---
1212

1313
# Troubleshoot input connections
1414

15-
This page describes common issues with input connections and 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).
1616

1717
## 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.
1920

2021
2. Examine your input data.
2122

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-
2423
1. Use the [**Sample Data**](stream-analytics-sample-data-input.md) button for each input. Download the input sample data.
2524

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.
2728

2829
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.
2930

3031
## Malformed input events causes deserialization errors
31-
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.
3234

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:
3436

3537
![Azure Stream Analytics inputs tile](media/stream-analytics-malformed-events/stream-analytics-inputs-tile.png)
3638

37-
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.
4640

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.
41+
![Input details warning notification](media/stream-analytics-malformed-events/warning-message-with-offset.png)
4842

49-
![Stream Analytics warning message with offset](media/stream-analytics-malformed-events/warning-message-with-offset.png)
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.
5244

53-
4. Once you read the data, you can analyze and correct the serialization format.
45+
## Job exceeds maximum Event Hub receivers
5446

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.
5948

6049
The error shown when the number of receivers exceeds the maximum is:
50+
6151
`The streaming job failed: Stream Analytics job has validation errors: Job will exceed the maximum amount of Event Hub Receivers.`
6252

6353
> [!NOTE]
6454
> 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.
6555
6656
### Add a consumer group in Event Hubs
57+
6758
To add a new consumer group in your Event Hubs instance, follow these steps:
6859

6960
1. Sign in to the Azure portal.
7061

71-
2. Locate your Event Hubs.
62+
2. Locate your Event Hub.
7263

7364
3. Select **Event Hubs** under the **Entities** heading.
7465

@@ -80,8 +71,7 @@ To add a new consumer group in your Event Hubs instance, follow these steps:
8071

8172
![Add a consumer group in Event Hubs](media/stream-analytics-event-hub-consumer-groups/new-eh-consumer-group.png)
8273

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.
8575

8676
## Readers per partition exceeds Event Hubs limit
8777

@@ -90,7 +80,9 @@ If your streaming query syntax references the same input Event Hub resource mult
9080
Scenarios in which the number of readers per partition exceeds the Event Hubs limit of five include the following:
9181

9282
* 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+
9384
* UNION: When you use a UNION, it's possible to have multiple inputs that refer to the **same** event hub and consumer group.
85+
9486
* SELF JOIN: When you use a SELF JOIN operation, it's possible to refer to the **same** event hub multiple times.
9587

9688
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

Comments
 (0)