'Azure CosmosDb Emulator Error: Failed loading emulator secrets certificate

I installed Azure CosmosDb Emulator but it does not start and gives error: "Failed loading emulator secrets certificate. Error: 0x80092022" When I check my certificates, it also does not create any certificates related to cosmos db emulator. Then, I tried to create the certificates manually by "Microsoft.Azure.Cosmos.Emulator.exe /GenCert" command on cmd but this time show the error "Error generating Emulator SSL certificates"

How can I solve this problem?



Solution 1:[1]

This is an issue I am actively troubleshooting as well. The way to generate the missing certificates is to do the following:

  1. Open cmd.exe with Administrator

  2. Navigate to CosmosDB Install folder with this command

    C:\Program Files\Azure Cosmos DB Emulator

  3. Run this command to ensure the CosmosDB Emulator is shutdown

    Microsoft.Azure.Cosmos.Emulator.exe /Shutdown

  4. Run this command to generate the missing certificates:

    Microsoft.Azure.Cosmos.Emulator.exe /GenCert

  5. Ensure the following certificate correctly generated in Computer Certificates under Local Computer\Personal\Certificates

    DocumentDbEmulatorCertificate | LocalHost

  6. Start CosmosDB from either the start menu or command line and wait for it to fully initialize

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 gemstarrk