VSTS WindowsMachineFileCopy can't connect to my server - azure-devops

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

Related

Can't see generated PAT on Azure DevOps Server 2019 after installing December 2019 update

We've just installed the December 2019 update to Azure DevOps server. I'm trying to register a new build agent, but generating a PAT is failing, with the following error in the browser console:
ContributionData unavailable for 'ms.vss-token-web.personal-access-token-issue-session-token-provider', ExceptionType: 'CryptographicException', Reason: Access denied.
, StackTrace: null
Everything else on the server is working fine - admin console, web interface, repos etc but my PATs will need updating soon anyway so I'm a bit leery that this problem could stall all our build pipelines! I know this is a very recent update but has anyone else seen this?
** EDIT **
There's an exception in the server event log:
System.Security.Cryptography.CryptographicException: Access denied.
at Microsoft.VisualStudio.Services.Tokens.TokenServiceBase.ExecuteServiceMethods[T](IVssRequestContext requestContext, Func`2 localServiceMethod, Func`2 tokenServiceMethod, Int32 tracepoint, String area, String layer, String callerName, Int32 percent)
at Microsoft.VisualStudio.Services.DelegatedAuthorization.PlatformDelegatedAuthorizationService.Exchange(IVssRequestContext requestContext, GrantType grantType, JsonWebToken grant, JsonWebToken clientSecret, Uri redirectUri, Nullable`1 accessId)
at Microsoft.VisualStudio.Services.DelegatedAuthorization.OAuth2TokenController.IssueToken(FormDataCollection form)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
<...>
​So it turns out that the DevOps service needs WRITE access to the machinekeys folder ( C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys) - for some reason this permission was missing from the folder.

EndOfStreamException on primary server failover

When performing a failover on our cluster, the following EndOfStreamException is thrown every time (but only once) before the application successfully utilises the newly elected primary.
I am using 2.5.0 of the .NET Driver and also providing the replica set name in the connection string:
var url = MongoUrl.Create("mongodb://<dbuser>:<dbpassword>#ds012345-a0.mlab.com:56789,ds012345-a1.mlab.com:56790/<dbname>?replicaSet=rs-ds012345");
var client = new MongoClient(new MongoClientSettings()
{
Servers = url.Servers,
Credentials = credentials
});
Exception:
MongoDB.Driver.MongoConnectionException: An exception occurred while
receiving a message from the server. --->
System.IO.EndOfStreamException: Attempted to read past the end of the
stream. at
MongoDB.Driver.Core.Misc.StreamExtensionMethods.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Connections.BinaryConnection.d__51.MoveNext()
--- End of inner exception stack trace --- at MongoDB.Driver.Core.Connections.BinaryConnection.d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Connections.BinaryConnection.d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Connections.BinaryConnection.d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.WireProtocol.CommandWireProtocol1.<ExecuteAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Servers.Server.ServerChannel.<ExecuteProtocolAsync>d__261.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Operations.CommandOperationBase1.<ExecuteProtocolAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Operations.ReadCommandOperation1.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Operations.FindCommandOperation1.<ExecuteAsync>d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.Core.Operations.FindOperation1.d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.OperationExecutor.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.MongoCollectionImpl1.d__601.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
MongoDB.Driver.IAsyncCursorSourceExtensions.<ToListAsync>d__161.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
I was also facing the same error, but it was coming alternatively. Once request success and second fail with the above error.
To solve this issue, I used using like below
using (var cursor = await _mongoDb.GetCollection<BsonDocument>(CollectionName)
.FindAsync(queryJson.ToString(), options))
{
//operation
}
Please check if this resolves your issues too.
Thanks

Azure App Service random connection timeout to AWS Aurora (Postgres RDS)

We recently moved our API:s to Azure App Service and started getting some random (connection?) timeouts to our database:
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. ---> Npgsql.NpgsqlException: Exception while reading from stream ---> System.IO.IOException: Unable to read data from the transport connection: 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: 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.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.ReadBuffer.<Ensure>d__27.MoveNext()
--- End of inner exception stack trace ---
at Npgsql.ReadBuffer.<Ensure>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlConnector.<DoReadMessage>d__148.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Npgsql.NpgsqlConnector.<ReadPrependedMessages>d__150.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlConnector.<ReadMessage>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Npgsql.NpgsqlConnector.<ReadExpecting>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Npgsql.NpgsqlDataReader.<NextResult>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlDataReader.<<NextResultAsync>b__31_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlCommand.<Execute>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__92.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Npgsql.NpgsqlCommand.<>c__DisplayClass90_0.<<ExecuteDbDataReaderAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.<BufferlessMoveNext>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Storage.Internal.NpgsqlExecutionStrategy.<ExecuteAsync>d__7`2.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Storage.Internal.NpgsqlExecutionStrategy.<ExecuteAsync>d__7`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.<MoveNext>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Linq.AsyncEnumerable.<FirstOrDefault_>d__165`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.TaskResultAsyncEnumerable`1.Enumerator.<MoveNext>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.<MoveNextCore>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.<MoveNext>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<ExecuteSingletonAsyncQuery>d__23`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at OpenIddict.OpenIddictProvider`4.<HandleTokenRequest>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerHandler.<InvokeTokenEndpointAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at AspNet.Security.OpenIdConnect.Server.OpenIdConnectServerHandler.<HandleRequestAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
This specific exception is thrown from OpenIddict which we use for authentication, but we've seen similar being thrown from our own code as well.
I haven't been able to find any common denominator, these timeouts occur randomly and not under very heavy load (not that many simultaneous requests). In our logs I can see that the exception is thrown ~20 seconds after the requests comes in.
Our API is a .NET Core application deployed to Azure App Service (Basic B3).
The database is Amazon Aurora (PostgreSQL).
I have made sure that the Azure outbound IPs are white listed in the Amazon security group for the database. I have event tried to disable the database firewall (because I believed Azure was using another IP), but still received the same error.
Neither the database or the API is under heavy load when these problems occur.
I'm not sure how to debug this any further? What can I do to find and fix the root cause? Any help is appreciated.
Check your connection string, are you connecting to the cluster node or the instance? Connecting to the instance can cause these errors occasionally, connecting to the cluster node shields you from this.

Unable to add new nodes in Umbraco 7

Whenever I attempt to add a new content node (of any document type), I get the following error stack trace
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Umbraco.Web.WebApi.Binders.ContentItemBaseBinder`2.BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext)
at System.Web.Http.ModelBinding.ModelBinderParameterBinding.ExecuteBindingAsync(ModelMetadataProvider metadataProvider, HttpActionContext actionContext, CancellationToken cancellationToken)
at System.Web.Http.Controllers.HttpActionBinding.<ExecuteBindingAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
Updating existing content and publishing a works OK and the changes are visible on the site.
Any ideas what causes this error? SQL data? Indexes?

TFS2017 - NuGet push with octopack credentials

I'm having issues with pushing my packages to our internal NuGet feed that I created using TFS2017 packages tab.
I'm getting the following error:
2017-04-05T09:08:24.8336348Z 6>OctoPack:
2017-04-05T09:08:24.8336348Z Please provide credentials for: http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json
2017-04-05T09:08:24.9273850Z Unable to load the service index for source http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json.
2017-04-05T09:08:24.9273850Z Response status code does not indicate success: 401 (Unauthorized).
2017-04-05T09:08:24.9273850Z UserName: Password:
2017-04-05T09:08:24.9430236Z ##[error]Source\packages\OctoPack.3.4.2\tools\OctoPack.targets(108,5): Error MSB3073: The command ""C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\packages\OctoPack.3.4.2\tools\NuGet.exe" push "C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\Company.Product.ServiceBus\obj\octopacked\Company.Product.ServiceBus.Release.3.5.0.nupkg" -Source http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json " exited with code 1.
2017-04-05T09:08:24.9430236Z 6>C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\packages\OctoPack.3.4.2\tools\OctoPack.targets(108,5): error MSB3073: The command ""C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\packages\OctoPack.3.4.2\tools\NuGet.exe" push "C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\Company.Product.ServiceBus\obj\octopacked\Company.Product.ServiceBus.Release.3.5.0.nupkg" -Source http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json " exited with code 1. [C:\TFS_Agents\Product_Agent_1\_work\2\s\Source\Company.Product.ServiceBus\Company.Product.ServiceBus.csproj]
I want to push packages to it with OctoPack using the following build parameters:
/p:RunOctoPack=true
/p:OctoPackPublishPackageToHttp=http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json
/p:OctoPackAppendToPackageId=Release
/p:OctoPackNuGetProperties=Configuration=Release
I tried using the following:
/p:OctoPackPublishApiKey=VSTS
/p:OctoPackNuGetPushProperties=-ApiKey=VSTS
Neither parameters worked..
I also don't mind removing the apikey / credentials from the feed but there is literally NO documentation how to do this in the new Package feature in TFS 2017.
Here's a stacktrace I just printed out using -Verbosity detailed in the nuget push parameters:
OctoPack: OctoPack successful
Publish to repository: http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json
"C:\********_Agents\Product_Agent_1\_work\7\s\Source\packages\OctoPack.3.4.2\tools\NuGet.exe" push "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2\obj\octopacked\Company.Product.ApiProxy.v2.Release.3.5.0.nupkg" -Source http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json -Verbosity detailed -ApiKey key
NuGet Version: 3.5.0.10252 (Custom build for OctoPack)
Please provide credentials for: http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json
System.AggregateException: One or more errors occurred. ---> NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.HttpSource.<>c__DisplayClass12_0.<<GetAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.HttpSource.<GetAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
--- End of inner exception stack trace ---
at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.ServiceIndexResourceV3Provider.<TryCreate>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.PackageUpdateResourceV3Provider.<TryCreate>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__15`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.CommandRunnerUtility.<GetPackageUpdateResource>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.PushRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__28.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.HttpSource.<>c__DisplayClass12_0.<<GetAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.HttpSource.<GetAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
--- End of inner exception stack trace ---
at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.ServiceIndexResourceV3Provider.<TryCreate>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.PackageUpdateResourceV3Provider.<TryCreate>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__15`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.CommandRunnerUtility.<GetPackageUpdateResource>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.PushRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__28.MoveNext()<---
UserName: Password:
Source\packages\OctoPack.3.4.2\tools\OctoPack.targets(108,5): Error MSB3073: The command ""C:\********_Agents\Product_Agent_1\_work\7\s\Source\packages\OctoPack.3.4.2\tools\NuGet.exe" push "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2\obj\octopacked\Company.Product.ApiProxy.v2.Release.3.5.0.nupkg" -Source http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json -Verbosity detailed -ApiKey key" exited with code 1.
C:\********_Agents\Product_Agent_1\_work\7\s\Source\packages\OctoPack.3.4.2\tools\OctoPack.targets(108,5): error MSB3073: The command ""C:\********_Agents\Product_Agent_1\_work\7\s\Source\packages\OctoPack.3.4.2\tools\NuGet.exe" push "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2\obj\octopacked\Company.Product.ApiProxy.v2.Release.3.5.0.nupkg" -Source http://tfsserver:8080/tfs/COLL/_packaging/Product/nuget/v3/index.json -Verbosity detailed -ApiKey key" exited with code 1. [C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2\Company.Product.ApiProxy.v2.csproj]
Done Building Project "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2\Company.Product.ApiProxy.v2.csproj" (default targets) -- FAILED.
Project "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.Solution.sln" (1) is building "C:\********_Agents\Product_Agent_1\_work\7\s\Source\Company.Product.ApiProxy.v2.TestConsole\Company.Product.ApiProxy.v2.TestConsole.csproj" (24) on node 1 (default targets).
Does it work if you open a command line and execute
nuget push foo.nupkg your-api-key -source http://servername:8080/tfs/TCol/_packaging/Product/nuget/v3/index.json