I created an Event hub processor in .net, followed that example: https://github.com/Azure/azure-sdk-for-net/blob/Azure.Messaging.EventHubs.Processor_5.11.2/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples/Sample03_EventProcessorHandlers.md#process-error
Calling 'StartProcessingAsync' fails with the error: "Creation of RequestResponseAmqpLink did not complete in 0 milliseconds."
Is there something I'm missing?
The eventProcessorClient is created like that, with default client options:
_eventProcessorClient = new EventProcessorClient
(
storageClient,
consumerGroup,
fullyQualifiedNamespace,
eventHubName,
new DefaultAzureCredential()
);
The roles to the EH and the blob storage are configured (Azure Event Hubs Data Receiver, Storage Blob Data Contributor)
The error indicates that the client was unable to create a connection, authorize, and create an AMQP link in the duration allowed by your configured TryTimeout. Since a timeout exception of this nature is implicitly retried, when it surfaces to your application, it means that it was a consistent failure across all retry attempts. It could just be a transient network failure, but if you're seeing it consistently, there's likely more to it.
Generally, this comes down to a couple of common causes:
Your network is blocking the standard AMQP ports (5671, 5672). Often configuring the transport to use AmqpWebSockets can help, but it depends on your network.
Your network is just really slow. You'll want to make sure that your application and Event Hubs namespace are located in the same Azure region.
Your host machine is headed towards SNAT port exhaustion, but hasn't quite given up yet. Your network requests are stalled waiting for resources to become available and timed out while doing so.