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
Need help with this product?

We can help you with Unable to delete Azure EventHub Cluster/Namespace/Entity/ConsumerGroup from Portal/ PowerShell/ CLI

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Azure PaaS Blog articles
Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related posts

Azure Storage - TLS 1.0 and 1.1 retirement

Overview TLS 1.0 and 1.1 retirement on Azure Storage was previously announced for Nov 1st, 2024, and it was postponed recently to 1 year later...

1 year ago

Efficient Management of Append and Page Blobs Using Azure Storage Actions

  Overview In Azure Storage, Blob Lifecycle Management (BLM) allows you to automate the management of your data based on rules defined by...

1 year ago

[Azure AI Search] Internal Server Error when creating CMK encrypted objects

Scenario Customers follow the Microsoft doc to create CMK encrypted objects (data source, index etc.), but get the 500 Internal Serv...

1 year ago

Optimizing Azure Table Storage: Automated Data Cleanup using a PowerShell script with Azure Automate

Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...

1 year ago

Optimizing Azure Table Storage: Automated Data Clean-up using a PowerShell script with Azure Automat

Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...

1 year ago

Restoring Soft-Deleted Blobs with multithreading in Azure Storage Using C#

Blob soft delete is an essential feature that safeguards your data against accidental deletions or overwrites. By retaining deleted data for a...

1 year ago

Performing simple Azure Table Storage REST API operations using curl command.

The blog provides guidance to perform simple Table Storage REST API operations such as Create table, Delete Table, Insert entity, Delete entit...

1 year ago

Bulk delete all the old jobs from the batch account

Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task dat...

1 year ago

Utilizing Azure Storage and Runbooks for scheduled automated backups of Azure SQL Databases

In this article, we are going to provide detailed steps to create a scheduled Azure SQL Database backup to storage account using automation. T...

2 years ago

[Azure Service Bus] JMS messages getting dead-lettered

The article discusses a problem where numerous messages end up in the dead letter queue (DLQ) when the JMS service bus consumer connects to th...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.