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
title: Troubleshooting guide for Azure Service Bus | Microsoft Docs
2
+
title: Azure Service Bus - messaging exceptions | Microsoft Docs
3
3
description: This article provides a list of Azure Service Bus messaging exceptions and suggested actions to taken when the exception occurs.
4
4
services: service-bus-messaging
5
5
documentationcenter: na
@@ -18,21 +18,18 @@ ms.author: aschhab
18
18
19
19
---
20
20
21
-
# Troubleshooting guide for Azure Service Bus
22
-
This article provides some of the .NET exceptions generated by Service Bus .NET Framework APIs and also other tips for troubleshooting issues.
21
+
# Service Bus messaging exceptions
22
+
This article lists the .NET exceptions generated by .NET Framework APIs.
23
23
24
-
## Service Bus messaging exceptions
25
-
This section lists the .NET exceptions generated by .NET Framework APIs.
26
-
27
-
### Exception categories
24
+
## Exception categories
28
25
The messaging APIs generate exceptions that can fall into the following categories, along with the associated action you can take to try to fix them. The meaning and causes of an exception can vary depending on the type of messaging entity:
29
26
30
27
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
28
2. Setup/configuration error ([Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException](/dotnet/api/microsoft.azure.servicebus.messagingentitynotfoundexception), [System.UnauthorizedAccessException](https://msdn.microsoft.com/library/system.unauthorizedaccessexception.aspx). General action: review your configuration and change if necessary.
32
29
3. Transient exceptions ([Microsoft.ServiceBus.Messaging.MessagingException](/dotnet/api/microsoft.servicebus.messaging.messagingexception), [Microsoft.ServiceBus.Messaging.ServerBusyException](/dotnet/api/microsoft.azure.servicebus.serverbusyexception), [Microsoft.ServiceBus.Messaging.MessagingCommunicationException](/dotnet/api/microsoft.servicebus.messaging.messagingcommunicationexception)). General action: retry the operation or notify users. The `RetryPolicy` class in the client SDK can be configured to handle retries automatically. For more information, see [Retry guidance](/azure/architecture/best-practices/retry-service-specific#service-bus).
33
30
4. Other exceptions ([System.Transactions.TransactionException](https://msdn.microsoft.com/library/system.transactions.transactionexception.aspx), [System.TimeoutException](https://msdn.microsoft.com/library/system.timeoutexception.aspx), [Microsoft.ServiceBus.Messaging.MessageLockLostException](/dotnet/api/microsoft.azure.servicebus.messagelocklostexception), [Microsoft.ServiceBus.Messaging.SessionLockLostException](/dotnet/api/microsoft.azure.servicebus.sessionlocklostexception)). General action: specific to the exception type; refer to the table in the following section:
34
31
35
-
###Exception types
32
+
## Exception types
36
33
The following table lists messaging exception types, and their causes, and notes suggested action you can take.
37
34
38
35
|**Exception Type**|**Description/Cause/Examples**|**Suggested Action**|**Note on automatic/immediate retry**|
@@ -61,10 +58,10 @@ The following table lists messaging exception types, and their causes, and notes
61
58
|[TransactionException](https://msdn.microsoft.com/library/system.transactions.transactionexception.aspx)|The ambient transaction (*Transaction.Current*) is invalid. It may have been completed or aborted. Inner exception may provide additional information. ||Retry doesn't help. |
62
59
|[TransactionInDoubtException](https://msdn.microsoft.com/library/system.transactions.transactionindoubtexception.aspx)|An operation is attempted on a transaction that is in doubt, or an attempt is made to commit the transaction and the transaction becomes in doubt. |Your application must handle this exception (as a special case), as the transaction may have already been committed. |- |
63
60
64
-
###QuotaExceededException
61
+
## QuotaExceededException
65
62
[QuotaExceededException](/dotnet/api/microsoft.azure.servicebus.quotaexceededexception) indicates that a quota for a specific entity has been exceeded.
66
63
67
-
####Queues and topics
64
+
### Queues and topics
68
65
For queues and topics, it's often the size of the queue. The error message property contains further details, as in the following example:
69
66
70
67
```Output
@@ -76,7 +73,7 @@ Message: The maximum entity size has been reached or exceeded for Topic: 'xxx-xx
76
73
77
74
The message states that the topic exceeded its size limit, in this case 1 GB (the default size limit).
78
75
79
-
####Namespaces
76
+
### Namespaces
80
77
81
78
For namespaces, [QuotaExceededException](/dotnet/api/microsoft.azure.servicebus.quotaexceededexception) can indicate that an application has exceeded the maximum number of connections to a namespace. For example:
@@ -96,70 +93,14 @@ There are two common causes for this error: the dead-letter queue, and non-funct
96
93
To resolve the issue, read and complete the messages from the dead-letter queue, as you would from any other queue. You can use the [FormatDeadLetterPath](/dotnet/api/microsoft.azure.servicebus.entitynamehelper.formatdeadletterpath) method to help format the dead-letter queue path.
97
94
2.**Receiver stopped**. A receiver has stopped receiving messages from a queue or subscription. The way to identify this is to look at the [QueueDescription.MessageCountDetails](/dotnet/api/microsoft.servicebus.messaging.messagecountdetails) property, which shows the full breakdown of the messages. If the [ActiveMessageCount](/dotnet/api/microsoft.servicebus.messaging.messagecountdetails.activemessagecount) property is high or growing, then the messages aren't being read as fast as they are being written.
98
95
99
-
###TimeoutException
96
+
## TimeoutException
100
97
A [TimeoutException](https://msdn.microsoft.com/library/system.timeoutexception.aspx) indicates that a user-initiated operation is taking longer than the operation timeout.
101
98
102
99
You should check the value of the [ServicePointManager.DefaultConnectionLimit](https://msdn.microsoft.com/library/system.net.servicepointmanager.defaultconnectionlimit) property, as hitting this limit can also cause a [TimeoutException](https://msdn.microsoft.com/library/system.timeoutexception.aspx).
103
100
104
-
####Queues and topics
101
+
### Queues and topics
105
102
For queues and topics, the timeout is specified either in the [MessagingFactorySettings.OperationTimeout](/dotnet/api/microsoft.servicebus.messaging.messagingfactorysettings) property, as part of the connection string, or through [ServiceBusConnectionStringBuilder](/dotnet/api/microsoft.azure.servicebus.servicebusconnectionstringbuilder). The error message itself might vary, but it always contains the timeout value specified for the current operation.
106
103
107
-
## Connectivity, certificate, or timeout issues
108
-
The following steps may help you with troubleshooting connectivity/certificate/timeout issues for all services under *.servicebus.windows.net.
109
-
110
-
- Browse to or [wget](https://www.gnu.org/software/wget/)`https://<yournamespace>.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).
111
-
112
-
An example of successful message:
113
-
114
-
```xml
115
-
<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>
116
-
```
117
-
118
-
An example of failure error message:
119
-
120
-
```json
121
-
<Error>
122
-
<Code>400</Code>
123
-
<Detail>
124
-
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
125
-
</Detail>
126
-
</Error>
127
-
```
128
-
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 (AMQP) and 9354 (Net Messaging/SBMP). 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.
145
-
- 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.
146
-
147
-
## Issues that may occur with service upgrades/restarts
148
-
Backend service upgrades and restarts may cause the following impact to your applications:
149
-
150
-
- Requests may be momentarily throttled.
151
-
- There may be a drop in incoming messages/requests.
152
-
- The log file may contain error messages.
153
-
- The applications may be disconnected from the service for a few seconds.
154
-
155
-
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.
156
-
157
104
## Next steps
158
-
159
105
For the complete Service Bus .NET API reference, see the [Azure .NET API reference](/dotnet/api/overview/azure/service-bus).
160
-
161
-
To learn more about [Service Bus](https://azure.microsoft.com/services/service-bus/), see the following articles:
162
-
163
-
* [Service Bus messaging overview](service-bus-messaging-overview.md)
164
-
* [Service Bus architecture](service-bus-architecture.md)
165
-
106
+
For troubleshooting tips, see the [Troubleshooting guide](service-bus-troubleshooting-guide.md)
title: Troubleshooting guide for Azure Service Bus | Microsoft Docs
3
+
description: This article provides a list of Azure Service Bus messaging exceptions and suggested actions to taken when the exception occurs.
4
+
services: service-bus-messaging
5
+
documentationcenter: na
6
+
author: axisc
7
+
manager: timlt
8
+
editor: spelluru
9
+
10
+
ms.assetid: 3d8526fe-6e47-4119-9f3e-c56d916a98f9
11
+
ms.service: service-bus-messaging
12
+
ms.devlang: na
13
+
ms.topic: article
14
+
ms.tgt_pltfrm: na
15
+
ms.workload: na
16
+
ms.date: 04/07/2020
17
+
ms.author: aschhab
18
+
19
+
---
20
+
21
+
# Troubleshooting guide for Azure Service Bus
22
+
This article provides troubleshooting tips and recommendations for a few issues that you may see when using Azure Service Bus.
23
+
24
+
## Connectivity, certificate, or timeout issues
25
+
The following steps may help you with troubleshooting connectivity/certificate/timeout issues for all services under *.servicebus.windows.net.
26
+
27
+
- Browse to or [wget](https://www.gnu.org/software/wget/)`https://<yournamespace>.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).
28
+
29
+
An example of successful message:
30
+
31
+
```xml
32
+
<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>
33
+
```
34
+
35
+
An example of failure error message:
36
+
37
+
```json
38
+
<Error>
39
+
<Code>400</Code>
40
+
<Detail>
41
+
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
42
+
</Detail>
43
+
</Error>
44
+
```
45
+
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 (AMQP) and 9354 (Net Messaging/SBMP). 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.
62
+
- 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.
63
+
64
+
## Issues that may occur with service upgrades/restarts
65
+
Backend service upgrades and restarts may cause the following impact to your applications:
66
+
67
+
- Requests may be momentarily throttled.
68
+
- There may be a drop in incoming messages/requests.
69
+
- The log file may contain error messages.
70
+
- The applications may be disconnected from the service for a few seconds.
71
+
72
+
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.
73
+
74
+
## Unauthorized access: Send claims are required
75
+
You may see this error when attempting to access a Service Bus topic from Visual Studio on an on-premises computer using a user-assigned managed identity with send permissions.
76
+
77
+
```bash
78
+
Service Bus Error: Unauthorized access. 'Send' claim\(s\) are required to perform this operation.
79
+
```
80
+
81
+
To resolve this error, install the [Microsoft.Azure.Services.AppAuthentication](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication/) library. For more information, see [Local development authentication](..\key-vault\service-to-service-authentication.md#local-development-authentication).
82
+
83
+
To learn how to assign permissions to roles, see [Authenticate a managed identity with Azure Active Directory to access Azure Service Bus resources](service-bus-managed-service-identity.md).
84
+
85
+
## Next steps
86
+
See the following articles:
87
+
88
+
-[Azure Resource Manager exceptions](service-bus-resource-manager-exceptions.md). It list exceptions generated when interacting with Azure Service Bus using Azure Resource Manager (via templates or direct calls).
89
+
-[Messaging exceptions](service-bus-messaging-exceptions.md). It provides a list of exceptions generated by .NET Framework for Azure Service Bus.
0 commit comments