VSTS WindowsMachineFileCopy无法连接到我的服务器

时间:2017-09-11 12:17:00

标签: azure-devops devops

我正在使用VSTS WindowsMachineFileCopy任务在内部部署环境中进行部署。在此内部部署环境中,它无法连接到目标计算机。我无法弄清楚为什么不...我已尝试使用主机名和机器IP。

报道" 23.102.153.83:443"更奇怪的是什么?在我尝试连接到10. *地址时的错误信息...

以下是部署的异常日志:

2017-09-11T12:00:07.5928347Z Executing the powershell script: 
C:\agent\_work\_tasks\WindowsMachineFileCopy_731004d4-1d66-4f70-8c05-638018b22210\1.0.41\WindowsMachineFileCopy.ps1
2017-09-11T12:03:56.2892363Z ##[error]System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 23.102.153.83:443
2017-09-11T12:03:56.2892363Z    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
2017-09-11T12:03:56.2892363Z    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
2017-09-11T12:03:56.2892363Z    --- End of inner exception stack trace ---
2017-09-11T12:03:56.2892363Z    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
2017-09-11T12:03:56.2892363Z    at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
2017-09-11T12:03:56.2892363Z    --- End of inner exception stack trace ---
2017-09-11T12:03:56.2892363Z    at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext()
2017-09-11T12:03:56.2892363Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:03:56.2892363Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__49.MoveNext()
2017-09-11T12:03:56.2892363Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:03:56.2892363Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__46`1.MoveNext()
2017-09-11T12:03:56.2892363Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:03:56.2892363Z    at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
2017-09-11T12:03:56.2892363Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:03:56.2892363Z    at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
2017-09-11T12:03:56.2892363Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:03:56.2892363Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:03:56.3048364Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:03:56.3048364Z    at Microsoft.TeamFoundation.DistributedTask.Task.Internal.Core.TaskContextHelper.GetConnection(Uri serverUri, VssCredentials credentials)
2017-09-11T12:03:56.3048364Z    at Microsoft.TeamFoundation.DistributedTask.Task.Internal.Core.TaskContextHelper.GetVssConnection(ITaskContext context)
2017-09-11T12:03:56.3048364Z    at Microsoft.TeamFoundation.DistributedTask.Task.Internal.GetVssConnectionCmdlet.ProcessRecord()
2017-09-11T12:03:56.3048364Z    at System.Management.Automation.CommandProcessor.ProcessRecord()
2017-09-11T12:10:29.3339268Z ##[error]System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 23.102.153.83:443
2017-09-11T12:10:29.3339268Z    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
2017-09-11T12:10:29.3339268Z    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
2017-09-11T12:10:29.3339268Z    --- End of inner exception stack trace ---
2017-09-11T12:10:29.3339268Z    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
2017-09-11T12:10:29.3339268Z    at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
2017-09-11T12:10:29.3339268Z    --- End of inner exception stack trace ---
2017-09-11T12:10:29.3339268Z    at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext()
2017-09-11T12:10:29.3339268Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:10:29.3339268Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__49.MoveNext()
2017-09-11T12:10:29.3339268Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:10:29.3339268Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__46`1.MoveNext()
2017-09-11T12:10:29.3339268Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:10:29.3339268Z    at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
2017-09-11T12:10:29.3339268Z --- End of stack trace from previous location where exception was thrown ---
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-09-11T12:10:29.3339268Z    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
2017-09-11T12:10:29.3339268Z    at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
2017-09-11T12:10:29.3339268Z ##[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Environment' because it is null.
2017-09-11T12:10:29.3339268Z    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
2017-09-11T12:10:29.3339268Z    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
2017-09-11T12:10:29.3339268Z    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
2017-09-11T12:10:29.3339268Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-09-11T12:10:29.3339268Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-09-11T12:10:29.3651269Z ##[error]System.Management.Automation.RuntimeException: No machine exists under environment: '10.XXXXXXXXXX' for deployment ---> System.Management.Automation.RuntimeException: No machine exists under environment: '10.XXXXXXXXXX' for deployment
2017-09-11T12:10:29.3651269Z    --- End of inner exception stack trace ---
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-09-11T12:10:29.3651269Z    at System.Management.Automation.PowerShell.Invoke[T](IEnumerable input, IList`1 output, PSInvocationSettings settings)
2017-09-11T12:10:29.3651269Z    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-09-11T12:10:29.3807269Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.

任何人都有任何关于问题可能是什么或我可以研究什么的想法?

1 个答案:

答案 0 :(得分:2)

托管代理不支持Windows计算机文件复制任务(您还可以找到相关问题here)。

解决方法是使用private agent进行部署。 Windows机器文件复制任务的设置如下:

计算机:IP,例如10.168.170.111

管理员登录:domain\username

密码:输入密码或使用变量

目标文件夹:远程计算机上的完全路径。例如C:\Users\username\Desktop\1