Cosmos DB Emulator returns only HTTP 503 Service Unavailable

Daniel Saner 30 Reputation points
2025-05-27T13:20:55.8166667+00:00

The local Cosmos DB Emulator used to work fine on my system a couple of months ago, but now it's not responding to any operation from the Data Explorer frontend or a .NET client.

System: Windows 11 Enterprise, build 22621
Version: Azure Cosmos DB Emulator 2.14.23 (Windows Installer version)
Browser: Firefox 138.0.4 (also tested: Edge 136.0.3240.92)

I have completely reset, uninstalled, and reinstalled the emulator in order to try and fix the problem:

  • Chose Reset Data from the tray icon.
  • Uninstalled the emulator.
  • Deleted the %ProgramFiles%\Azure Cosmos DB Emulator folder.
  • Deleted the %LOCALAPPDATA%\CosmosDBEmulator folder.
  • Reinstalled from azure-cosmosdb-emulator-2.14.23-fc82dff5.msi.

The following are the steps I go through to reproduce the issue:

  1. Start the Azure Cosmos DB emulator through the start menu shortcut (Microsoft.Azure.Cosmos.Emulator.exe) as Administrator.
    1. I also tried using the /DisableRIO switch – same result.
    2. I also tried using a different port using the /Port= switch – same result.
  2. After the emulator is fully booted up, open the Data Explorer in the browser by clicking Open Data Explorer... from the emulator tray icon. The Explorer loads fine (at https://localhost:8081/_explorer/index.html).
  3. In the web UI, click the "Explorer" tab in the navigation menu on the left.

Expected result:

  • The Data Explorer UI should load and display the existing databases.
  • A new database can be created through the New Database option.
  • An application should be able to connect to the local database.

Actual result:

  • The Data Explorer UI shows no existing databases.
    • The notification pane in the bottom shows an entry saying "Querying databases" with a little spinner, which never finishes.
    • The browser console shows the following error message: Database account name not found in userContext AppStatePersistenceUtility.ts:103:16
  • Trying to create a new database through the New Database option will overlay a loading spinner that never goes away. The UI is stuck and nothing ever happens.
    • The notification pane in the bottom shows an entry saying "Creating a new database <name>" with a little spinner, which never finished.
  • The result is the same across browsers.
  • The application, for the development of which I need the emulator, fails to connect to the database with a 503 Service Unavailable error:
    • Fail to reach gateway endpoint https://localhost:8081/, Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: ServiceUnavailable (503); Substatus: 20003
    • There has been no change to the code or configuration since the time that the emulator and my application still worked.

At this point, I have tried every possible workaround and reset that I could find mentioned online (including everything from the official Troubleshoot page). I still cannot get the emulator to respond to anything.

There are dozens of discussion online of people having the same problem. Every single one basically boils down to "don't use Cosmos DB" 😑

Does anybody have any idea on something else I could try, or how to find the root cause?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Daniel Saner 30 Reputation points
    2025-05-27T14:00:31.7666667+00:00

    Update:

    I have since "resolved" my immediate issue by downgrading the emulator to version 2.14.21. Which wasn't trivial because Microsoft don't keep around download links of the old versions. I had to use Winget, but even there not all old versions work because for some of them, the download server ironically returns HTTP 503 Service Unavailable 😅

    I conclude that version 2.14.23 of the emulator is simply broken. Or "more broken", as my online research has shown that the tool already has a reputation for being extremely unstable.

    Here is the currently still active download link for the working v2.14.21:

    https://cdbemulator-dmhwaeevbhd3e9f8.b02.azurefd.net/msi/pipeline/azure-cosmosdb-emulator-2.14.21-609d268f.msi

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.