Closed dhabierre closed 4 years ago
Can you provide a screenshot of the computers administrators role.
Hi @Dejulia489
Here the screenshot:
Information about the OS version:
This morning, I have this output:
[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
[debug]INPUT_DEPLOYMENTTYPE: 'DeploymentGroup'
[debug]INPUT_SERVICENAME: 'Car.Game.WindowsService.GenericServices'
[debug]INPUT_ARTIFACTPATH: 'C:\agents\agent-deployment\_work\r2\a\_CI - Game\WindowsServices\Car.Game.WindowsService.GenericServices'
[debug]INPUT_TIMEOUT: '60'
[debug]INPUT_CLEANINSTALL: 'false'
[debug] Converted to bool: False
[debug]INPUT_STOPPROCESS: 'true'
[debug] Converted to bool: True
[debug]INPUT_INSTALLSERVICE: 'false'
[debug] Converted to bool: False
[debug]Entering C:\agents\agent-deployment\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.1.23\DeployWindowsService.ps1.
[XXX]: Attempting to locate [Car.Game.WindowsService.GenericServices]
[XXX]: Stopping [Car.Game.WindowsService.GenericServices]
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
[debug][XXX]: [Car.Game.WindowsService.GenericServices] did not respond within [60] seconds, stopping process.
...
This issue can be closed.
I have exactly the same issue using Command Line task:
Result:
2020-03-05T10:42:03.8486506Z System error 5 has occurred.
2020-03-05T10:42:03.8486643Z
2020-03-05T10:42:03.8486711Z Access is denied.
2020-03-05T10:42:03.8486756Z
2020-03-05T10:42:03.8511486Z ##[debug]Exit code: 2
2020-03-05T10:42:03.8512195Z ##[debug]Leaving Invoke-VstsTool.
2020-03-05T10:42:03.9190587Z ##[error]Cmd.exe exited with code '2'.
=> right problem.
Thanks!
My 2 cents.
Azure DevOps agent is now running under NT AUTHORITY\SYSTEM account (default one when installing it).
Then, release pipeline:
First, try to stop the service (=> Continue on error):
Finally, restart the service (raise error on failure):
You resolved the permission issue by update the agent service account? Have you tried using the Windows Manager Extension since the update?
Test 1
AzDevOps agent: NT AUTHORITY\SYSTEM (default account when installing the agent) Windows Services: HO\FRGXXX account (admin) Windows Manager extension => access denied
Test 2
AzDevOps agent: HO\FRGXXX Windows Services: HO\FRGXXX Windows Manager extension => access denied
Test 3 (same configuration as Test 1)
AzDevOps agent: NT AUTHORITY\SYSTEM Windows Services: HO\FRGXXX Command Line Script (net stop|start ServiceName) => OK
I've tried again with Windows Manager extension and now it is Ok !? Perhaps an Ops has performed some actions on the server / rights...
Closing this ticket.
Hi,
I am using this task to deploy 2 Windows services. Here the configuration:
=> All services are running using the same domain account (administrator account)
Deployment step (the 2 services have Stop Process option on):
Deployment output (for the 2 services):
[2] => The user did not have the necessary access.
No more information in the EventViewer.
The step cannot neither stop nor start the services.
Any idea? Thanks!