Ps-session error on Azure Hosted Build Agents

45 Views Asked by At

We were using AzureFileCopy to transfer files to a VM. The latest release has introduced a bug which means you receive an error when trying to do this. Apparently the url and the SAS token should have a ? between them but this has been missed out. I have reported the issue.

A solution was to break the task into two, one to copy the file to a storage account and a second to use azcopy to copy the storage blob data to the VM.

The task in the release is PowerShell on Target Machines and the inline script is literally calling azcopy with parameters. We implemented the same task, but we are getting Ps-session authentication errors on the task, other IIS site stop and start tasks are working fine though.

Error logs-

VERBOSE: information, see the about_Remote_Troubleshooting Help topic.'
##[error]Unable to create pssession. Error: 'Connecting to remote server devapp.australia.cloudapp.azure.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.'
##[debug]Processed: ##vso[task.logissue source=TaskInternal;type=error]Unable to create pssession. Error: 'Connecting to remote server devapp.australia.cloudapp.azure.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.'
VERBOSE: Leaving Get-WinRmConnectionToTargetMachine.
VERBOSE: Entering Disconnect-WinRmConnectionToTargetMachines.
VERBOSE: Entering Get-RemoteConnection.
VERBOSE: Error record:

Things we have tried to resolve this:

  • Check all the Winrm and Ps-session configs on target machines
  • Port allowances
  • Winrm rules

So everything is working as expected.

Our IIS start and stop tasks are also working fine, its just this task with the Winrm-session error on this task which is hindering the final step for us.

0

There are 0 best solutions below