since few days, service hooks all fail to notificate (PR updates, Work Item comments and so on) with this error and I don't know why.
TFS is installed on a domain machine (active directory) and had no problems so far.
The funny thing is that if I test in the Service Hook it does work
Slack or Teams. Doesn't matter.
Any ideas?
Error Details
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
143.204.9.158:443
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult,
TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult
ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter
.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.ServiceHooks.Common.HttpActionTask.
<RunAsync>d__8.MoveNext()
Related
Trying to update with UI command from the web portal the self-hosted agent i get the following error:
[2023-01-22 08:49:33Z INFO Agent] Refresh message received, kick-off selfupdate background process.
[2023-01-22 08:49:34Z INFO SelfUpdater] Version '2.214.1' of 'agent' package available in server.
[2023-01-22 08:49:34Z INFO SelfUpdater] Current running agent version is 2.213.2
[2023-01-22 08:49:34Z INFO SelfUpdater] An update is available.
[2023-01-22 08:49:34Z INFO Terminal] WRITE LINE: Agent update in progress, do not shutdown agent.
[2023-01-22 08:49:34Z INFO Terminal] WRITE LINE: Downloading 2.214.1 agent
[2023-01-22 08:49:34Z INFO HostContext] Well known directory 'Bin': 'C:\agent\bin'
[2023-01-22 08:49:34Z INFO HostContext] Well known directory 'Root': 'C:\agent'
[2023-01-22 08:49:34Z INFO HostContext] Well known directory 'Work': 'C:\agent_work'
[2023-01-22 08:49:34Z INFO SelfUpdater] Attempt 1: save latest agent into C:\agent_work_update\agent1.zip.
[2023-01-22 08:49:34Z INFO SelfUpdater] Download agent: begin download
[2023-01-22 08:49:55Z WARN SelfUpdater] Failed to get package 'C:\agent_work_update\agent1.zip' from 'https://vstsagentpackage.azureedge.net/agent/2.214.1/vsts-agent-win-x64-2.214.1.zip'. Exception System.Net.Http.HttpRequestException: 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.
System.Net.Sockets.SocketException (10060): 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.
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at System.Net.Http.HttpClient.FinishGetStreamAsync(Task1 getTask)
at Microsoft.VisualStudio.Services.Agent.Listener.SelfUpdater.DownloadLatestAgent(CancellationToken token)
[2023-01-22 08:49:55Z INFO SelfUpdater] Attempt 2: save latest agent into C:\agent_work_update\agent1.zip.
TRIED THE FOLLOWING
trying to download manually - works.
trying to put the downloaded file in the C:\agent_work_update\agent1.zip. - does not work.
Testing download with powershell Invoke-WebRequest "https://vstsagentpackage.azureedge.net/agent/2.214.1/vsts-agent-win-x64-2.214.1.zip" -OutFile "C:\Windows\Temp\archive.zip" - works .
Download with powershell altanate command (New-Object System.Net.WebClient).DownloadFile("https://vstsagentpackage.azureedge.net/agent/2.214.1/vsts-agent-win-x64-2.214.1.zip", "C:\Windows\Temp\archive1.zip") - works
When running Google.Cloud.Storage.V1 nuget package to upload file to Google Storage behind company's firewall, it hits exception "unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.".
source: VMScaleSet windows VMs
destination: GCS
Nuget package: Google.Cloud.Storage.V1 2.3.0
Here is c# code, to upload local file to GCS.
StorageClient.Create().UploadObject(bucketName, objectName, null, stream);
Authentication has been set up following this guide https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-csharp
Everything works fine on local machine and on-premises serves in company.
But does not work on Azure VMScaleSet VM.
Firewall rule has been implemented between VMScaleSet and www.googleapis.com port 443. Azure VM is able to telnet www.googleapis.com 443
What else could be missing to establish connection?
Please help.
System.Net.Http.HttpRequestException: An error occurred while sending the
request. ---> System.Net.WebException: The underlying connection was
closed: An unexpected error occurred on a send. --->
System.IO.IOException: Unable to read data from the transport connection:
An existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly
closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at Google.Cloud.Storage.V1.StorageClientImpl.UploadHelper.CheckFinalProgress() in T:\src\github\google-cloud-dotnet\releasebuild\apis\Google.Cloud.Storage.V1\Google.Cloud.Storage.V1\StorageClientImpl.UploadObject.cs:line 202
at Google.Cloud.Storage.V1.StorageClientImpl.UploadHelper.Execute() in T:\src\github\google-cloud-dotnet\releasebuild\apis\Google.Cloud.Storage.V1\Google.Cloud.Storage.V1\StorageClientImpl.UploadObject.cs:line 154
at Google.Cloud.Storage.V1.StorageClientImpl.UploadObject(String bucket, String objectName, String contentType, Stream source, UploadObjectOptions options, IProgress`1 progress) in T:\src\github\google-cloud-dotnet\releasebuild\apis\Google.Cloud.Storage.V1\Google.Cloud.Storage.V1\StorageClientImpl.UploadObject.cs:line 70
I have tried Developer Studio 11.3.0, and 12.0.0. I've tried EAP 6.4.0, and 7.1.0. Everything gives me the same error. I've run it with servers in RHEL on AWS and a DevStudio in Windows 10 or Windows 7. I've run it with server and DevStudio on the same Fedora system. Always the same error when I try to "start" the remote server:
The initialization produced an exception, which can occur due to incorrect security credentials. Please review the exception messages by clicking the Details button.
* java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* WFLYPRT0053: Could not connect to http-remoting://LOCALHOST:9990. The connection failed
* Authentication failed: all available authentication mechanisms failed:
JBOSS-LOCAL-USER: javax.security.sasl.SaslException: ELY05128: [JBOSS-LOCAL-USER] Failed to read challenge file [Caused by java.io.FileNotFoundException: /datavirt/jboss/EAP-7.1.0/standalone/tmp/auth/local3848441195962286340.challenge (Permission denied)]
DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Server rejected authentication
Here's a bit of the server.log file, where things go wrong. (It's slightly different in 6.4.0, but not substantially.)
2018-09-01 23:20:52,946 TRACE [org.jboss.remoting.endpoint] (management I/O-2) Allocated tick to 8 of endpoint "miramanee:MANAGEMENT" <68fb9f51> (opened org.jboss.remoting3.EndpointImpl$TrackingExecutor#18776914)
2018-09-01 23:20:52,946 TRACE [org.xnio.nio] (management I/O-2) Running task org.jboss.remoting3.remote.ServerConnectionOpenListener$2#228e4439
2018-09-01 23:20:52,946 TRACE [org.xnio.nio.selector] (management I/O-2) Beginning select on sun.nio.ch.EPollSelectorImpl#617c6bff (with timeout)
2018-09-01 23:20:52,946 TRACE [org.xnio.nio] (management I/O-2) Select, queue is empty
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Handling RealmCallback: selected = [ManagementRealm]
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Handling NameCallback: authenticationName = admin
2018-09-01 23:20:52,946 TRACE [org.wildfly.security] (management task-7) Principal assigning: [admin], pre-realm rewritten: [admin#ManagementRealm], realm name: [DIGEST], post-realm rewritten: [admin#ManagementRealm], realm rewritten: [admin#ManagementRealm]
2018-09-01 23:20:52,947 TRACE [org.wildfly.security] (management task-7) Handling CredentialCallback: obtained credential for correct realm "ManagementRealm"
2018-09-01 23:20:52,947 TRACE [org.wildfly.security] (management task-7) Handling CredentialCallback: obtained credential: org.wildfly.security.credential.PasswordCredential#b75f36fa
2018-09-01 23:20:52,947 TRACE [org.jboss.remoting.remote.server] (management task-7) Server sending authentication rejected: javax.security.sasl.SaslException: ELY05055: [DIGEST-MD5] Authentication rejected (invalid proof)
at org.wildfly.security.sasl.digest.DigestSaslServer.validateDigestResponse(DigestSaslServer.java:281)
at org.wildfly.security.sasl.digest.DigestSaslServer.evaluateMessage(DigestSaslServer.java:358)
at org.wildfly.security.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:180)
at org.wildfly.security.sasl.digest.DigestSaslServer.evaluateResponse(DigestSaslServer.java:331)
at org.wildfly.security.sasl.util.AuthenticationCompleteCallbackSaslServerFactory$1.evaluateResponse(AuthenticationCompleteCallbackSaslServerFactory.java:58)
at org.wildfly.security.sasl.util.AuthenticationTimeoutSaslServerFactory$DelegatingTimeoutSaslServer.evaluateResponse(AuthenticationTimeoutSaslServerFactory.java:106)
I am plumb stumped.
If you want to get it going quickly for learning/etc, then I can just say what I'm doing. I have RHEL 7 & EAP 7.1. I'm using dev studio 12 on same machine. When I added a server into dev studio, I had option to select local or remote. I selected local and had no problems starting via dev studio. The user I'm running dev studio with also has permissions to EAP home directory (I see file perm errors in your error). I also chose management options vs. Filesystem and shell operations. I also test, and this worked picking remote as well. But again, same server for everything/same localhost.
I am using VSTS WindowsMachineFileCopy task for deployment in an on-premise environment. In this on-premise environment, it just can't connect to the destination computer. I can't figure out why not... I've tried using the both the host name and also the machine IP.
What's even more weird is it is reporting "23.102.153.83:443" in the error info when I am trying to connect to a 10.* address...
Here is the exception log from the deployment:
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.
Anyone have any ideas of what the issue might be or what I can look into?
Hosted agent does not support Windows Machine File Copy task (you can also find related issue here).
The work around is use a private agent to deploy. Settings for Windows Machine File Copy task as below:
Machines: IP, such as 10.168.170.111
Admin Login: domain\username
Password: input your password or use a variable
Destination Folder: fully path on the remote machine. Such as C:\Users\username\Desktop\1
I used Curator to newClient, and set retry policy, but if the connection string is wrong, retry connected will always running until out of memory, but I want the program exit once retry 3 times.
RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
CuratorFrameworkFactory.newClient(zkAddress,retryPolicy);
CuratorFrameworkFactory.builder().connectString(zkAddress)
.sessionTimeoutMs(5000).connectionTimeoutMs(12000)
.retryPolicy(retryPolicy).build();
09:03:18.810 [main-SendThread(0:0:0:0:0:0:0:1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
09:03:19.825 [main-SendThread(0:0:0:0:0:0:0:1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at o rg.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)