Override communication timeouts

Hello!
We have a project setup with 5 steps for each release. Each step uploads a package of around 40MB to the tentacle. We also have a slow internet connection.
On our LAN everything works ok (most of the time), but every time we deploy to our acc server using a vpn we get one of the following errors:

  • ERROR System.TimeoutException: Unable to communicate with the remote tentacle ‘http://xx.xx.xx.xx:10933/’ . This happens when either the tentacle is offline, or when firewalls are preventing communication to the service. Please verify that TCP port 10933 is open on both the Windows Firewall and any other hardware/software firewalls between the machines, and that the Tentacle Windows Service is running on the remote machine. You can test the connection by browsing to ‘http://xx.xx.xx.xx:10933/’ in a web browser from the Octopus server. The error message given was: The request channel timed out while waiting for a reply after 00:00:00. 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.

  • ERROR System.TimeoutException: Unable to communicate with the remote tentacle ‘http://xx.xx.xx.xx:10933/’ . This happens when either the tentacle is offline, or when firewalls are preventing communication to the service. Please verify that TCP port 10933 is open on both the Windows Firewall and any other hardware/software firewalls between the machines, and that the Tentacle Windows Service is running on the remote machine. You can test the connection by browsing to ‘http://xx.xx.xx.xx:10933/’ in a web browser from the Octopus server. The error message given was: Client is unable to finish the security negotiation within the configured timeout (00:00:00). The current negotiation leg is 1 (00:00:00).

Our question:
How do we:

  • Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding
  • Increase the security negotiation timeout?

Hi Jasper,

There’s currently no way to modify these timeouts via configuration. They are actually set in code, like this:

var binding = new WSHttpBinding();
binding.CloseTimeout = TimeSpan.FromSeconds(200);
binding.HostNameComparisonMode = HostNameComparisonMode.WeakWildcard;
binding.MaxReceivedMessageSize = 1024 * 1024 * 1024;
binding.MaxBufferPoolSize = 64 * 1024 * 1024;
binding.MessageEncoding = WSMessageEncoding.Text;
binding.OpenTimeout = TimeSpan.FromSeconds(200);
binding.ReaderQuotas.MaxArrayLength = 128 * 1024;
binding.ReaderQuotas.MaxStringContentLength = 100 * 1024 * 1024;
binding.ReceiveTimeout = TimeSpan.FromMinutes(20);
binding.ReliableSession.Enabled = true;
binding.ReliableSession.InactivityTimeout = TimeSpan.FromSeconds(60);
binding.ReliableSession.Ordered = true;
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
binding.SendTimeout = TimeSpan.FromSeconds(60);

As you can see, we actually set the binding timeouts for receive timeout, send timeout, open and close timeouts.

In your error messages it seems that it is timing out immediately (“The current negotiation leg is 1 (00:00:00)”). Perhaps there’s something preventing the traffic being routed over the VPN so it is being rejected immediately? Is the VPN the ‘default gateway’ for the computer?

I hope this helps,

Paul

Hi Paul!
First let me thank you for the great tool and the support you guys are giving. We are loving it so far!

We updated yesterday to the latest version so it’s easier to test now.
Every first time we deploy a release about 2 packages fail while the others succeed. After a retry all remaining packages succeed. Since the new version means we don’t upload gig’s of data while trying it doesn’t really matter that much.
If i have time i’ll try some tweaking in the network settings but i guess we can deploy now. Quickfix: boss paying for faster internet :slight_smile:
thank you and keep up the good work!

Hi Guys

I know this is a pretty old thread, but is there any way now to increase the timeout value when acquiring packages.
I’m deploying to a client’s server on the other side of the world, so “the boss paying for faster internet” solution really doesn’t work for me :wink:

Thx

Hi Jochen,

No, there is still no way to override the timeout.

One possible option is to use an external NuGet feed (i.e not the Octopus built-in repository), and on your step you will then have the option for each Tentacle to download the package directly from the NuGet feed, rather than having the server push the packages.

I hope this helps.