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/event-hubs/event-hubs-messaging-exceptions.md
+56-70Lines changed: 56 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Troubleshooting guide - Azure Event Hubs | Microsoft Docs
2
+
title: Azure Event Hubs - exceptions
3
3
description: This article provides a list of Azure Event Hubs messaging exceptions and suggested actions.
4
4
services: event-hubs
5
5
documentationcenter: na
@@ -17,22 +17,49 @@ ms.author: shvija
17
17
18
18
---
19
19
20
-
# Troubleshooting guide for Azure Event Hubs
21
-
This article provides some of the .NET exceptions generated by Event Hubs .NET Framework APIs and also other tips for troubleshooting issues.
22
-
23
-
## Event Hubs messaging exceptions - .NET
20
+
# Event Hubs messaging exceptions - .NET
24
21
This section lists the .NET exceptions generated by .NET Framework APIs.
25
22
26
-
### Exception categories
27
-
28
-
The Event Hubs .NET APIs generate exceptions that can fall into the following categories, along with the associated action you can take to try to fix them.
29
-
30
-
1. User coding error: [System.ArgumentException](https://msdn.microsoft.com/library/system.argumentexception.aspx), [System.InvalidOperationException](https://msdn.microsoft.com/library/system.invalidoperationexception.aspx), [System.OperationCanceledException](https://msdn.microsoft.com/library/system.operationcanceledexception.aspx), [System.Runtime.Serialization.SerializationException](https://msdn.microsoft.com/library/system.runtime.serialization.serializationexception.aspx). General action: try to fix the code before proceeding.
31
-
2. Setup/configuration error: [Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException](/dotnet/api/microsoft.servicebus.messaging.messagingentitynotfoundexception), [Microsoft.Azure.EventHubs.MessagingEntityNotFoundException](/dotnet/api/microsoft.azure.eventhubs.messagingentitynotfoundexception), [System.UnauthorizedAccessException](https://msdn.microsoft.com/library/system.unauthorizedaccessexception.aspx). General action: review your configuration and change if necessary.
32
-
3. Transient exceptions: [Microsoft.ServiceBus.Messaging.MessagingException](/dotnet/api/microsoft.servicebus.messaging.messagingexception), [Microsoft.ServiceBus.Messaging.ServerBusyException](#serverbusyexception), [Microsoft.Azure.EventHubs.ServerBusyException](#serverbusyexception), [Microsoft.ServiceBus.Messaging.MessagingCommunicationException](/dotnet/api/microsoft.servicebus.messaging.messagingcommunicationexception). General action: retry the operation or notify users.
33
-
4. Other exceptions: [System.Transactions.TransactionException](https://msdn.microsoft.com/library/system.transactions.transactionexception.aspx), [System.TimeoutException](#timeoutexception), [Microsoft.ServiceBus.Messaging.MessageLockLostException](/dotnet/api/microsoft.servicebus.messaging.messagelocklostexception), [Microsoft.ServiceBus.Messaging.SessionLockLostException](/dotnet/api/microsoft.servicebus.messaging.sessionlocklostexception). General action: specific to the exception type; refer to the table in the following section.
34
-
35
-
### Exception types
23
+
## Exception categories
24
+
25
+
The Event Hubs .NET APIs generate exceptions that can fall into the following categories, along with the associated action you can take to try to fix them:
General action: Specific to the exception type; refer to the table in the following section.
61
+
62
+
## Exception types
36
63
The following table lists messaging exception types, and their causes, and notes suggested action you can take.
37
64
38
65
| Exception Type | Description/Cause/Examples | Suggested Action | Note on automatic/immediate retry |
@@ -51,93 +78,52 @@ The following table lists messaging exception types, and their causes, and notes
51
78
|[MessagingEntityDisabledException](/dotnet/api/microsoft.servicebus.messaging.messagingentitydisabledexception)| Request for a runtime operation on a disabled entity. |Activate the entity. | Retry might help if the entity has been activated in the interim. |
52
79
|[Microsoft.ServiceBus.Messaging MessageSizeExceededException](/dotnet/api/microsoft.servicebus.messaging.messagesizeexceededexception) <br /><br/> [Microsoft.Azure.EventHubs MessageSizeExceededException](/dotnet/api/microsoft.azure.eventhubs.messagesizeexceededexception)| A message payload exceeds the 1-MB limit. This 1-MB limit is for the total message, which can include system properties and any .NET overhead. | Reduce the size of the message payload, then retry the operation. |Retry will not help. |
53
80
54
-
###QuotaExceededException
81
+
## QuotaExceededException
55
82
[QuotaExceededException](/dotnet/api/microsoft.servicebus.messaging.quotaexceededexception) indicates that a quota for a specific entity has been exceeded.
56
83
57
84
This exception can happen if the maximum number of receivers (5) has already been opened on a per-consumer group level.
58
85
59
-
####Event Hubs
86
+
### Event Hubs
60
87
Event Hubs has a limit of 20 consumer groups per Event Hub. When you attempt to create more, you receive a [QuotaExceededException](/dotnet/api/microsoft.servicebus.messaging.quotaexceededexception).
61
88
62
-
###TimeoutException
89
+
## TimeoutException
63
90
A [TimeoutException](https://msdn.microsoft.com/library/system.timeoutexception.aspx) indicates that a user-initiated operation is taking longer than the operation timeout.
64
91
65
92
For Event Hubs, the timeout is specified either as part of the connection string, or through [ServiceBusConnectionStringBuilder](/dotnet/api/microsoft.servicebus.servicebusconnectionstringbuilder). The error message itself might vary, but it always contains the timeout value specified for the current operation.
66
93
67
-
####Common causes
94
+
### Common causes
68
95
There are two common causes for this error: incorrect configuration, or a transient service error.
69
96
70
-
1.**Incorrect configuration**
97
+
-**Incorrect configuration**
71
98
The operation timeout might be too small for the operational condition. The default value for the operation timeout in the client SDK is 60 seconds. Check to see if your code has the value set to something too small. The condition of the network and CPU usage can affect the time it takes for a particular operation to complete, so the operation timeout should not be set to a small value.
72
-
2.**Transient service error**
99
+
-**Transient service error**
73
100
Sometimes the Event Hubs service can experience delays in processing requests; for example, during periods of high traffic. In such cases, you can retry your operation after a delay, until the operation is successful. If the same operation still fails after multiple attempts, visit the [Azure service status site](https://azure.microsoft.com/status/) to see if there are any known service outages.
74
101
75
-
###ServerBusyException
102
+
## ServerBusyException
76
103
77
104
A [Microsoft.ServiceBus.Messaging.ServerBusyException](/dotnet/api/microsoft.servicebus.messaging.serverbusyexception) or [Microsoft.Azure.EventHubs.ServerBusyException](/dotnet/api/microsoft.azure.eventhubs.serverbusyexception) indicates that a server is overloaded. There are two relevant error codes for this exception.
78
105
79
-
#### Error code 50002
80
-
106
+
### Error code 50002
81
107
This error can occur for one of two reasons:
82
108
83
-
1. The load isn't evenly distributed across all partitions on the event hub, and one partition hits the local throughput unit limitation.
109
+
- The load isn't evenly distributed across all partitions on the event hub, and one partition hits the local throughput unit limitation.
84
110
85
-
Resolution: Revising the partition distribution strategy or trying [EventHubClient.Send(eventDataWithOutPartitionKey)](/dotnet/api/microsoft.servicebus.messaging.eventhubclient) might help.
111
+
**Resolution**: Revising the partition distribution strategy or trying [EventHubClient.Send(eventDataWithOutPartitionKey)](/dotnet/api/microsoft.servicebus.messaging.eventhubclient) might help.
86
112
87
-
2. The Event Hubs namespace doesn't have sufficient throughput units (you can check the **Metrics** screen in the Event Hubs namespace window in the [Azure portal](https://portal.azure.com) to confirm). The portal shows aggregated (1 minute) information, but we measure the throughput in real time – so it's only an estimate.
113
+
- The Event Hubs namespace doesn't have sufficient throughput units (you can check the **Metrics** screen in the Event Hubs namespace window in the [Azure portal](https://portal.azure.com) to confirm). The portal shows aggregated (1 minute) information, but we measure the throughput in real time – so it's only an estimate.
88
114
89
-
Resolution: Increasing the throughput units on the namespace can help. You can do this operation on the portal, in the **Scale** window of the Event Hubs namespace screen. Or, you can use [Auto-inflate](event-hubs-auto-inflate.md).
115
+
**Resolution**: Increasing the throughput units on the namespace can help. You can do this operation on the portal, in the **Scale** window of the Event Hubs namespace screen. Or, you can use [Auto-inflate](event-hubs-auto-inflate.md).
90
116
91
-
####Error code 50001
117
+
### Error code 50001
92
118
93
119
This error should rarely occur. It happens when the container running code for your namespace is low on CPU – not more than a few seconds before the Event Hubs load balancer begins.
94
120
95
-
#### Limit on calls to the GetRuntimeInformation method
96
-
Azure Event Hubs supports up to 50 calls per second to the GetRuntimeInfo per second. You may receive an exception similar to the following one once the limit is reached:
121
+
**Resolution**: Limit on calls to the GetRuntimeInformation method. Azure Event Hubs supports up to 50 calls per second to the GetRuntimeInfo per second. You may receive an exception similar to the following one once the limit is reached:
97
122
98
123
```
99
124
ExceptionId: 00000000000-00000-0000-a48a-9c908fbe84f6-ServerBusyException: The request was terminated because the namespace 75248:aaa-default-eventhub-ns-prodb2b is being throttled. Error code : 50001. Please wait 10 seconds and try again.
100
125
```
101
126
102
-
## Connectivity, certificate, or timeout issues
103
-
The following steps may help you with troubleshooting connectivity/certificate/timeout issues for all services under *.servicebus.windows.net.
104
-
105
-
- Browse to or [wget](https://www.gnu.org/software/wget/)`https://<yournamespacename>.servicebus.windows.net/`. It helps with checking whether you have IP filtering or virtual network or certificate chain issues (most common when using java SDK).
106
-
107
-
An example of successful message:
108
-
109
-
```xml
110
-
<feedxmlns="http://www.w3.org/2005/Atom"><titletype="text">Publicly Listed Services</title><subtitletype="text">This is the list of publicly-listed services currently available.</subtitle><id>uuid:27fcd1e2-3a99-44b1-8f1e-3e92b52f0171;id=30</id><updated>2019-12-27T13:11:47Z</updated><generator>Service Bus 1.1</generator></feed>
111
-
```
112
-
113
-
An example of failure error message:
114
-
115
-
```json
116
-
<Error>
117
-
<Code>400</Code>
118
-
<Detail>
119
-
Bad Request. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:b786d4d1-cbaf-47a8-a3d1-be689cda2a98_G22, SystemTracker:NoSystemTracker, Timestamp:2019-12-27T13:12:40
120
-
</Detail>
121
-
</Error>
122
-
```
123
-
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 (AMQP) and 9093 (Kafka). Depending on the library you use, other ports are also used. Here is the sample command that check whether the 5671 port is blocked.
- When there are intermittent connectivity issues, run the following command to check if there are any dropped packets. This command will try to establish 25 different TCP connections every 1 second with the service. Then, you can check how many of them succeeded/failed and also see TCP connection latency. You can download the `psping` tool from [here](/sysinternals/downloads/psping).
You can use equivalent commands if you're using other tools such as `tnc`, `ping`, and so on.
140
-
- Obtain a network trace if the previous steps don't help and analyze it using tools such as [Wireshark](https://www.wireshark.org/). Contact [Microsoft Support](https://support.microsoft.com/) if needed.
title: Troubleshooting guide - Azure Event Hubs | Microsoft Docs
3
+
description: This article provides a list of Azure Event Hubs messaging exceptions and suggested actions.
4
+
services: event-hubs
5
+
documentationcenter: na
6
+
author: ShubhaVijayasarathy
7
+
manager: timlt
8
+
9
+
ms.service: event-hubs
10
+
ms.devlang: na
11
+
ms.topic: article
12
+
ms.tgt_pltfrm: na
13
+
ms.workload: na
14
+
ms.custom: seodec18
15
+
ms.date: 01/16/2020
16
+
ms.author: shvija
17
+
18
+
---
19
+
20
+
# Azure Event Hubs - Troubleshooting guide
21
+
This article provides troubleshooting tips and recommendations for a few issues that you may see when using Azure EventHubs.
22
+
23
+
## Connectivity, certificate, or timeout issues
24
+
The following steps may help you with troubleshooting connectivity/certificate/timeout issues for all services under *.servicebus.windows.net.
25
+
26
+
- Browse to or [wget](https://www.gnu.org/software/wget/)`https://<yournamespacename>.servicebus.windows.net/`. It helps with checking whether you have IP filtering or virtual network or certificate chain issues (most common when using java SDK).
27
+
28
+
An example of successful message:
29
+
30
+
```xml
31
+
<feedxmlns="http://www.w3.org/2005/Atom"><titletype="text">Publicly Listed Services</title><subtitletype="text">This is the list of publicly-listed services currently available.</subtitle><id>uuid:27fcd1e2-3a99-44b1-8f1e-3e92b52f0171;id=30</id><updated>2019-12-27T13:11:47Z</updated><generator>Service Bus 1.1</generator></feed>
32
+
```
33
+
34
+
An example of failure error message:
35
+
36
+
```json
37
+
<Error>
38
+
<Code>400</Code>
39
+
<Detail>
40
+
Bad Request. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:b786d4d1-cbaf-47a8-a3d1-be689cda2a98_G22, SystemTracker:NoSystemTracker, Timestamp:2019-12-27T13:12:40
41
+
</Detail>
42
+
</Error>
43
+
```
44
+
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 (AMQP) and 9093 (Kafka). Depending on the library you use, other ports are also used. Here is the sample command that check whether the 5671 port is blocked.
- When there are intermittent connectivity issues, run the following command to check if there are any dropped packets. This command will try to establish 25 different TCP connections every 1 second with the service. Then, you can check how many of them succeeded/failed and also see TCP connection latency. You can download the `psping` tool from [here](/sysinternals/downloads/psping).
You can use equivalent commands if you're using other tools such as `tnc`, `ping`, and so on.
61
+
- Obtain a network trace if the previous steps don't help and analyze it using tools such as [Wireshark](https://www.wireshark.org/). Contact [Microsoft Support](https://support.microsoft.com/) if needed.
62
+
63
+
## Issues that may occur with service upgrades/restarts
64
+
Backend service upgrades and restarts may cause the following impact to your applications:
65
+
66
+
- Requests may be momentarily throttled.
67
+
- There may be a drop in incoming messages/requests.
68
+
- The log file may contain error messages.
69
+
- The applications may be disconnected from the service for a few seconds.
70
+
71
+
If the application code utilizes SDK, the retry policy is already built in and active. The application will reconnect without significant impact to the application/workflow.
72
+
73
+
74
+
## Next steps
75
+
76
+
You can learn more about Event Hubs by visiting the following links:
0 commit comments