TeamCity Plugin - Connection to Remote Host timed out

I am trying to push a package from our TeamCity 2017 server to our Octopus server. I have tried using versions 5.2.0 (latest) and 5.1.6 of the Octopus TeamCity plugin and get the same output each time, which is listed below.

It sounds like a network issue, but I was able to run the exact same command from the command line on the TeamCity server using the OctopusTools 6.8.2 and was able to push the package successfully.

Any suggestions on how we can troubleshoot this issue? Does the user account running the TeamCity Build Agent need permissions to log into the Octopus server?

[09:42:50] [Octopus Deploy] Running command: octo.exe push --server http://octopus_server --apikey SECRET --package D:\TeamCity\buildAgent\work\dfc7fda48502296a\package_name.nupkg

[09:42:50] [Octopus Deploy] Pushing packages to Octopus server

[09:42:51] [Octopus Deploy] Octopus Deploy Command Line Tool, version 6.3.3

[09:42:51] [Octopus Deploy]

[09:42:51] [Octopus Deploy] Detected automation environment: “TeamCity/2017.2”

[09:43:12] [Octopus Deploy] Socket Error

[09:43:12] [Octopus Deploy]

[09:43:12] [Octopus Deploy] body { font-family:helvetica; font-size:11pt; color:#0071BB; margin:30px; padding:0px; }

[09:43:12] [Octopus Deploy] h1 { color:#005395; margin:0px 0px 0px 0px; }

[09:43:12] [Octopus Deploy] h2 { color:#005395; }

[09:43:12] [Octopus Deploy] p { margin:6px 0px 6px 0px;}

[09:43:12] [Octopus Deploy] p.footer { font-size:8pt; margin:3px 0px 0px 0px;}

[09:43:12] [Octopus Deploy] b { font-weight:550; color:#7F7F7F; }

[09:43:12] [Octopus Deploy]

[09:43:12] [Octopus Deploy]

[09:43:12] [Octopus Deploy]

Socket Error

[09:43:12] [Octopus Deploy]

Connection to Remote Host timed out {Thd 6500} [socket #E40, to :0]

[09:43:12] [Octopus Deploy]

WinGate™ © Qbik New Zealand Limited 1995-2010

[09:43:12] [Octopus Deploy]

[09:43:12] [Octopus Deploy]

[09:43:12] [Octopus Deploy] Error from Octopus Server (HTTP 504 GatewayTimeout)

[09:43:12] [Octopus Deploy] Exit code: -7

[09:43:12] [Octopus Deploy] Octo.exe exit code: -7

We were able to resolve this issue on our own. It turns out it was a network issue as we first suspected.

The service account that the TeamCity agent runs under had a proxy added to it. After bypassing the proxy for local servers, we were able to push are packages successfully from TeamCity to Octopus.

Hi Scott,
Thanks for reaching out. Sorry to hear you’re running into this error.

This error usually happens when a proxy gets in the middle of the request. The best thing you could do to troubleshoot this would be to set up a web debugging tool like Fiddler, try to rerun the command and check the response for clues as to what might be blocking the call.

I hope this helps and please let us know if we can help in any other way.

Best Regards,

Thanks Tina, that’s exactly what the issue was.

Glad to hear you were able to track down the cluprit.

Happy Deployments!