|
| 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: 03/23/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). 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). It provides a list of exceptions generated by .NET Framework for Azure Service Bus. |
| 90 | + |
0 commit comments