ds19
ds19

Reputation: 3165

TFS2017.2 NuGet restore task - ETIMEDOUT 93.184.221.200:443

I have couple of build definitions that are using the "old" NuGet Installer task to restore the dependencies from our internal TFS feed (same collection); the feed url is specified through the NuGet source parameter: enter image description here

The restore process is working fine as below: enter image description here

Switching to the newer version of the task is causing the build failure: enter image description here enter image description here

How can I disable the connection attempt to 93.184.221.200:443 due to the fact that the build agent doesn't have internet access?

I'm using TFS 15.117.26714.0.

Update 1

I copied nuget.exe to c:\nuget folder then added the folder to the PATH environment variable. Same result

Update 2

I copied nuget.exe to C:\B\1_tool\NuGet\4.0.0\x64 folder; the result is below:

enter image description here

Upvotes: 9

Views: 3842

Answers (4)

Sebastian Edelmeier
Sebastian Edelmeier

Reputation: 4157

To get this working, we modified our Build Agents' environment vars, adding

http_proxy=http://wsa.arz.de:3128
https_proxy=http://wsa.arz.de:3128

Hope this helps

Upvotes: 0

Mike
Mike

Reputation: 2510

Further to ds19's problem and workaround (thank you!), we were having a very similar issue with VS2017. At our place Servers, as a rule, do not get access to the internet. With our upgrade to VS2017 and TFS2017 (Update 3) this rule had to be relaxed.

Initially, we solved the build issue by using ds19's Update 3 - Workaround but this still left us unable to use anything but nuget 4.0.0 since the Nuget Tool Installer task still gave the timeout error.

After working through this with MS, they advised us to add the CDN site (cs9.wpc.v0cdn.net) to our proxy’s whitelist. Once we did this we we also able to use the Nuget Tool Installer task, in addition to the Nuget Restore.

Upvotes: 0

ds19
ds19

Reputation: 3165

Update 3 - Workaround

In order to trick the "new" NuGet task to find the nuget.exe in the tool cache you need to create a dummy file called x64.complete in the {agent work folder}\_tool\NuGet\4.0.0 folder and copy the nuget.exe file in the {agent work folder}\_tool\NuGet\4.0.0\x64 folder

Upvotes: 13

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

Seems there is something wrong with the new version of the task. Normally it will not access api.nuget.org if you disabled Use packages from NeGet.org.

Reference this similar issue : NuGet restore task fails from the Xamarin.Android template in TFS 2017 update 2

Also this related feedback (not resolved yet) : NuGet Push task fails and has no retry option

However, you can try to enable the internet access for your build agent, then try it again.

If that still not work, please try to enable system.debug during the build. Then capture and share the logs here for further troubleshoot.

As a workaround, you can use the old version for now.

Upvotes: 0

Related Questions