Mamtha Soni K
Mamtha Soni K

Reputation: 965

DocumentDB Emulator as a Windows Service

I am trying to run DocumentDB Emulator as a windows service using sc utility on a port which is different from the default port 8081 which it is trying to use.

sc create DocumentDBEmulatorService binPath= "path\to\exe\DocumentDB.Emulator.exe /port=8082" start= auto

The Service gets created and fails to start with the following error message

The DocumentDBEmulatorService service failed to start due to the following error.The DocumentDBEmulatorService did not respond to the start or control request in a timely fashion. A timeout was reached (30000 milliseconds) while waiting for DocumentDBEmulatorService service to connect.

Is it possible to run Document DB emulator executable as service or am I trying to something which is clearly not possible ?

Upvotes: 3

Views: 507

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35124

sc will only run an executable which that is a proper Windows service (i.e. implement ServiceMain).

You can try something like NSSM instead.

See answers in this question (except the accepted one) for more options.

Upvotes: 1

Related Questions