I am getting below error while running Function app.
[1/17/2019 3:29:11 AM] The listener for function 'device-message-funcapp' was unable to start. [1/17/2019 3:29:11 AM] The listener for function 'device-message-funcapp' was unable to start. Microsoft.Azure.EventHubs.Processor: Encountered error while fetching the list of EventHub PartitionIds. Microsoft.Azure.Amqp: An existing connection was forcibly closed by the remote host. [1/17/2019 3:29:14 AM] Host lock lease acquired by i
This is my method
public static class DeviceMessageFunction
{
[FunctionName("device-message-funcapp")]
public static void Run([IoTHubTrigger("messages/events", Connection = "EventHub")]EventData message, ILogger log)
{
log.LogInformation($"C# IoT Hub trigger function processed a message: {Encoding.UTF8.GetString(message.Body.Array)}");
}
}
Here is my connection string
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=lctestfunctionsa;AccountKey=********;BlobEndpoint=https://**********.blob.core.windows.net/;TableEndpoint=https://********.table.core.windows.net/;QueueEndpoint=https://***.queue.core.windows.net/;FileEndpoint=https://***.file.core.windows.net/",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"EventHub": "Endpoint=sb://iothub-******.servicebus.windows.net/;SharedAccessKeyName=iothubowner;SharedAccessKey=***;"}}
I have even tried enable the ports [5672, 9350, 9354, 5671] But no luck.
How do I know which protocol used to connect to event hub and how do I fix it. It works fine in home network
It is not duplicate of In Azure Eventhub reciever giving "Encountered error while fetching the list of EventHub PartitionIds" error
If someone landed here with the following error :
Microsoft.Azure.EventHubs.Processor: Encountered error while fetching the list of EventHub PartitionIds. Microsoft.Azure.EventHubs.Processor: Method not found: 'Microsoft.Azure.EventHubs.EventHubClient Microsoft.Azure.EventHubs.EventHubClient.Create(System.Uri, System.String, Microsoft.Azure.EventHubs.ITokenProvider, System.Nullable`1<System.TimeSpan>, Microsoft.Azure.EventHubs.TransportType)'
Make sure you have installed latest version of Microsoft.Azure.EventHubs.Processor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With