Reputation: 2956
I am trying to run the sample reading message from EventHub but getting the following error:
Error:
Microsoft.Azure.EventHubs.Processor.EventProcessorRuntimeException: 'Out of retries creating lease for partition'
I can see a container got created under using Azure portal - Storage Explorer.
And know some message got written successfully to the eventhub I am trying to read from.
Any idea what might be causing this?
My storage account is of type "Storage (general purpose v1)"!
Upvotes: 2
Views: 3673
Reputation: 975
This seems to be an issue with the Storage Account you made.
I also stumbled upon this issue following this guide. I created the Storage Account (Account kind: "Storage (general purpose v1)", Performance: "Premium") and created a new Container (note: container access options could not be changed), I tested with the simple consumer code in the guide and it failed with the same "Out of retries creating lease for partition" error you received.
I eventually found this GitHub issue which suggested I used "Blob storage" instead. I created a new Storage Account with "Blob storage" selected as the Account Kind and it worked. Out of curiosity, I made two more Storage Accounts, one as "StorageV2 (general purpose v2)" and another as "Storage (general purpose v1)" again (note: container access options were now available). Both worked, so I was confused.
After some further playing around, I found that this is likely an issue with the Performance option (including the container access issue). Pick "Standard" with any sub option instead of "Premium". My original Storage Account was "Premium" and every following failing test was also "Premium". Also, it seems like you can never make a storage account with the same name ever again as the containers always have "Forbidden" names...
Upvotes: 3