Skip to content

Instantly share code, notes, and snippets.

@DavidA2014
Created October 4, 2017 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidA2014/6870afc1860e25589c9336c6ec495da8 to your computer and use it in GitHub Desktop.
Save DavidA2014/6870afc1860e25589c9336c6ec495da8 to your computer and use it in GitHub Desktop.
C:\jenkins\slave_agent>jenkins-slave.exe install
2017-10-04 16:22:04,249 INFO - Installing the service with id 'jenkinsslave-c__jenkins'
2017-10-04 16:22:04,268 FATAL - WMI Operation failure: ServiceMarkedForDeletion
WMI.WmiException: ServiceMarkedForDeletion
at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , ErrorControl , StartMode , Boolean , String , String , String[] )
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
WMI.WmiException: ServiceMarkedForDeletion
at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , ErrorControl , StartMode , Boolean , String , String , String[] )
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
C:\jenkins\slave_agent>jenkins-slave.exe uninstall
2017-10-04 16:22:16,409 INFO - Uninstalling the service with id 'jenkinsslave-c__jenkins'
2017-10-04 16:22:16,417 WARN - The service with id 'jenkinsslave-c__jenkins' does not exist. Nothing to uninstall
C:\jenkins\slave_agent>jenkins-slave.exe restart
2017-10-04 16:22:25,488 INFO - Restarting the service with id 'jenkinsslave-c__jenkins'
2017-10-04 16:22:25,498 FATAL - WMI Operation failure: NoSuchService
WMI.WmiException: NoSuchService
at winsw.WrapperService.ThrowNoSuchService()
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
WMI.WmiException: NoSuchService
at winsw.WrapperService.ThrowNoSuchService()
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
@v-2vinty
Copy link

Did anyone find a fix for this abrupt "WMI.WmiException: NoSuchService" error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment