我使用 Azure Cosmos Db Emulator 已经大约一年了,现在已经是第三次它突然停止工作了。
我发现解决该问题的唯一方法是完全重新安装 Windows 10 ...
我的配置:
- Windows 10 专业版
- 管理员权限
- AAD 的域名链接
- 防病毒软件:ESET Endpoint 防病毒软件 9.1.2051.0
- 英特尔(R) 酷睿(TM) i5-4670 CPU @ 3.40GHz 3.40 GHz
- 32 Go 内存
- 我的所有软件都安装在 C :
我在命令提示符下尝试此操作(以管理员身份):
- 开始前清除性能计数器
Microsoft.Azure.Cosmos.Emulator.exe/shutdown
lodctr/R
(确定是 2 次)Microsoft.Azure.Cosmos.Emulator.exe
结果:
- 出现“开始”通知
- 在
AppData/Local/CrashDumps
中创建转储文件 - 模拟器“启动”的通知永远不会出现
- 网页打不开
- 卸载 - 重新安装
Microsoft.Azure.Cosmos.Emulator.exe/shutdown
- 删除文件夹
AppData\Local\CosmosDBEmulator
- 卸载 Cosmos Db 模拟器
- 删除文件夹
C:\Program Files\Azure Cosmos DB Emulator
- 重新启动计算机
- 安装最新应用版本:
azure-cosmosdb-emulator-2.14.9-3c8bff92.msi
- 安装结束后检查是否启动模拟器
结果:
- 与 1) 相同的结果
- 开始跟踪
- Microsoft.Azure.Cosmos.Emulator.exe /shutdown
- Microsoft.Azure.Cosmos.Emulator.exe /startwprtraces
- Microsoft.Azure.Cosmos.Emulator.exe
- [wait for 1 minute]
- Microsoft.Azure.Cosmos.Emulator.exe /stopwprtraces
- Microsoft.Azure.Cosmos.Emulator.exe /shutdown
结果:
- 出现“开始”通知
- 在
AppData/Local/CrashDumps
中创建转储文件 - 在等待 1 分钟之前,大约每 20/30 秒就会创建一个转储文件
- 当我执行
Microsoft.Azure.Cosmos.Emulator.exe/stopwprtraces
时,在C:\Program Files\Azure Cosmos 中创建了
docdbemulator_001.etl
数据库模拟器 - 模拟器“启动”的通知永远不会出现
- 网页打不开
我尝试使用 WinDbg.exe 读取转储文件,但发现了此错误消息:
CLR_EXCEPTION_System.Collections.Generic.KeyNotFoundException_80131577_Microsoft.Azure.Documents.Common.dll!Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue
堆栈跟踪是:
00000085`583feb40 00007ffe`49323302 Microsoft_Azure_Documents_Common!Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue+0x52
00000085`583feb80 00007ffe`493230cb Microsoft_Azure_Documents_Common!Microsoft.Azure.Documents.Common.CrashDump.Register+0xdb
00000085`583febf0 00007ffe`48f673ee Microsoft_Azure_Cosmos_Compute_Host_ServiceFabric_EntryPoint!Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.CosmosDBGatewayInit+0x56e
00000085`583fecf0 00007ffe`48f51465 Microsoft_Azure_Cosmos_Compute_Host_ServiceFabric_EntryPoint!Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.Main+0x295
在 Windows 日志中我发现了相同的错误描述(法语):
Application : Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe Version du Framework : v4.0.30319 Description : le processus a été arrêté en raison d'une exception non gérée. Informations sur l'exception : System.Collections.Generic.KeyNotFoundException à Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue(System.String) à Microsoft.Azure.Documents.Common.CrashDump.Register(System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.Azure.Cosmos.Core.IConfigurationProvider) à Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.CosmosDBGatewayInit(System.Fabric.CodePackageActivationContext, System.String) à Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.Main(System.String[])
还有
Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe
2.14.0.0
bc4d0da5
KERNELBASE.dll
10.0.19041.1889
e9ede6d6
e0434352
0000000000034fd9
4360
01d8b7ac99b3d711
C:\Program Files\Azure Cosmos DB Emulator\Packages\CosmosGatewayService\CosmosGatewayService.Code\EP\Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe
C:\WINDOWS\System32\KERNELBASE.dll
01134c47-5efa-4d7a-a243-15af35536df0
最佳答案
最后我发现 Cosmos Db 创建了 3 个安全组,这些安全组在卸载时不会被删除。
我删除了所有 3 个,并删除了每个上的所有注册表引用。 (搜索 Cosmos Db 和 DocDb)
现在,当我重新安装时,一切工作正常!
谢谢大卫的帮助。
关于Azure Cosmos Db 模拟器已启动但从未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73472776/