How to Fix Startup Error in Cosmos DB Emulator on Windows

Greg Gum 11 Reputation points
2024-11-04T12:42:45.8733333+00:00

I downloaded and ran the setup for Cosmos DB Emulator. (https://aka.ms/cosmosdb-emulator)

The installation completes successfully, but when trying to run the emulator, the following error message is shown:

User's image

Afterward, the emulator shuts down.

Attempts made to resolve the issue:

Rebooting after the installation.

Uninstalling and reinstalling the emulator.

Searching for certificates in the store; no certificates were found.

Running Microsoft.Azure.Cosmos.Emulator.exe /GenCert, which fails with an error message:

User's image

I also tried running Microsoft.Azure.Cosmos.Emulator.exe /ResetDataPath, which completed successfully. However, regenerating the certificates still fails.

Web searches, including a thread on StackOverflow, suggest regenerating certificates: StackOverflow Thread.

What steps can be taken to resolve this issue?

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

1 answer

Sort by: Most helpful
  1. Sai Raghunadh M 4,640 Reputation points Microsoft External Staff Moderator
    2024-11-04T14:59:10.8433333+00:00

    Hi @ Greg Gum,

    Thanks for the question and using MS Q&A platformWhen you connect to the emulator from Node.js SDKs, TLS verification is disabled. By default, the Node.js SDK (version 1.10.1 or later) for the API for NoSQL doesn't try to use the TLS/SSL certificate when it connects to the local emulator.

    If you installed the certificates into the Java certificate store or used them elsewhere, you must reimport them using the current certificates. Your application can't connect to the local emulator until you update the certificates.

    Please go through this documentation that might help you: https://learn.microsoft.com/en-us/troubleshoot/azure/cosmos-db/tools-connectors/emulator?source=recommendations#import-certificate-for-nodejs-applications.

    Hope this helps. Do let us know if you any further queries. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.