Error: Multiple attempts to restart one of the Azure Cosmos Emulator processes were detected.

In this Azure tutorial, we will discuss how to fix the error Azure Cosmos DB Emulator not working. Which I got while trying to run the Azure Cosmos DB Emulator. We will also discuss fixing the error Error: Unable to rebuild performance counter setting from system backup store, error code is 2.

Recently, while trying to run the Azure Cosmos DB Emulator, I encountered an error, and the Azure Cosmos DB Emulator not working.

The complete error message was as below

Error: Multiple attempts to restart one of the Azure Cosmos Emulator processes were detected. The emulator will shut down.

If the problem persists please try uninstalling the Azure Cosmos Emulator, remove the CosmosDBEmulator directory from your %%LOCALAPPDATA%%, and reinstall. You can also reach out to the Azure Cosmos team using the ‘Feedback’ link in the Data Explorer browser window.

You can see the error below

Azure Cosmos DB Emulator not running

Solution

Now, let’s discuss the steps I have followed to fix this issue.

Approach – 1: Try reinstalling Azure Cosmos DB Emulator

The basic and first approach is to try uninstalling and reinstalling the Azure Cosmos DB Emulator. Now try running it.

If Approach-1 doesn’t work and you still get the same error, try the next approach, which might fix your issue.

You can download the Azure Cosmos DB Emulator and install it now.

Approach – 2: Try using Commandline

Follow the below steps.

  1. The first step is to shut down Azure Cosmos DB Emulator.
  2. Open the command prompt with “Run as administrator” mode and try running the command lodctr /R.

Once you run the above command, there might be a chance you will get the below error

Error: Unable to rebuild performance counter setting from system backup store, error code is 2

unable to rebuild performance counter setting from system backup store, error code is 2

To fix this issue, you need to follow the below information

  • Close the command prompt.
  • Run the command prompt with “Run as administrator” mode and rerun the command lodctr /R.
  • If you are facing the same issue again, close the command prompt and rerun with “Run as administrator” mode, meaning repeat the same 2 to 3 times.

Now, you should get a successful message like below

Unable to rebuild performance counter setting from system backup store error

3. We have successfully fixed the issue. Now, start the Azure Cosmos DB Emulator; this time, it should run without issues.

You may also like following the articles below

Wrapping Up

This article taught us how the Azure Cosmos DB Emulator will work for you by fixing all the above issues.

Hope it will help !!!

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!