6

I was looking to learn about documentdb and installed the emulator seemingly without error. However, upon startup I have a service crashing:

GatewayServiceStartup

Judging from the title I am guessing it is an important service to the emulator. Interestingly enough it seems like the emulator continues to load and attempts to open : https://localhost:8081/_explorer/index.html

without success.

using the command prompt I attempted to start the gateway services manually and here is the results:

C:\Program Files\DocumentDB Emulator\Packages\GatewayService\GatewayService.Code>documentdb.gatewayservice.exe /?

Unhandled Exception: System.Runtime.InteropServices.COMException: Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)) at System.Runtime.InteropServices.RuntimeEnvironment.GetDeveloperPath() at System.AppDomain.SetupFusionStore(AppDomainSetup info, AppDomainSetup oldInfo) at System.AppDomain.SetupDomain(Boolean allowRedirects, String path, String configFile, String[] propertyNames, String[] propertyValues)

C:\Program Files\DocumentDB Emulator\Packages\GatewayService\GatewayService.Code>documentdb.startupentrypoint.exe /?

Unhandled Exception: System.Runtime.InteropServices.COMException: Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)) at System.Runtime.InteropServices.RuntimeEnvironment.GetDeveloperPath() at System.AppDomain.SetupFusionStore(AppDomainSetup info, AppDomainSetup oldInfo) at System.AppDomain.SetupDomain(Boolean allowRedirects, String path, String configFile, String[] propertyNames, String[] propertyValues)

C:\Program Files\DocumentDB Emulator\Packages\GatewayService\GatewayService.Code>

Is the gateway service relevant? Any idea how to fix?

Quick Edit: I have followed the directions listed here: https://learn.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator#troubleshooting

No etl file is generated to be emailed.

Thanks in advance

Chris
  • 476
  • 1
  • 9
  • 17

5 Answers5

5

I fixed this issue simply with LODCTR /R to fix performance counters.

C:\WINDOWS\system32>LODCTR /R

Error: Unable to rebuild performance counter setting from system backup store, error code is 2
C:\WINDOWS\system32>LODCTR /R

Info: Successfully rebuilt performance counter setting from system backup store
C:\WINDOWS\system32>

I just needed to run it twice to succeed.

Jani Hyytiäinen
  • 5,293
  • 36
  • 45
2

I got the following exception when debugging the GatewayServiceStartup process:

Cannot load Counter Name data because an invalid index '' was read from the registry.

Fixed it using Cannot load Counter Name data because an invalid index -Exception:

In an elevated command prompt:

C:\windows\SysWOW64> lodctr /r
tjeerdhans
  • 1,058
  • 10
  • 13
0

Chris- The recommendation is to send dump and/or trace files to askdocdb@microsoft.com. Specific instructions for retrieving the files are provided here: https://learn.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator#troubleshooting. -Mimi

Mimi Gentz
  • 1,628
  • 10
  • 14
  • I saw that before I posted and it seems to pertain specifically to the emulator and when I tried the /starttraces /stoptraces no files where generated. I just repeated the steps to confirm. But thank you for the response and suggestion. I should have qualified that in the original post – Chris Feb 02 '17 at 17:22
0

Working with askdocdb@microsoft.com, we were able to resolve the issue.

Reviewing the crash dump files turns out that a perf counter was causing an issue. I disabled the perf counter and then everything worked as intended.

The perf counter in question was 2005 sqlexpress.

Special thanks to Momin for taking the time to work with me through the issue.

Chris
  • 476
  • 1
  • 9
  • 17
  • Similar issue here - I've submitted 2 dumps, but I'm impatient, as my MSDN credits were blown on the real DocDB, and I'm stuck without the emu. The crash is InvalidOperation("Cannot load Counter Name data because an invalid index '' was read from the registry.") in PerformanceCounterLib.GetStringTable() - further up the stack is CategoryExists(machine=".", category="DocDB Gateway"). Any suggestions welcome! – Robert Schmidt Feb 23 '17 at 13:49
0

I had the same problem. I unistalled Sql Server 2008 R2.Not compatible win win 10 anyway.

Paul Stanley
  • 1,999
  • 1
  • 22
  • 60