Azure Cosmos DB Emulator Not running - It Starts and then throws Error

Viewed 1226

I am trying to install and run Cosmos DB Emulator on my machine but it is not letting me to connect to Azure Cosmos DB Emulator. When I run the Azure Cosmos DB Emulator, it shows the "Started" notification and then opened a page in browser but the page is not loaded. I am tired of doing everything which I have found on google.

Here is the Azure Cosmos DB Emulator Error:

enter image description here

And when the page is opened on link https://localhost:8081/_explorer/index.html, the Firefox browser shows "Unable to connect"

enter image description here

The strange thing is, when I installed it on another machine, it ran there without any issue.

2 Answers

After full of 3 hectic days, I have successfully run Cosmos DB Emulator. Here is the work around.

  1. Shut down Azure Cosmos DB Emulator
  2. I tried to run lodctr /R in command line by running it as "Run as Administrator", it threw an error: "Error: Unable to rebuild performance counter setting from system backup store, error code is 2"
  3. Found a solution for the lodctr /R error which is to run another command as below: "c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i" It will install ASP.NET (2.0.50727). Here is the link: https://www.stevefenton.co.uk/2016/04/unable-to-rebuild-performance-counter-setting-from-system-backup-store/

  4. Then again run the command lodctr /R, it sets the counter

  5. Then start Azure Cosmos DB Emulator and it will run.

I used to get this constantly, I realised I was shutting down my pc before stopping the emulator. Once I started stopping the emulator before shutdown, this issue went away for me.

Related