Azure Cosmos DB Emulator not working

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. Along with that, we will also discuss how to fix the error “Azure Cosmos DB Emulator port 8081 is already in use“, how to fix the error ” An instance of the Azure Cosmos Emulator is already running ” and Azure Cosmos DB Emulator download.

Azure Cosmos DB Emulator not working

Recently, while trying to run the Azure Cosmos DB Emulator, I have encountered an error and 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 working
Azure Cosmos DB Emulator not running

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

Azure Cosmos DB Emulator not working [Solved]

To fix the issue Azure Cosmos DB Emulator not running, follow the below approaches.

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 the Approach-1 didn’t work and still you are getting the same error, try the next approach and that 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 will 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

Unable to rebuild performance counter setting from system backup store

To fix this issue, you just 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 again facing the same issue, close the command prompt again and rerun with “Run as administrator” mode meaning repeat the same for 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. Now, start the Azure Cosmos DB Emulator and this time it should run without any issue.

You may also like following the below articles

Azure Cosmos DB Emulator port 8081 is already in use

When You are trying to run the Azure Cosmos DB Emulator in your local machine, there might be a chance It will show you the error “Azure Cosmos DB Emulator port 8081 is already in use”.

You can see it here

Azure Cosmos DB Emulator port 8081 is already in use

Now, let’s see how to fix the issue Azure Cosmos DB Emulator port 8081 is already in use.

Azure Cosmos DB Emulator port 8081 is already in use [ Solved ]

To solve this issue, what we need to do is, we need to allow another port for the Azure Cosmos DB Emulator.

By default, the installation path for the Azure Cosmos DB Emulator is C:\Program Files\Azure Cosmos DB Emulator.

Follow the below steps to change the port to fix the error Azure Cosmos DB Emulator port 8081 is already in use.

  1. Open the command prompt and type cd C:\Program Files\Azure Cosmos DB Emulator
  2. Now type the below command
C:\Program Files\Azure Cosmos DB Emulator>CosmosDb.Emulator /port=8084

You can see it here

Azure Cosmos DB Emulator port 8081 is already in use error

Now can able to run the Azure CosmosDB Emulator and will run on port 8084.

An instance of the Azure Cosmos Emulator is already running

Sometimes, while opening or while trying to run the Azure Cosmos Emulator, you might get the error An instance of the Azure Cosmos Emulator is already running.

You can see the error pop up here

An instance of the Azure Cosmos Emulator is already running

Now, let’s find out a quick solution for the issue An instance of the Azure Cosmos Emulator is already running.

An instance of the Azure Cosmos Emulator is already running [Solved]

The error is because you might have already opened another instance of the Azure Cosmos Emulator on the same machine and again you are trying to open a new instance.

In some cases, I have noticed even though you have already closed the 1st instance of the Azure Cosmos Emulator still you will get the error An instance of the Azure Cosmos Emulator is already running on opening a new instance. The reason is even though you have already closed the Azure Cosmos Emulator, still, the 1st instance is active and it is hidden.

Below are the solutions for this issue

  • Make sure to close the active instances of the Azure Cosmos Emulator before opening any new instance.
  • If you are still facing the same issue, Restart your machine and then try opening the Azure Cosmos Emulator and this time it will definitely open without any issue.

Azure Cosmos DB Emulator download

Well, you can quickly Download Azure Cosmos DB Emulator now.

Once you will click on the above link, you can get the setup like below

cosmos db emulator download windows 10

Once, you have downloaded the setup, you can double click on the setup and follow the instruction to install the Azure Cosmos DB Emulator on your machine.

You may also like following the below articles

Wrapping Up

In this article, we have discussed the solution for the error Azure Cosmos DB Emulator not working. You can try the above approaches to fix the error Azure Cosmos DB Emulator not running. Along with that, we have also discussed how to fix the error Azure Cosmos DB Emulator port 8081 is already in use, how to fix the error ” An instance of the Azure Cosmos Emulator is already running ” and Azure Cosmos DB Emulator download, Azure cosmos DB Emulator free download.

Hope it will help !!!