Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve Account doesn't get updated #37

Open
jabteles opened this issue Jun 25, 2020 · 4 comments · Fixed by #35
Open

Serve Account doesn't get updated #37

jabteles opened this issue Jun 25, 2020 · 4 comments · Fixed by #35
Labels
enhancement New feature or request
Milestone

Comments

@jabteles
Copy link

A first deploy of a Windows Service specifies a "Run As Username".

If the "Run As Username" changes in a future release the service account specified earlier doesn't get updated.

@Dejulia489
Copy link
Owner

Resolved with PR #35.

Check the 'Recreate service' flag under the installation section. This will delete and recreate the service if it already exists.

@Dejulia489 Dejulia489 added the enhancement New feature or request label Jun 30, 2020
@Dejulia489 Dejulia489 linked a pull request Jun 30, 2020 that will close this issue
@jabteles
Copy link
Author

I don't know if I should leave the feedback here (if not tell me), but after updating and using "Recreate service flag" enabled I got the following error (some elements were changed for privacy):

2020-06-30T17:35:56.7130748Z ##[debug]Evaluating condition for step: 'Deploy Windows Service' 2020-06-30T17:35:56.7131384Z ##[debug]Evaluating: succeeded() 2020-06-30T17:35:56.7131538Z ##[debug]Evaluating succeeded: 2020-06-30T17:35:56.7131766Z ##[debug]=> True 2020-06-30T17:35:56.7131978Z ##[debug]Result: True 2020-06-30T17:35:56.7132191Z ##[section]Starting: Deploy Windows Service 2020-06-30T17:35:56.7216593Z ============================================================================== 2020-06-30T17:35:56.7216711Z Task : Windows Service Manager 2020-06-30T17:35:56.7216822Z Description : Deploys a Windows Service to an Agent or a Deployment Group Target using WinRM. 2020-06-30T17:35:56.7216912Z Version : 4.4.9 2020-06-30T17:35:56.7217108Z Author : MDSolutions 2020-06-30T17:35:56.7217196Z Help : [More Information](https://github.com/Dejulia489/WindowsServiceManager) 2020-06-30T17:35:56.7217314Z ============================================================================== 2020-06-30T17:35:57.4016651Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4 2020-06-30T17:35:57.5406095Z ##[debug]INPUT_DEPLOYMENTTYPE: 'Agent' 2020-06-30T17:35:57.5464846Z ##[debug]INPUT_SERVICENAME: 'xxx' 2020-06-30T17:35:57.5522811Z ##[debug]INPUT_ARTIFACTPATH: 'C:\tmp\xxx\' 2020-06-30T17:35:57.5588606Z ##[debug]INPUT_TIMEOUT: '30' 2020-06-30T17:35:57.5645709Z ##[debug]INPUT_CLEANINSTALL: 'true' 2020-06-30T17:35:57.5676552Z ##[debug] Converted to bool: True 2020-06-30T17:35:57.5734446Z ##[debug]INPUT_RECREATESERVICE: 'true' 2020-06-30T17:35:57.5749052Z ##[debug] Converted to bool: True 2020-06-30T17:35:57.5818087Z ##[debug]INPUT_STOPPROCESS: 'true' 2020-06-30T17:35:57.5832922Z ##[debug] Converted to bool: True 2020-06-30T17:35:57.5892284Z ##[debug]INPUT_INSTALLSERVICE: 'true' 2020-06-30T17:35:57.5906208Z ##[debug] Converted to bool: True 2020-06-30T17:35:57.5962262Z ##[debug]INPUT_STARTSERVICE: 'true' 2020-06-30T17:35:57.5976600Z ##[debug] Converted to bool: True 2020-06-30T17:35:57.6080041Z ##[debug]Entering C:\ReleaseAgents\agent1\_work\_tasks\WindowsServiceManager_7dad075d-a817-45ac-baab-4c1376d2885e\4.4.9\DeployWindowsService.ps1. 2020-06-30T17:35:57.6158961Z ##[debug]INPUT_MACHINES: 'server' 2020-06-30T17:35:57.6347574Z Begining deployment to [server] 2020-06-30T17:35:57.6368127Z ##[debug]INPUT_ADMINLOGIN: 'domain\adminuser' 2020-06-30T17:35:57.6386928Z ##[debug]INPUT_PASSWORD: '***' 2020-06-30T17:35:57.6484600Z ##[debug]INPUT_NEWPSSESSIONOPTIONARGUMENTS (empty) 2020-06-30T17:35:57.6572819Z ##[debug]Entering Get-NewPSSessionOption. 2020-06-30T17:35:57.6652623Z ##[debug] arguments: '' 2020-06-30T17:35:57.6668957Z ##[debug]New-PSSessionOption command: New-PSSessionOption 2020-06-30T17:35:57.6733190Z ##[debug]Leaving Get-NewPSSessionOption. 2020-06-30T17:35:57.6759108Z ##[debug]INPUT_USESSL: 'false' 2020-06-30T17:35:57.6773749Z ##[debug] Converted to bool: False 2020-06-30T17:35:57.7283570Z ##[debug]INPUT_INSTALLTOPSHELFSERVICE: 'false' 2020-06-30T17:35:57.7296782Z ##[debug] Converted to bool: False 2020-06-30T17:35:57.7314005Z ##[debug]INPUT_INSTALLATIONPATH: 'C:\WindowsServices\xxx\xxx.exe' 2020-06-30T17:35:57.7330243Z ##[debug]INPUT_SERVICEDISPLAYNAME (empty) 2020-06-30T17:35:57.7346697Z ##[debug]INPUT_SERVICEDESCRIPTION (empty) 2020-06-30T17:35:57.7364260Z ##[debug]INPUT_SERVICESTARTUPTYPE: 'Automatic' 2020-06-30T17:35:57.7842074Z ##[debug]INPUT_RUNASUSERNAME: 'domain\user' 2020-06-30T17:35:57.7858014Z ##[debug]INPUT_RUNASPASSWORD: '***' 2020-06-30T17:35:59.2498446Z [DEVWINSERVICES]: Attempting to locate [xxx] 2020-06-30T17:35:59.2500323Z [DEVWINSERVICES]: Recreate service set to [True], removing the Service [xxx] 2020-06-30T17:36:00.2479125Z WARNING: [server]: Files are still in use by [xxx], stopping the process! 2020-06-30T17:36:00.2480187Z [DEVWINSERVICES]: Copying [C:\tmp\xxx\] to [C:\WindowsServices\xxx] 2020-06-30T17:36:00.2482350Z [DEVWINSERVICES]: Starting [xxx] 2020-06-30T17:36:00.5525335Z [DEVWINSERVICES]: [xxx] started successfully! 2020-06-30T17:36:00.5636253Z ##[debug]Caught exception from task script. 2020-06-30T17:36:00.5661984Z ##[debug]Error record: 2020-06-30T17:36:00.6221412Z ##[debug]Method invocation failed because [System.String] does not contain a method named 'Delete'. 2020-06-30T17:36:00.6230699Z ##[debug] + CategoryInfo : InvalidOperation: (:) [], RuntimeException 2020-06-30T17:36:00.6242312Z ##[debug] + FullyQualifiedErrorId : MethodNotFound 2020-06-30T17:36:00.6252426Z ##[debug] 2020-06-30T17:36:00.6265246Z ##[debug]Script stack trace: 2020-06-30T17:36:00.6295728Z ##[debug]at <ScriptBlock>, <No file>: line 152 2020-06-30T17:36:00.6310228Z ##[debug]Exception: 2020-06-30T17:36:00.6349381Z ##[debug]System.Management.Automation.RemoteException: Method invocation failed because [System.String] does not contain a method named 'Delete'. 2020-06-30T17:36:00.6575992Z ##[error]Method invocation failed because [System.String] does not contain a method named 'Delete'. 2020-06-30T17:36:00.6583144Z ##[debug]Processed: ##vso[task.logissue type=error]Method invocation failed because [System.String%5D does not contain a method named 'Delete'. 2020-06-30T17:36:00.6598647Z ##[debug]Processed: ##vso[task.complete result=Failed] 2020-06-30T17:36:00.6857312Z ##[section]Finishing: Deploy Windows Service

@jabteles
Copy link
Author

@Dejulia489 Did you had the opportunity to check on this? Should I open a new Issue?

@Dejulia489 Dejulia489 reopened this Aug 12, 2020
@Dejulia489 Dejulia489 added this to the 5.0 milestone Aug 12, 2020
@jabteles
Copy link
Author

@Dejulia489 When 5.0? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants