Skip to content

Commit abeb0f6

Browse files
authored
Merge pull request #110584 from spelluru/sbusclaim0407
troubleshooting tips
2 parents 777591f + b226416 commit abeb0f6

File tree

3 files changed

+104
-71
lines changed

3 files changed

+104
-71
lines changed

articles/service-bus-messaging/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
- name: Troubleshoot
214214
items:
215215
- name: Troubleshooting guide
216+
href: service-bus-troubleshooting-guide.md
217+
- name: Messaging exceptions
216218
href: service-bus-messaging-exceptions.md
217219
- name: Resource Manager exceptions
218220
href: service-bus-resource-manager-exceptions.md
Lines changed: 12 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Troubleshooting guide for Azure Service Bus | Microsoft Docs
2+
title: Azure Service Bus - messaging exceptions | Microsoft Docs
33
description: This article provides a list of Azure Service Bus messaging exceptions and suggested actions to taken when the exception occurs.
44
services: service-bus-messaging
55
documentationcenter: na
@@ -18,21 +18,18 @@ ms.author: aschhab
1818

1919
---
2020

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

24-
## Service Bus messaging exceptions
25-
This section lists the .NET exceptions generated by .NET Framework APIs.
26-
27-
### Exception categories
24+
## Exception categories
2825
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:
2926

3027
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.
3128
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.
3229
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).
3330
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:
3431

35-
### Exception types
32+
## Exception types
3633
The following table lists messaging exception types, and their causes, and notes suggested action you can take.
3734

3835
| **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
6158
| [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. |
6259
| [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. |- |
6360

64-
### QuotaExceededException
61+
## QuotaExceededException
6562
[QuotaExceededException](/dotnet/api/microsoft.azure.servicebus.quotaexceededexception) indicates that a quota for a specific entity has been exceeded.
6663

67-
#### Queues and topics
64+
### Queues and topics
6865
For queues and topics, it's often the size of the queue. The error message property contains further details, as in the following example:
6966

7067
```Output
@@ -76,7 +73,7 @@ Message: The maximum entity size has been reached or exceeded for Topic: 'xxx-xx
7673

7774
The message states that the topic exceeded its size limit, in this case 1 GB (the default size limit).
7875

79-
#### Namespaces
76+
### Namespaces
8077

8178
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:
8279

@@ -87,7 +84,7 @@ System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]:
8784
ConnectionsQuotaExceeded for namespace xxx.
8885
```
8986

90-
#### Common causes
87+
### Common causes
9188
There are two common causes for this error: the dead-letter queue, and non-functioning message receivers.
9289

9390
1. **[Dead-letter queue](service-bus-dead-letter-queues.md)**
@@ -96,70 +93,14 @@ There are two common causes for this error: the dead-letter queue, and non-funct
9693
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.
9794
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.
9895

99-
### TimeoutException
96+
## TimeoutException
10097
A [TimeoutException](https://msdn.microsoft.com/library/system.timeoutexception.aspx) indicates that a user-initiated operation is taking longer than the operation timeout.
10198

10299
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).
103100

104-
#### Queues and topics
101+
### Queues and topics
105102
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.
106103

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-
<feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Publicly Listed Services</title><subtitle type="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.
129-
130-
```powershell
131-
tnc <yournamespacename>.servicebus.windows.net -port 5671
132-
```
133-
134-
On Linux:
135-
136-
```shell
137-
telnet <yournamespacename>.servicebus.windows.net 5671
138-
```
139-
- 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).
140-
141-
```shell
142-
.\psping.exe -n 25 -i 1 -q <yournamespace>.servicebus.windows.net:5671 -nobanner
143-
```
144-
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-
157104
## Next steps
158-
159105
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)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
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+
<feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Publicly Listed Services</title><subtitle type="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.
46+
47+
```powershell
48+
tnc <yournamespacename>.servicebus.windows.net -port 5671
49+
```
50+
51+
On Linux:
52+
53+
```shell
54+
telnet <yournamespacename>.servicebus.windows.net 5671
55+
```
56+
- 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).
57+
58+
```shell
59+
.\psping.exe -n 25 -i 1 -q <yournamespace>.servicebus.windows.net:5671 -nobanner
60+
```
61+
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.
90+

0 commit comments

Comments
 (0)