Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

documentdb emulator gatewayservice crashing on startup

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://docs.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator#troubleshooting

No etl file is generated to be emailed.

Thanks in advance

like image 487
Chris Avatar asked Feb 02 '17 00:02

Chris


2 Answers

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.

like image 136
Jani Hyytiäinen Avatar answered Oct 04 '22 17:10

Jani Hyytiäinen


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
like image 37
tjeerdhans Avatar answered Oct 04 '22 16:10

tjeerdhans