Error when creating new release

spikespike Posts: 10
edited July 25, 2013 11:29AM in Deployment Manager

I am trying to create a release and I get the error below.


Any help much appreciated.


  • Hi there!

    It looks like the nuget server doesn't have access to the directory it's trying to store data in.

    I don't know why this has happened, but I think that if you set the Deployment Manager Portal to run as a user with permission to access this folder, it should fix your problem.

    To do this, open up IIS by running "inetmgr".

    Under application pools, right click on "Deployment Manager Portal" and select "Advanced Settings". Change the value of "Identity" to be your preferred user.
    David Conlin
    Software Developer
    Deployment Manager
  • Thanks, this location doesn't exist though
  • Hmmm, you're right, it looks like your Nuget server is using a strange location to store its data.

    If you open up the nuget server's web.config, at

    <deployment manager installdir>\NuGet\web.config

    (the default install dir is C:\Program Files (x86)\Red Gate\Deployment Manager)

    what value is set for "packagesPath"? It will be set in a line that looks something like this:

    <add key="packagesPath" value="[this is the value]"/>

    The default is "C:\ProgramData\Red Gate\DeploymentManager\Data\feed"
    David Conlin
    Software Developer
    Deployment Manager
  • Yep, thats what my web.config says

    <add key="packagesPath" value="C:\ProgramData\Red Gate\DeploymentManager\Data\feed"/>
  • Hmm, it looks like the NuGet server stores its config file there, but on all the machines we've seen so far, NetworkService (which the Deployment Manager Portal and NuGet applications run as) doesn't seem to have a problem accessing or creating that directory.

    Could you check that Deployment Manager is running as NetworkService for me? You can do this by checking what the "identity" is set to as described above.

    If that's the case, then maybe the permissions of NetworkService are unusual on this machine - which version of Windows are you using, and have you changed the default permissions?
    David Conlin
    Software Developer
    Deployment Manager
  • Just checked in IIS Manager, it is definitely is running as a network service.
  • Which version of Windows are you using?
    David Conlin
    Software Developer
    Deployment Manager
  • Windows Server 2008 R2 Enterprise SP1
  • James BJames B Posts: 1,124 Silver 4
    Checking my records, we've seen a similar error once before. The user hitting it was able to resolve the problem by granting permission to the apppool user to that location (c:\windows\system32\config\systemprofile\appdata\roaming).

    I think you confirmed earlier that it is indeed using NetworkService- have you tried explicitly granting full control to the folder to that account? It's possible you have some sort of group-policy in place that's affecting it?

    If that doesn't help, it's probably worth running process monitor to see if a different account is attempting to access that location and failing. Feel free to send the captured output over to [email protected] if you're not sure what you're looking for.
    Systems Software Engineer

    Redgate Software

  • Thanks, that message is no longer appearing

    I have a package called "Test" using deployment manager package feed and the package is set to deploy to my PC from the server

    I ran the below command

    and now I get this when deploying release
  • James BJames B Posts: 1,124 Silver 4
    Can you expand the error section of the log so we can see the full details?
    Systems Software Engineer

    Redgate Software

  • Stage 2 - Uploading packages to target machines
    2013-07-23 16:05:21 INFO Preparing to upload packages2013-07-23 16:05:21 INFO Uploading packages...2013-07-23 16:06:21 ERROR System.TimeoutException: Client is unable to finish the security negotiation within the configured timeout (00:00:00.0022946). The current negotiation leg is 1 (00:00:00.0022946). ---> System.TimeoutException: The request channel timed out attempting to send after 00:00:00.0022946. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to 'http://to-bsl007:10301/Packages/' has exceeded the allotted timeout of 00:00:00.0020000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() --- End of inner exception stack trace --- at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) --- End of inner exception stack trace --- at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout) --- End of inner exception stack trace ---Server stack trace: at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout) at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout) at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.SyncWaiter.TryGetChannel() at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.SyncWaiter.TryWait(TChannel& channel) at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.TryGetChannel(Boolean canGetChannel, Boolean canCauseFault, TimeSpan timeout, MaskingMode maskingMode, TChannel& channel) at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode) at System.ServiceModel.Channels.RequestReliableRequestor.OnRequest(Message request, TimeSpan timeout, Boolean last) at System.ServiceModel.Channels.ReliableRequestor.Request(TimeSpan timeout) at System.ServiceModel.Channels.ClientReliableSession.Open(TimeSpan timeout) at System.ServiceModel.Channels.ReliableRequestSessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at RedGate.Deploy.Shared.Contracts.IPackageService.BeginUpload(PackageMetadata metadata) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at ImpromptuInterface.Optimization.InvokeHelper.InvokeMemberActionCallSite(Object target, String_OR_InvokeMemberName name, Object[] args, String[] tArgNames, Type tContext, Boolean tStaticContext, CallSite& callSite) at ImpromptuInterface.Impromptu.InvokeMemberAction(Object target, String_OR_InvokeMemberName name, Object[] args) at ImpromptuInterface.Dynamic.ImpromptuForwarder.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) at RedGate.Deploy.Server.Proxies.WcfSecurityWrapper`1.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) at CallSite.Target(Closure , CallSite , Object , PackageMetadata ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at RedGate.Deploy.Server.Tasks.Deploy.PackagePusher.Push(DownloadedPackage package, MachineEndpoint destination, ILog log) at RedGate.Deploy.Server.Tasks.Deploy.UploadPackageActivity.<Execute>b__0() at System.Threading.Tasks.Task.Execute()Exception rethrown at [1]: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task) at RedGate.Deploy.Server.Tasks.ActivityRuntime.<ExecuteChild>d__0.MoveNext()
  • That error suggests that there has been a timeout in communication between the Deployment Manager Server and its Agent. However, the strange thing is that the timeout appears to have been set to 2 milliseconds, even though our default is 1 minute.

    Can you tell me what lines appear in the server's app.config (default C:\Program Files (x86)\Red Gate\Deployment Manager\Server\RedGate.Deploy.Server.exe.config) in the <appSettings> section? Is there an entry for key="Bindings.AgentSendTimeout"?
    Development Lead
    Redgate Software
  • <appSettings>
    <add key="Logging.Level" value="Debug" />
    <add key="Tasks.ExecutionThreads" value="4" />
    <add key="Health.AutomaticCheckInterval" value="00:30:00" />
  • It appears that this message occurs when the Deployment Agent is unreachable for any reason. What status is the target machine showing in the Environments overview? If the machine is offline, then either the Deployment Agent service is not running, or the machine and/or service port is not reachable from the Deployment Manager server.

    To check whether the Deployment Agent is running, check the state of the 'Red Gate Deployment Agent' service on the target machine.

    To check connectivity with the agent, you can try pinging the agent from the machine that the Deployment Manager server is installed on. If that works, you can also try navigating to [url=http://]http://[/url]<your-agent-machine-address>:10301/ in a browser on the Deployment Manager server machine; you should see an HTML page that starts with the message:

    This is a Windows© Communication Foundation service.

    Metadata publishing for this service is currently disabled...
    If the service is running but you can't reach the service page from a browser, the most likely reason is that a firewall is getting in the way. Port 10301 needs to be opened on the agent machine to allow the server to communicate with it.

    As an aside, the misleading message about timeouts happens because we use WCF reliable sessions with message level security, and they retry operations until a timeout rather than providing useful error messages.
    Development Lead
    Redgate Software
  • Got it working thanks. I am trying to connect to an agent that is on a different network, the firewall is turned off on the agent machine so port 10301 should not be be blocked.
Sign In or Register to comment.