我正在使用VSTS WindowsMachineFileCopy任务在本地环境中进行部署。在此内部环境中,它只能连接到目标计算机。我无法弄清楚为什么不......我尝试使用主机名和机器IP。VSTS WindowsMachineFileCopy无法连接到我的服务器
什么是更奇怪的是它是在当我试图连接到一个10 *的地址错误信息报告“23.102.153.83:443” ......
这是从部署的异常日志:
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.
任何人有任何想法,可能是什么或我可以看看?
您使用的是部署组吗? –
编号部署组选项卡为空。另外,我在使用ping与服务器地址的文件副本之前立即执行命令行任务。 ping成功。这让我如此难倒。 – dayneo
新信息已经曝光: 我发现这个错误也发生在Remote Powershell任务中。所以我认为目标上的WinRM设置存在问题。它曾经在目标机器上安装,所以我怀疑证书可能已过期....将检查并回复其他调查结果。 – dayneo