What does Windows error code 1063 (ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) mean?

 
Previous Next
ERROR_SERVICE_NOT_ACTIVE ERROR_EXCEPTION_IN_SERVICE

ERROR_FAILED_SERVICE_CONTROLLER_CONNECT

ERROR_FAILED_SERVICE_CONTROLLER_CONNECT (1063, 0x00000427) usually means that a service executable called StartServiceCtrlDispatcher while it was running as a normal console program instead of under the Service Control Manager.

Why this happens

Windows starts a service process through the Service Control Manager. The process must call StartServiceCtrlDispatcher to establish the connection used for service-start and control requests. When the same executable is launched from a command prompt for debugging, that connection does not exist and the function returns this error.

Correct debugging design

A service program that also supports console debugging should detect this result and switch to a console-specific execution path. It must not continue as though it had been started as a service. A process can call StartServiceCtrlDispatcher only once, and a real service should make the call early during startup.


Looking for a different code? Search another status or error code.