{"record":{"id":"e78a0dd49db6e071","repo":"nats-io/nats-server","slug":"could-not-retrieve-service-status-v","errorCode":null,"errorMessage":"could not retrieve service status: %v","messagePattern":"could not retrieve service status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/signal_windows.go","lineNumber":105,"sourceCode":"\t\tto = svc.Running\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown signal %q\", command)\n\t}\n\n\tstatus, err := s.Control(cmd)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not send control=%d: %v\", cmd, err)\n\t}\n\n\ttimeout := time.Now().Add(10 * time.Second)\n\tfor status.State != to {\n\t\tif timeout.Before(time.Now()) {\n\t\t\treturn fmt.Errorf(\"timeout waiting for service to go to state=%d\", to)\n\t\t}\n\t\ttime.Sleep(300 * time.Millisecond)\n\t\tstatus, err = s.Query()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not retrieve service status: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":87,"sourceCodeEnd":111,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/signal_windows.go#L87-L111","documentation":"Windows ProcessSignal: while polling s.Query() during the state-transition wait loop, querying the service status failed (SCM communication error, service terminated abruptly, etc.). The underlying error is echoed; the wait for the target state is abandoned.","triggerScenarios":"Thrown at server/signal_windows.go:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the service still exists and the SCM is healthy (sc query)","Retry the signal command after a brief pause","Check Windows event logs for service crashes"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}