{"id":1533,"date":"2008-02-06T10:04:00","date_gmt":"2008-02-06T10:04:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2008\/02\/06\/http-502-error-when-the-server-tries-to-connect-to-the-build-agent-to-start-a-build\/"},"modified":"2008-02-06T10:04:00","modified_gmt":"2008-02-06T10:04:00","slug":"http-502-error-when-the-server-tries-to-connect-to-the-build-agent-to-start-a-build","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/http-502-error-when-the-server-tries-to-connect-to-the-build-agent-to-start-a-build\/","title":{"rendered":"HTTP 502 error when the server tries to connect to the build agent to start a build"},"content":{"rendered":"<p>The following came up a couple of weeks ago, and I thought it would be worth posting for anyone else who hits the same or a similar problem.<\/p>\n<blockquote><p>  When I try to do a build using TFS Build I get this error:&nbsp; TF215085: An error occurred while connecting to Agent \\Shopping Catalog\\Nightly Build: The request failed with HTTP status 502: Bad Gateway<\/p>\n<\/blockquote>\n<p>The solution was to set BypassProxyOnLocal in the registry for TFS on the server (application tier).&nbsp; Note the version number, 9.0, is for TFS 2008.&nbsp; This does not apply to TFS 2005, because the communication with the build agent is <a href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2007\/03\/16\/orcas-team-build-wcf-web-services-replace-net-remoting.aspx\">different in TFS 2008<\/a>.<\/p>\n<blockquote><p>  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\TeamFoundation\\RequestSettings] <\/p>\n<p>&#8220;BypassProxyOnLocal&#8221;=&#8221;true&#8221; <\/p>\n<\/blockquote>\n<p>Then run iisreset to make sure that the AT picks up the setting change.<\/p>\n<p>The following post talks about an unrelated topic, but it covers this setting too.&nbsp; The context is normally the client rather than the server, but in this case the server is acting as a client and calling the build agent. <br><a href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2007\/09\/17\/tfs-2008-controlling-the-number-of-threads-used-in-uploading-and-downloading-files.aspx\">http:\/\/blogs.msdn.com\/buckh\/archive\/2007\/09\/17\/tfs-2008-controlling-the-number-of-threads-used-in-uploading-and-downloading-files.aspx<\/a><\/p>\n<div class=\"wlWriterSmartContent\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6ccb32c1-ec51-48ea-a1a7-54077f0bc8f9\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/team%20foundation%20server%202008\" rel=\"tag\">team foundation server 2008<\/a>,<a href=\"http:\/\/technorati.com\/tags\/team%20build\" rel=\"tag\">team build<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The following came up a couple of weeks ago, and I thought it would be worth posting for anyone else who hits the same or a similar problem. When I try to do a build using TFS Build I get this error:&nbsp; TF215085: An error occurred while connecting to Agent \\Shopping Catalog\\Nightly Build: The request [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[7,8],"class_list":["post-1533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-team-build","tag-team-foundation"],"acf":[],"blog_post_summary":"<p>The following came up a couple of weeks ago, and I thought it would be worth posting for anyone else who hits the same or a similar problem. When I try to do a build using TFS Build I get this error:&nbsp; TF215085: An error occurred while connecting to Agent \\Shopping Catalog\\Nightly Build: The request [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/1533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=1533"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/1533\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=1533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=1533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=1533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}