Issue debugin azure function (v3 core 3.1) with EventHubTrigger. Error "The listener for function 'TriggerBatch' was unable to start"

Bruno Lucas 4,411 Reputation points MVP
2021-08-05T04:55:54.767+00:00

Hi,
Just created an azure function using dot net core 3 following this:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs-trigger?tabs=csharp.

the http trigger works after I set it to use websockets but the hub trigger throws this error:

The listener for function 'TriggerBatch' was unable to start.
[2021-08-05T04:51:59.647Z] The listener for function 'TriggerBatch' was unable to start. Microsoft.Azure.EventHubs.Processor: Encountered error while fetching the list of EventHub PartitionIds. System.Private.CoreLib: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The connection string is correct. any ideas? could be it also need somehow some setting to force running on websockets?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,321 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
562 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,656 Reputation points
    2021-08-05T08:49:54.237+00:00

    @Bruno Lucas When you use AmqpWebSockets then it creates a tunnel over TCP port 443 that is then equivalent to AMQP 5671 connections. The eventhub trigger uses the default port 5671/5672 and there is configuration for same at the function eventhun trigger end.
    As you have already tested so looks like these ports might be blocked at your network causing the issue. You can use PortQry tool to query your eventhub namespace on these ports to confirm if these are blocked or not.

    I don't see any issue with the default code/configuration and I have tested the same at my end.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful