If you have ever attempted to download the Azure Cosmos Emulator msi 2.7.2 or later from Microsoft but have come across an error which says:
“Installer is no longer responding.”
Something like this:
You are not alone.
You may not actually get this error immediately. In fact, for me, I only saw this dialog about 20 minutes after I double-clicked the msi installer.
You may also noticed a text file in the same location of the installer with an error log such as this:
##[section]Starting: Run Azure Cosmos DB Emulator container
==============================================================================
Task : Azure Cosmos DB Emulator
Description : Create and start an Azure Cosmos DB Emulator container for testing
Version : 2.2.13
Author : Microsoft
Help : [More information](https://go.microsoft.com/fwlink/?LinkID=link-id)
==============================================================================
[command]C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NonInteractive -NoProfile -Command D:\a\_tasks\CosmosDbEmulator_63c722b8-ca8a-4830-8a46-8a6b7bce9c00\2.2.13\scripts\run.ps1 -ContainerName azure-cosmosdb-emulator -HostDirectory D:\a\1\b\azure-cosmosdb-emulator -Consistency Session -PublishParticular 8081:8081,8901:8901,8902:8902,8979:8979,10250:10250,10251:10251,10252:10252,10253:10253,10254:10254,10255:10255,10256:10256,10350:10350 -OutputFile D:\a\1\s\run-cosmosdbemulatorcontainer.8zXjQj\result.json
docker create --interactive --tty --memory 2GB --name 'azure-cosmosdb-emulator' --mount 'type=bind,source=D:\a\1\b\azure-cosmosdb-emulator,destination=C:\CosmosDB.Emulator\bind-mount' -e COSMOSDB_EMULATOR_INSTALLATION_TYPE=VSIX --publish 8081:8081 --publish 8901:8901 --publish 8902:8902 --publish 8979:8979 --publish 10250:10250 --publish 10251:10251 --publish 10252:10252 --publish 10253:10253 --publish 10254:10254 --publish 10255:10255 --publish 10256:10256 --publish 10350:10350 microsoft/azure-cosmosdb-emulator:2.2.1-2b4af9b3 '*>' C:\CosmosDB.Emulator\bind-mount\Diagnostics\Output.txt -Timeout 240 -Consistency Session
Unable to find image 'microsoft/azure-cosmosdb-emulator:2.2.1-2b4af9b3' locally
2.2.1-2b4af9b3: Pulling from microsoft/azure-cosmosdb-emulator
3889bb8d808b: Already exists
d0c71fc8924e: Pulling fs layer
.
.
.
a4343a3ed891: Pull complete
Digest: sha256:c575cd046891fff30720131520178061f6329f2a3738b9a5f1e7392b547e8903
Status: Downloaded newer image for microsoft/azure-cosmosdb-emulator:2.2.1-2b4af9b3
container 4c568fedcd12f7467d906eb3a8498e44d3b8a61821985490fa3b53143341b3ff created from image microsoft/azure-cosmosdb-emulator:2.2.1-2b4af9b3
container 4c568fedcd12f7467d906eb3a8498e44d3b8a61821985490fa3b53143341b3ff started
Task failed: container 4c568fedcd12f7467d906eb3a8498e44d3b8a61821985490fa3b53143341b3ff emulator did not reach Running status within 240 seconds (current status: Stopped)
**********************
Windows PowerShell transcript start
Start time: 20190605143941
Username: User Manager\ContainerAdministrator
RunAs User: User Manager\ContainerAdministrator
Machine: 4C568FEDCD12 (Microsoft Windows NT 10.0.14393.0)
Host Application: powershell.exe -NoExit -NoLogo -Command C:\CosmosDB.Emulator\Start.ps1 *> C:\CosmosDB.Emulator\bind-mount\Diagnostics\Output.txt -Timeout 240 -Consistency Session
Process ID: 5344
PSVersion: 5.1.14393.2636
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.2636
BuildVersion: 10.0.14393.2636
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
**********************
Windows PowerShell output
Transcript started, output file is C:\CosmosDB.Emulator\bind-mount\Diagnostics\Transcript.log
**********************
Start-CosmosDbEmulatorContainer : container 4c568fedcd12f7467d906eb3a8498e44d3b8a61821985490fa3b53143341b3ff emulator
did not reach Running status within 240 seconds (current status: Stopped)
At D:\a\_tasks\CosmosDbEmulator_63c722b8-ca8a-4830-8a46-8a6b7bce9c00\2.2.13\scripts\run.ps1:67 char:13
+ $info = Start-CosmosDbEmulatorContainer -Container "$containerId" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Start-CosmosDbEmulatorContainer
##[error]C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe failed with return code: 1
##[section]Finishing: Run Azure Cosmos DB Emulator container
If any of the above you’ve have experienced. Read on!
How to resolve it
First and foremost, ensure Docker desktop is installed and its set to using Windows containers. Why? well, it only works on Windows containers.
Then, in a terminal of your choice run the following Docker command to pull the latest Azure Cosmos emulator.
docker pull mcr.microsoft.com/cosmosdb/windows/azure-cosmos-emulator
This may take a while as it’s several GBs in size.
Once completed, execute this:
md %LOCALAPPDATA%\CosmosDBEmulator\bind-mount
Finally, run the docker image. Yeah, it’s pretty long command.
docker run --name azure-cosmosdb-emulator --memory 2GB --mount "type=bind,source=%LOCALAPPDATA%\CosmosDBEmulator\bind-mount,destination=C:\CosmosDB.Emulator\bind-mount" --interactive --tty -p 8081:8081 -p 8900:8900 -p 8901:8901 -p 8902:8902 -p 10250:10250 -p 10251:10251 -p 10252:10252 -p 10253:10253 -p 10254:10254 -p 10255:10255 -p 10256:10256 -p 10350:10350 mcr.microsoft.com/cosmosdb/windows/azure-cosmos-emulator
It may take a moment to start up, but be patient.
Verify it’s all up running
Once it’s up and running, you can verify by navigating to the following url in a browser:
https://localhost:8081/_explorer/index.html
You should see something like this: