Chapter 15 · Azure Diagnostics
Subchapter 15.46
troubleshooting/messaging/service-troubleshooting.mdMarkdown5 KBView on GitHub
Covers connectivity, firewall, and network issues that apply regardless of SDK language.
If the client cannot connect at all:
producer.config / consumer.config.Run the connectivity probe script. It resolves DNS, tests HTTPS reachability, and probes the messaging ports (AMQP 5671/5672, HTTPS 443), returning a normalized report instead of raw curl/nslookup output. Add --kafka / -Kafka to also probe the Event Hubs Kafka port 9093.
Scripts (paths below are relative to the skill root, plugins/azure-skills/skills/azure-diagnostics, so run them from there): scripts/test-messaging-connectivity.sh (bash) and scripts/test-messaging-connectivity.ps1 (PowerShell).
# from plugins/azure-skills/skills/azure-diagnostics
.\scripts\test-messaging-connectivity.ps1 -Namespace <namespace># from plugins/azure-skills/skills/azure-diagnostics
bash ./scripts/test-messaging-connectivity.sh <namespace>The namespace may be a full FQDN or a bare name (.servicebus.windows.net is appended automatically).
Example (Event Hubs, including Kafka):
# from plugins/azure-skills/skills/azure-diagnostics
bash ./scripts/test-messaging-connectivity.sh contoso.servicebus.windows.net --kafkaIf connectivity is intermittent:
netstat -s (Linux) or netsh interface ipv4 show subinterface (Windows).tcpdump filtered on namespace IP.| Language | Setting |
|---|---|
| .NET | EventHubsTransportType.AmqpWebSockets / ServiceBusTransportType.AmqpWebSockets |
| Java | AmqpTransportType.AMQP_WEB_SOCKETS |
| Python | transport_type=TransportType.AmqpOverWebsocket |
| JavaScript | webSocketOptions in client constructor |
| Issue | Fix |
|---|---|
| Invalid connection string | Re-copy from Azure portal |
| Expired SAS token | Regenerate or increase validity |
| Missing RBAC role | Assign the corresponding Azure Event Hubs Data Owner/Sender/Receiver or Azure Service Bus Data Owner/Sender/Receiver role |
| Managed Identity not configured | Enable system/user-assigned identity, assign role on namespace |
partitionKey (or sessionId) into separate batches.maxWaitTime only controls the wait for the first message.