Loading...

Unable to delete Azure EventHub Cluster/Namespace/Entity/ConsumerGroup from Portal/ PowerShell/ CLI

Unable to delete Azure EventHub Cluster/Namespace/Entity/ConsumerGroup  from Portal/ PowerShell/ CLI

Issue:

Unable to delete Azure EventHub Cluster/Namespace/ Entity from Portal/ PowerShell/ CLI.

 

Case 1:

When EventHub tier is Premium and you are unable to delete Azure EventHub namespace and getting conflict operation error 409.

anuja_nirula_0-1682046002240.png

Sample error message : "statusMessage":"{\"error\":{\"code\":\"Conflict\",\"message\":\"Namespace provisioning in transition. For more information visit https://aka.ms/eventhubsarmexceptions.

 

Reason:

The reason for stuck state of EventHub namespace or its provisioning failure is due to a known race condition which initiates between two or more internal microservices from premium EventHub  architecture from different namespaces. If we trigger a Premium namespace provisioning and an event hub creation right after that then this race condition initiates and both provisioning may fail and the runtime creation will fail with internal server error 500.

 

Recommendation:

It is recommended to not perform back to back create operation on EventHub until the first EventHub namespace is not created successfully and if you want to delete the namespace just after its creation then it is recommended that the operation should be performed after 1 hour of its created time.

 

Action to be taken:

In such situation where your EventHub is stuck in activating/ Deleting state, raise support request with Microsoft to fix the state of namespace and to bring it in active state.

 

Case 2:

While deleting EventHub you have received a conflict error 409  but it's not a Premium EventHub.

 

Reason:

The reason for this conflict error could be due to any pending operations executing in the backend associated with the EventHub components and you might be trying to delete the EventHub while its execution is not completed.

 

Recommendation and Action to be taken:

In such situation, wait for some time to finish the pending operations on EventHub or its component and then retry after sometime.

 

Case 3:

Getting successful message on deletion of EventHub entity within a namespace but after sometime it is recreating and reappearing on portal.

 

Reason:

The recreation of entities in namespace could be due to any diagnostics settings enabled against the namespace entity or the Application insights might be using the EventHub entity and so Azure Monitor resource provider could be recreating the EventHub.

 

Action to be taken:

In such case, Please follow the below steps:

  1. Check if the entity is operational using PowerShell/ CLI. You may test using any Get command, example - Get-AzEventhub
  2. If the EventHub is recreated, check the content of EventHub. You can check the content either by Processing Data option on EventHub control pane on portal or by using Service Bus explorer tool.
  3. Once you see any content or record in EventHub entity, then identify the resource ID which is sending the events to that EventHub by looking at content data.
  4. Go to that resource from Azure portal and disable the diagnostic settings or application Insight settings which is using the EH entity.

Recommendation:

If you want to delete the EventHub entity or namespace, you should check whether none of the resource from this document are streaming logs to EventHub.

 

Case 4:

When you have deleted the EventHub and all operations on the deleted EventHub entity are failing but it is still showing on Portal

 

Reason:

The reason why we are still seeing a non-operational and deleted EventHub could be due to its stale entry in ARM cache

 

Action to be taken:

In such case, Please follow the below steps:

  1. Check if the entity is operational using PowerShell/ CLI. You may test using any Get command, example - Get-AzEventhub
  2. If the operation is failing with error code 404 i.e. entity not found, but it is still showing on portal then raise a support ticket with Microsoft to perform the synchronize operation on ARM cache of resource.

Case 5:

When you are unable to delete Kafka enabled EventHub topic.

 

Reason:

One of the reason why you are still seeing the Kafka enabled EventHub topic after its deletion could be because the Kafka producer keeps re-creating the EventHub due to

Auto topic creation is ON by default.

 

Action to be taken:

  1. Check the activity logs to make sure that you see the deleted operation.
  2. Set the Auto topic creation property as OFF.

anuja_nirula_2-1682046329912.png

Recommendation:

You can either stop the Kafka producers or pick another EventHub name.

 

Case 6:

Unable to delete Dedicated Event hub cluster and getting error message "BadRequest"

 

Reason:

It is known issue that a dedicated EventHub Cluster cannot be deleted until four hours after its creation time.

 

Recommendation and Action to be taken:

Please rerun this operation after that time has elapsed, or contact EventHub team through a support request if the cluster is stuck in a particular state.

Details to be included in support ticket should be resource ID, correlation ID of operation and timestamp of issue.

Published on:

Learn more
Azure PaaS Blog articles
Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related posts

Fabric Mirroring for Azure Cosmos DB: Public Preview Refresh Now Live with New Features

We’re thrilled to announce the latest refresh of Fabric Mirroring for Azure Cosmos DB, now available with several powerful new features that e...

3 days ago

Power Platform – Use Azure Key Vault secrets with environment variables

We are announcing the ability to use Azure Key Vault secrets with environment variables in Power Platform. This feature will reach general ava...

3 days ago

Validating Azure Key Vault Access Securely in Fabric Notebooks

Working with sensitive data in Microsoft Fabric requires careful handling of secrets, especially when collaborating externally. In a recent cu...

3 days ago

Azure Developer CLI (azd) – May 2025

This post announces the May release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) – May 2025 appeared first on ...

4 days ago

Azure Cosmos DB with DiskANN Part 4: Stable Vector Search Recall with Streaming Data

Vector Search with Azure Cosmos DB  In Part 1 and Part 2 of this series, we explored vector search with Azure Cosmos DB and best practices for...

4 days ago

General Availability for Data API in vCore-based Azure Cosmos DB for MongoDB

Title: General Availability for Data API in vCore-based Azure Cosmos DB for MongoDB We’re excited to announce the general availability of the ...

4 days ago

Microsoft Power Pages: The authentication key for your portal will expire

I saw the below Notification today, while I was working on the Portal requirements. Notification:The authentication key for your portal will e...

4 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy