azure-cosmos-db-emulator-docker icon indicating copy to clipboard operation
azure-cosmos-db-emulator-docker copied to clipboard

Persistent database using docker container

Open Tinekk opened this issue 4 years ago • 0 comments

Emulator is unable to start when binding data folder nor using volumes to handle persistent database

- db_data:C:\Users\ContainerAdministrator\AppData\Local\CosmosDBEmulator
- type: bind
source: .\cosmosdb_data
target: C:\Users\ContainerAdministrator\AppData\Local\CosmosDBEmulator

From transcript you can find that it blocks on Start-CosmosDbEmulator cmdlet

?**********************
Windows PowerShell transcript start
Start time: 20200918113722
Username: User Manager\ContainerAdministrator
RunAs User: User Manager\ContainerAdministrator
Machine: COSMOSDB (Microsoft Windows NT 10.0.14393.0)
Host Application: powershell.exe -NoExit -NoLogo -Command Remove-Item -Path C:\CosmosDB.Emulator\bind-mount\*.pem; C:\CosmosDB.Emulator\Start.ps1; certutil -f -encode C:\CosmosDB.Emulator\bind-mount\CosmosDbEmulatorCert.cer C:\CosmosDB.Emulator\bind-mount\CosmosDbEmulatorCert.pem
Process ID: 1844
PSVersion: 5.1.14393.3471
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.3471
BuildVersion: 10.0.14393.3471
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\CosmosDB.Emulator\bind-mount\Diagnostics\Transcript.log
INFO: Set partition count to 100
INFO: Stop-CosmosDbEmulator
INFO: Start-CosmosDbEmulator -AllowNetworkAccess -NoFirewall -NoUI -Key C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==  -Consistency Session -Timeout 300 -PartitionCount 100
Wait-CosmosDbEmulator : The emulator failed to reach Running status within 300 seconds
At C:\Program Files\Azure Cosmos DB
Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator\Microsoft.Azure.CosmosDB.Emulator.psm1:550 char:12
+     [void](Wait-CosmosDbEmulator -Status Running -Timeout $Timeout)
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Wait-CosmosDbEmulator
Wait-CosmosDbEmulator : The emulator failed to reach Running status within 300 seconds
At C:\Program Files\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator\Microsoft.Azure.CosmosDB.Emulator.psm1:550 char:12
+     [void](Wait-CosmosDbEmulator -Status Running -Timeout $Timeout)
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Wait-CosmosDbEmulator

Maybe you are aware about another way to do this?

Tinekk avatar Sep 18 '20 09:09 Tinekk