Upload Fails: The remote host aborted the connection

When I try to deploy I get:

                    | Running: Deploy PROJECT release 1.0.20.484 to Production
                    | 
                    |   Running: Acquire packages
17:13:50   Info     |     Downloading packages
17:13:50   Info     |     Making a list of packages to download
17:13:50   Verbose  |     The following packages will be downloaded by the Octopus Server:
17:13:50   Verbose  |     - PROJECT-Service 1.0.20.484 (feed: Octopus Server (built-in))
17:13:50   Verbose  |     - PROJECT-WWW 1.0.20.484 (feed: Octopus Server (built-in))
17:13:50   Verbose  |     The following packages will be downloaded directly by Tentacles:
                    |   
                    |     Running: Download package PROJECT-Service 1.0.20.484 from NuGet feed: Octopus Server (built-in)
17:13:50   Verbose  |       Checking package cache for package PROJECT-Service 1.0.20.484
17:13:50   Verbose  |       Package was found in cache. No need to download. Using file: C:\Octopus\PackageCache\feeds-builtin\PROJECT-Service.1.0.20.484_C2A604E11C980044AF540B77A3913583.nupkg
17:13:50   Verbose  |       SHA1 hash of package is: 584195bd7aca2f3d94e7e5c9d25c3ebb98a2eea4
17:13:50   Verbose  |       Determining machines that need the package
                    |     
                    |       Running: Upload package to https://projecturl.com.au:21/
17:13:50   Verbose  |         Starting Upload package to https://projecturl.com.au:21/
17:13:50   Info     |         Uploading PROJECT-Service.1.0.20.484 (3.11 MB) to SQ-SERVER-7F3553AF
17:13:50   Verbose  |         Checking to see if the package is present on the tentacle
17:13:51   Verbose  |         Uploading package PROJECT-Service 1.0.20.484 to tentacle SQ-SERVER-7F3553AF
17:13:51   Verbose  |         Requesting upload...
                    |       
                    |     Running: Download package PROJECT-WWW 1.0.20.484 from NuGet feed: Octopus Server (built-in)
17:13:50   Verbose  |       Checking package cache for package PROJECT-WWW 1.0.20.484
17:13:51   Verbose  |       Package was found in cache. No need to download. Using file: C:\Octopus\PackageCache\feeds-builtin\PROJECT-WWW.1.0.20.484_782C6F6AD6A6E54E9DD70BE7E3338BA6.nupkg
17:13:51   Verbose  |       SHA1 hash of package is: f1a8967bb0c316d2e46d9be4b1b0a342be2a8c88
17:13:51   Verbose  |       Determining machines that need the package
                    |     
                    |       Running: Upload package to https://projecturl.com.au:21/
17:13:51   Verbose  |         Starting Upload package to https://projecturl.com.au:21/
17:13:51   Info     |         Uploading PROJECT-WWW.1.0.20.484 (103.86 MB) to SQ-SERVER-7F3553AF
17:13:51   Verbose  |         Checking to see if the package is present on the tentacle
17:13:51   Verbose  |         Uploading package PROJECT-WWW 1.0.20.484 to tentacle SQ-SERVER-7F3553AF
17:13:51   Verbose  |         Requesting upload...

The tentacle connectivity tab says:

Pipefish.PipefishException: The remote host aborted the connection. This can happen when the remote server does not trust the certificate that we provided. ---> System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
   at Pipefish.Transport.SecureTcp.Client.SecureTcpClient.Send(SecureTcpRequest request) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Client\SecureTcpClient.cs:line 68
   --- End of inner exception stack trace ---
   at Pipefish.Transport.SecureTcp.Client.SecureTcpClient.Send(SecureTcpRequest request) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Client\SecureTcpClient.cs:line 98
   at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.PerformExchange() in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 298
   at Pipefish.Transport.SecureTcp.MessageExchange.Client.ClientWorker.Run() in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\MessageExchange\Client\ClientWorker.cs:line 173

Hi Brian,

It appears in this case that the Tentacle is rejecting connections from the Octopus because of a certificate mismatch. Did this just start happening, or has this Tentacle never worked?

Checking the match between the trusted certificate thumbprint shown in the Tentacle Manager with the Configuration > Certificates > Octopus Server thumbprint - these need to be identical.

It might be illuminating to check the C:\Octopus\Tentacle\Logs\OctopusTentacle.txt file on the Tentacle machine to see what is being logged there.

Unless these turn something up, working through the suggestions on this page: http://docs.octopusdeploy.com/display/OD/Troubleshoot+Listening+Tentacles should show up some clues.

Let us know what you find!

Regards,
Nick

Hi Nick,

The deployment has never worked. I’m pretty sure the certificate thumbprint
is correct. I’m able to reset the tentacle from Octopus. Surely that
wouldn’t be allowed if the thumbprint was wrong.

Here’s the tentacle log:

2014-05-14 16:26:10.6451  TRACE  Accepted TCP client 203.214.65.91:52499
2014-05-14 16:26:10.9221  TRACE  Routing Post request for /mx/v1...
2014-05-14 16:26:10.9291  TRACE  Found handler.
2014-05-14 16:26:10.9291  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentacleGetPackageStatusRequest
from PackageUploader-AU0-55B63UlG@SQ-OCTOPUS-5D693CAC to
Dispatcher@SQ-SERVER-7F3553AF (id: 504af538385f49b4b1744e0c72714e35 env:
08D13D54884E77E800000065)
2014-05-14 16:26:10.9501  TRACE  Attaching TentaclePackageStatusResponder
as TentaclePackageStatusResponder-HQ-55B6FPjo
2014-05-14 16:26:10.9501  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentacleGetPackageStatusRequest
from PackageUploader-AU0-55B63UlG@SQ-OCTOPUS-5D693CAC to
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF (id:
504af538385f49b4b1744e0c72714e35 env: 08D13D548851AC3800000066)
2014-05-14 16:26:10.9601  TRACE  Starting supervised actor
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF
2014-05-14 16:26:10.9761  TRACE  Supervised actor
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF succeeding
2014-05-14 16:26:10.9761  TRACE  Starting termination of supervised actor
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF
2014-05-14 16:26:10.9761  TRACE  Completing supervised actor
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF immediately
2014-05-14 16:26:10.9901  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentaclePackageStatusReply
from TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF to
PackageUploader-AU0-55B63UlG@SQ-OCTOPUS-5D693CAC (id:
c4bb697b7e6447258e1af0284dc9612c env: 08D13D548857036800000067)
2014-05-14 16:26:10.9901  TRACE  Completing
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.0071  TRACE  Detaching
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.0071  TRACE  Stored
Pipefish.Messages.Timing.ClearTimeoutsCommand from
TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF to
Clock@SQ-SERVER-7F3553AF (id: 169dff04aa124df39f1891d0fd9ce5e9 env:
08D13D54885A5EC800000068)
2014-05-14 16:26:11.0241  TRACE
 TentaclePackageStatusResponder-HQ-55B6FPjo@SQ-SERVER-7F3553AF successfully
detached
2014-05-14 16:26:11.0671  TRACE  Accepted TCP client 203.214.65.91:52500
2014-05-14 16:26:11.3351  TRACE  Routing Post request for /mx/v1...
2014-05-14 16:26:11.3351  TRACE  Found handler.
2014-05-14 16:26:11.3351  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentacleGetPackageStatusRequest
from PackageUploader-AU4-55B7F+tB@SQ-OCTOPUS-5D693CAC to
Dispatcher@SQ-SERVER-7F3553AF (id: d20f38c0b4234a28ae8ee8d4a4567247 env:
08D13D54888D55A800000069)
2014-05-14 16:26:11.3521  TRACE  Attaching TentaclePackageStatusResponder
as TentaclePackageStatusResponder-Hg-55B6U6+Y
2014-05-14 16:26:11.3661  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentacleGetPackageStatusRequest
from PackageUploader-AU4-55B7F+tB@SQ-OCTOPUS-5D693CAC to
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF (id:
d20f38c0b4234a28ae8ee8d4a4567247 env: 08D13D54889062E80000006A)
2014-05-14 16:26:11.3811  TRACE  Starting supervised actor
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.3811  TRACE  Supervised actor
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF succeeding
2014-05-14 16:26:11.3811  TRACE  Starting termination of supervised actor
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.3961  TRACE  Completing supervised actor
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF immediately
2014-05-14 16:26:11.3961  TRACE  Stored
Octopus.Platform.Deployment.Messages.PackageUpload.TentaclePackageStatusReply
from TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF to
PackageUploader-AU4-55B7F+tB@SQ-OCTOPUS-5D693CAC (id:
ca8cba5e260d4dadb31c4f0cc684a509 env: 08D13D548895BA180000006B)
2014-05-14 16:26:11.4121  TRACE  Completing
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.4121  TRACE  Detaching
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.4121  TRACE  Stored
Pipefish.Messages.Timing.ClearTimeoutsCommand from
TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF to
Clock@SQ-SERVER-7F3553AF (id: 4be387b7493c4829890e6accfa6b2220 env:
08D13D548898EE680000006C)
2014-05-14 16:26:11.4261  TRACE
 TentaclePackageStatusResponder-Hg-55B6U6+Y@SQ-SERVER-7F3553AF successfully
detached
2014-05-14 16:26:11.4771  TRACE  Accepted TCP client 203.214.65.91:52501
2014-05-14 16:26:11.7531  TRACE  Routing Post request for /mx/v1...
2014-05-14 16:26:11.7531  TRACE  Found handler.
2014-05-14 16:26:11.7691  TRACE  Stored
Octopus.Shared.FileTransfer.BeginFileTransferCommand from
FileSender-AU8-55B7JVsQ@SQ-OCTOPUS-5D693CAC to
Dispatcher@SQ-SERVER-7F3553AF(id: afd2f528377744b19c336e84d9b6a512
env: 08D13D5488CE08280000006D)
2014-05-14 16:26:11.7931  TRACE  Attaching FileReceiver as
FileReceiver-Hw-55B6lZqY
2014-05-14 16:26:11.7931  TRACE  Stored
Octopus.Shared.FileTransfer.BeginFileTransferCommand from
FileSender-AU8-55B7JVsQ@SQ-OCTOPUS-5D693CAC to
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF (id:
afd2f528377744b19c336e84d9b6a512 env: 08D13D5488D274F80000006E)
2014-05-14 16:26:11.8231  TRACE  Starting supervised actor
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF
2014-05-14 16:26:11.8231  TRACE  Stored
Pipefish.Messages.Supervision.StartedEvent from
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF to
FileSender-AU8-55B7JVsQ@SQ-OCTOPUS-5D693CAC (id:
f38d9fb02bdc449daeaa390d9dd672b1 env: 08D13D5488D708D80000006F)
2014-05-14 16:26:11.8351  TRACE  Stored
Pipefish.Messages.Timing.SetTimeoutCommand from
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF to
Clock@SQ-SERVER-7F3553AF(id: 34d1a6e3198441e987cf5291855e9d98 env:
08D13D5488D904A800000070)
2014-05-14 16:26:11.8481   INFO  Beginning transfer of
D:\Octopus\Files\PROJECT-Service.1.0.20.485_DD2A3A5F9263B54081A3E2C4DD5A602B.nupkg-537e0c98-2135-407d-b752-939f35a657ed
2014-05-14 16:26:11.8481  TRACE  Supervised actor
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF notifying supervisor
2014-05-14 16:26:11.8671  TRACE  Stored
Octopus.Shared.FileTransfer.SendNextChunkRequest from
FileReceiver-Hw-55B6lZqY@SQ-SERVER-7F3553AF to
FileSender-AU8-55B7JVsQ@SQ-OCTOPUS-5D693CAC (id:
4cf2ac9de0a24431924b67bd511b9503 env: 08D13D5488DCD53800000071)
2014-05-14 16:26:11.9371  TRACE  Accepted TCP client 203.214.65.91:52502
2014-05-14 16:26:12.2031  TRACE  Routing Post request for /mx/v1...
2014-05-14 16:26:12.2201  TRACE  Found handler.
2014-05-14 16:26:12.2251  TRACE  Stored
Octopus.Shared.FileTransfer.BeginFileTransferCommand from
FileSender-AVA-55B7Y4BV@SQ-OCTOPUS-5D693CAC to
Dispatcher@SQ-SERVER-7F3553AF(id: 2d8c2b10b2274fd08efb64339f8114e0
env: 08D13D548913759800000072)
2014-05-14 16:26:12.2441  TRACE  Attaching FileReceiver as
FileReceiver-IA-55B62mvI
2014-05-14 16:26:12.2441  TRACE  Stored
Octopus.Shared.FileTransfer.BeginFileTransferCommand from
FileSender-AVA-55B7Y4BV@SQ-OCTOPUS-5D693CAC to
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF (id:
2d8c2b10b2274fd08efb64339f8114e0 env: 08D13D5489171F1800000073)
2014-05-14 16:26:12.2541  TRACE  Starting supervised actor
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF
2014-05-14 16:26:12.2691  TRACE  Stored
Pipefish.Messages.Supervision.StartedEvent from
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF to
FileSender-AVA-55B7Y4BV@SQ-OCTOPUS-5D693CAC (id:
4a19b6afaa734140a641de7061ed1760 env: 08D13D54891A2C5800000074)
2014-05-14 16:26:12.2691  TRACE  Stored
Pipefish.Messages.Timing.SetTimeoutCommand from
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF to
Clock@SQ-SERVER-7F3553AF(id: 1d66162f9d7f472d9244b519dc5e5aad env:
08D13D54891BB2F800000075)
2014-05-14 16:26:12.2841   INFO  Beginning transfer of
D:\Octopus\Files\PROJECT-WWW.1.0.20.485_B086EF638D122146B49A29416A84AACA.nupkg-df608775-5bbd-4199-9c26-9ed859bb89f5
2014-05-14 16:26:12.2841  TRACE  Supervised actor
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF notifying supervisor
2014-05-14 16:26:12.3011  TRACE  Stored
Octopus.Shared.FileTransfer.SendNextChunkRequest from
FileReceiver-IA-55B62mvI@SQ-SERVER-7F3553AF to
FileSender-AVA-55B7Y4BV@SQ-OCTOPUS-5D693CAC (id:
c1fd851dca084ca2a5655a1ede28c0b0 env: 08D13D54891F0E5800000076)
2014-05-14 16:26:12.3011  TRACE  Accepted TCP client 203.214.65.91:52503
2014-05-14 16:26:12.6071  TRACE  Routing Post request for /mx/v1...
2014-05-14 16:26:12.6141  TRACE  Found handler.
2014-05-14 16:26:12.6981  TRACE  Accepted TCP client 203.214.65.91:52504
2014-05-14 16:26:12.7771  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:26:12.7831  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111
2014-05-14 16:26:27.8612  TRACE  Accepted TCP client 203.214.65.91:52510
2014-05-14 16:26:27.9572  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:26:27.9682  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111
2014-05-14 16:26:43.0177  TRACE  Accepted TCP client 203.214.65.91:52512
2014-05-14 16:26:43.1047  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:26:43.1237  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111
2014-05-14 16:26:58.1252  TRACE  Accepted TCP client 203.214.65.91:52516
2014-05-14 16:26:58.2162  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:26:58.2162  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111
2014-05-14 16:27:13.2277  TRACE  Accepted TCP client 203.214.65.91:52519
2014-05-14 16:27:13.3147  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:27:13.3147  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111
2014-05-14 16:27:28.3311  TRACE  Accepted TCP client 203.214.65.91:52521
2014-05-14 16:27:28.4121  ERROR  Failed applying protocol
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.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset,
Int32 count)
   at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[]
buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32
count)
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
150
2014-05-14 16:27:28.4211  ERROR  Unhandled error when processing request
from client
System.IO.IOException: Unable to write data to 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.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
   at Pipefish.Transport.SecureTcp.ProtocolParser.FormatResponse(Stream
clientStream, StatusCode statusCode, ResponseHeaders headers, String
protocol) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\ProtocolParser.cs:line
159
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ApplyProtocol(AuthorizationResult
authorizationResult, EndPoint clientEndPoint, String clientThumbprint,
Stream clientStream) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
206
   at
Pipefish.Transport.SecureTcp.Server.SecureTcpServer.ExecuteRequest(TcpClient
client) in
c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish.Transport.SecureTcp\Server\SecureTcpServer.cs:line
111

I’m having the same issue on another machine I just added. Both machines
use non standard port 21. The firewall was configured to work with FTP. I
just turned off the FTP server and setup the tentacle to use port 21. Is
there any reason it wouldn’t work on port 21?

The octopus server can talk to the tentacle but every time I try to
initiate a file transfer it doesn’t work. I have no problems with tentacles
on the local network which makes me think it is likely a firewall issue or
port 21 is treated differently somehow.

Any suggestions?


Brian Crosby - Senior .Net Developer

Level 6, 180 Flinders Street, Melbourne VIC 3000
03 9663 1029 | www.monkii.com.au |
twitter.com/monkiimelbhttp://www.twitter.com/monkiimelb

http://everyday-law.org.au/

Hi Brian,

Thanks for the update. It’s possible that if the firewall port was set to use port 21, then some other limits have been applied and some of our traffic isn’t being allowed through. Would it be possible to try adding a different firewall exception (just for testing), or to configure the Tentacle to use the new “Polling” mode instead?

Paul

Hi Brian,

Did you find a solution?

Reagrds,
Fabian

I ended up just using a polling tentacle. It’s not ideal, but I didn’t have
time to fiddle with it.

We get this error every once and awhile. It usually works on the second try. Seems like it started happening for us after the latest upgrade: 2.6

This happened to us a few times yesterday.

The first time it was fixed just by retrying (as jasonw mentioned).

But then it started failing quite consistently, retries were not helping much.

I tried restarting both servers (octopus one, and the target one) and no luck.

Then I restarted just the tentacle windows service and started working fine again.