certify
certify copied to clipboard
[v5] Deployment Tasks: Start a Service incorrectly attempts Stop instead
Version: 5.0.6.0
Stop and restart seem to work; start throws an exception:
2020-05-14 16:47:31.179 -04:00 [INF] ---- Performing Task [On-Demand or Manual Execution] :: Start hMailServer ----
2020-05-14 16:47:31.179 -04:00 [INF] Task [Start hMailServer] :: Task is enabled and primary request was successful.
2020-05-14 16:47:31.181 -04:00 [INF] Starting service [hMailServer]
2020-05-14 16:47:31.183 -04:00 [ERR] Start hMailServer (Stop, Start or Restart a Service) :: Task Failed with Exception :: System.InvalidOperationException: Cannot stop hMailServer service on computer '.'. ---> System.ComponentModel.Win32Exception: The service has not been started
--- End of inner exception stack trace ---
at System.ServiceProcess.ServiceController.Stop()
at Certify.Providers.DeploymentTasks.Core.ServiceManager.<Execute>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Certify.Providers.DeploymentTasks.DeploymentTask.<Execute>d__10.MoveNext()
As a side request, is it possible for "restart" to start a service if it is currently stopped, instead of throwing an error that it cannot stop a stopped service?
Will get that fixed and will also skip Stop if service state is already stopped. Thanks for testing!
Updated beta release is out now.