Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet tasks (restore, tool installer) fail with cryptic "socket hang up" behind proxy #5889

Closed
jjolidon opened this issue Nov 17, 2017 · 2 comments
Assignees

Comments

@jjolidon
Copy link

Hello everyone,
I've stumbled on that and it took me some delving into source code to find out the reason, so I'm putting it here to see if someone can improve the error message and the doc.
Cheers,
Jérôme Jolidon

Environment

  • Server - TFS on-premises version: 15.117.27024.0
  • Agent - Private:
    OS: WIndows 10 Enterprise 2016 LTSB
    Version of agent: 2.122.1
    Note: Should not have an impact on this.

Issue Description

NuGet restore, resp. NuGet Tool Installer fail with cryptic message "socket hang up" when run from behind proxy.

Known workaround

Create environment variables HTTP_PROXY and HTTPS_PROXY on the agent. Values should both include proxy address in format http://proxy.example.org:8080/. Note that both variable should start with http://, not https:// (as commented by @AbraaoAlves on #323)

Expected outcome:

  • Less cryptic error message
  • More complete documentation
  • Possibly get proxy settings from system settings and provide them to https://github.com/Microsoft/typed-rest-client/ instead of letting it figure it out from the environment variable

Error logs

2017-11-17T10:23:21.6378272Z ==============================================================================
2017-11-17T10:23:21.6378272Z Task : NuGet Tool Installer
2017-11-17T10:23:21.6378272Z Description : Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this step to change the version of NuGet used in the NuGet Restore and NuGet Command steps.
2017-11-17T10:23:21.6378272Z Version : 0.1.1
2017-11-17T10:23:21.6378272Z Author : Microsoft Corporation
2017-11-17T10:23:21.6378272Z Help :
2017-11-17T10:23:21.6378272Z ==============================================================================
2017-11-17T10:23:23.5753790Z ##[debug]agent.workFolder=E:\agent-prod_work
2017-11-17T10:23:23.5909995Z ##[debug]loading inputs and endpoints
2017-11-17T10:23:23.5909995Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2017-11-17T10:23:23.6066639Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2017-11-17T10:23:23.6066639Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2017-11-17T10:23:23.6066639Z ##[debug]loading INPUT_CHECKLATEST
2017-11-17T10:23:23.6066639Z ##[debug]loading INPUT_VERSIONSPEC
2017-11-17T10:23:23.6066639Z ##[debug]loaded 5
2017-11-17T10:23:23.8098175Z ##[debug]check path : E:\agent-prod_work_tasks\NuGetToolInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7c5d\0.1.1\task.json
2017-11-17T10:23:23.8098175Z ##[debug]set resource file to: E:\agent-prod_work_tasks\NuGetToolInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7c5d\0.1.1\task.json
2017-11-17T10:23:23.8098175Z ##[debug]system.culture=en-US
2017-11-17T10:23:23.8254214Z ##[debug]versionSpec=4.0.0
2017-11-17T10:23:23.8254214Z ##[debug]checkLatest=false
2017-11-17T10:23:23.8254214Z ##[debug]isExplicit: 4.0.0
2017-11-17T10:23:23.8254214Z ##[debug]explicit? true
2017-11-17T10:23:23.8254214Z ##[debug]Exact match expected on version: 4.0.0
2017-11-17T10:23:23.8254214Z ##[debug]Trying to get tool from local cache
2017-11-17T10:23:23.8254214Z ##[debug]isExplicit: 4.0.0
2017-11-17T10:23:23.8254214Z ##[debug]explicit? true
2017-11-17T10:23:23.8254214Z ##[debug]Agent.Version=2.122.1
2017-11-17T10:23:23.8254214Z ##[debug]Agent.ToolsDirectory=E:\agent-prod_work_tool
2017-11-17T10:23:23.8254214Z ##[debug]checking cache: E:\agent-prod_work_tool\NuGet\4.0.0\x64
2017-11-17T10:23:23.8254214Z ##[debug]not found
2017-11-17T10:23:23.8254214Z ##[debug]Agent.Version=2.122.1
2017-11-17T10:23:23.8254214Z ##[debug]Agent.ToolsDirectory=E:\agent-prod_work_tool
2017-11-17T10:23:23.8254214Z ##[debug]evaluating 0 versions
2017-11-17T10:23:23.8254214Z ##[debug]match not found
2017-11-17T10:23:23.8254214Z ##[debug]Querying versions list
2017-11-17T10:23:24.1222715Z ERR:socket hang up
2017-11-17T10:23:24.1222715Z ##[debug]task result: Failed
2017-11-17T10:23:24.1222715Z ##[debug]Processed: ##vso[task.complete result=Failed;]

@jjolidon
Copy link
Author

Note: Actually the http without s info comes from jspm/github#59 and was from @erfangc . Credit where credit is actually due...

@ghost ghost added the Area: Packaging label Nov 18, 2017
@ghost ghost assigned keithrob and zjrunner Nov 18, 2017
@keithrob
Copy link
Contributor

@jjolidon,
Documentation for VSTS agent Proxy support is here. Was the issue that you couldn't find the documentation or that it wasn't clear?

As for a "less cryptic" error message, that's a fair point and that is probably best fixed in the source library, i.e. vsts-task-tool-lib. PR is over there..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants