Reputation: 13
I am getting the below error whilst running my Python Azure Function on the local machine in VSCode.
For clarification the message is:
The listener for function 'Functions.IoT_Data-Handler' 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.
This error has never occurred before in the time I have started using VSCode for Azure functions (since last September). The only thing that has changed recently is that I now deploy this function within an Azure Function premium resource, but really that should not matter in the dev environment.
For information, this function is hooked up to an Azure IoT-Hub endpoint and is simply reading and processing the uplink data before saving it to an Azure SQL database.
Can anyone offer any advice?
Upvotes: 0
Views: 511
Reputation: 8694
Check if my below findings help to fix your issue:
local.settings.json
:Whatever the Event Hub Endpoint/IoT Hub Endpoint Connection String given in the file local.settings.json
, that property name should be mapped in the function.json
file.
I found similar issues in the SO 1 & 2 which will be helpful to fix your issue.
Upvotes: 0