1

Currently I'm trying to use tfs 2015 and vNext build system. There is this exception during 'Visual Studio Test Agent Deployment' step, and I'm not really sure what to do.

What might cause this exception:

Executing the powershell script: ...\DeployTestAgent.ps1
DistributedTests: Starting to deploy and configure test agent on test machines.
DistributedTests: Inputs provided are:
DistributedTests: Machines: 
DistributedTests: Username: ...\...
DistributedTests: Machine Group name: Tracker Test Machines
DistributedTests: Run as process: False
DistributedTests: Login Automatically: False
DistributedTests: Disable Screen saver: False
DistributedTests: Agent location: C:\Distr\vstf_testagent.exe
DistributedTests: Update test agent: True
DistributedTests: Run test agent as DataCollection only : False
DistributedTests: Path to script that installs test agent on remote machine: ...\TestAgentInstall.ps1
DistributedTests: Path to script that configures test agent on remote machine: ...\TestAgentConfiguration.ps1
DistributedTests: Path to script that downloads test agent on azure remote machines : ...\DownloadTestAgent.ps1
DistributedTests: Path to script that checks if test agent is installed on remote machine: ...\CheckTestAgentInstallation.ps1
DistributedTests: Test Agent is being copied to: ...\Temp\3bc272a1-3cc0-479e-aff8-84483e1f6ad8\vstf_testagent.exe
DistributedTests: Task 'CopyFilesToTestAgent' on machine '...:5985' is being run
DistributedTests: Task 'CopyFilesToTestAgent' on machine '...:5985' completed.
DistributedTests: Task 'CopyFilesToTestAgent' for machine ...:5985's Error : System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
---> System.Management.Automation.RuntimeException: Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
---> System.Management.Automation.RuntimeException: Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.<>c__DisplayClass26_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
--- End of inner exception stack trace ---
...

Other remote powershell scripts seem to run without troubles. Not sure what it might be.
As usual, don't hesitate to ask for additional information.

2 Answers 2

2

Looks like you need to enable file sharing:

In this specific situation the RoboCopy tool is complaining that the network path was not found, because I forgot to enable file sharing on the target machine. Once I enabled file sharing an running again the build everything was green, and I can verify that all files were correctly copied on target machines.

http://www.codewrecks.com/blog/index.php/2015/06/20/build-vnext-support-for-deploying-bits-to-windows-machines/

4
  • File sharing is enabled. Should I probably share some specific folder?
    – dmigo
    Commented Feb 17, 2016 at 9:27
  • The error log should specify the folder being accessed and the user accessing it. Make sure that user has admin rights on the server.
    – chief7
    Commented Feb 17, 2016 at 11:29
  • it says "Failed to connect to the path \\MachineName with the user...". I don't see any specific folder.
    – dmigo
    Commented Feb 17, 2016 at 12:37
  • Have you reviewed the documentation to ensure you have configured the task correctly? github.com/Microsoft/vso-agent-tasks/tree/master/Tasks/…
    – chief7
    Commented Feb 17, 2016 at 14:24
1

I just had a similar issue and the problem was that I had to enable certain rules in the Windows Firewall that the Filesharing works. I tested it by disabling the firewall completly and then just try to connect through the Windows Explorer to this FileShare via "\MachineName"

As soon as this worked, this error was gone as well. After this I reenabled the Firewall again and tried to figure out the rules that have to be added. In the Advanced Firewall settings are some rules regarding File and Printer Sharing that are disabled, I enabled those and that made it work.

Hope this helps

1
  • The firewall is off, but the case is occured
    – toha
    Commented Aug 4, 2016 at 10:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.