question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Download Artifact task failing in getBuildApi with tunnel error

See original GitHub issue

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DownloadBuildArtifactsV0

Environment

Issue Description

When running a YAML pipeline, it always fails at the Download Artifact task from the deployment stage. Here is a link: https://dev.azure.com/lloydslondon/Lloyds/_build/results?buildId=5669&view=logs&j=22e8b1b6-9aa9-5014-5ac4-2849544435ca&t=d7adc642-3bc9-5b30-700a-e6d1dc3c194b&l=136

Task logs

Here are some truncated logs:

...

##[debug]Agent.ProxyUrl=http://proxy.***.net:8080 |  
##[debug]Agent.ProxyUsername=DOMAINNAME\user_name |  
##[debug]Agent.ProxyPassword=*** |  
##[debug]Agent.ProxyBypassList=undefined

...

TUNNEL: making CONNECT request |  
  | Error: in getBuildApi, so retrying => retries pending  : 4 |  
  | TUNNEL: tunneling socket could not be established, cause=socket hang up |  
  | Error: socket hang up |  
  | at createHangUpError (_http_client.js:253:15) |  
  | at Socket.socketOnEnd (_http_client.js:345:23) |  
  | at emitNone (events.js:91:20) |  
  | at Socket.emit (events.js:185:7) |  
  | at endReadableNT (_stream_readable.js:974:12) |  
  | at _combinedTickCallback (internal/process/next_tick.js:80:11) |  
  | at process._tickCallback (internal/process/next_tick.js:104:9)

...

##[error]Error: tunneling socket could not be established, cause=socket hang up

I prefer to send the full logs ZIP file via email and not post it here.

Troubleshooting

I have already identified the issue and I have the fix. It is related to the version of the tunnel dependency. I will create a pull request shortly, but to the azure-devops-node-api repo, as that’s where the fix needs to go. I assume you will then change the version to your azure-devops-node-api dependency in the DownloadBuildArtifactsV0 task.

Error logs

Error: tunneling socket could not be established, cause=socket hang up

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Lovakumarcommented, Sep 24, 2019

@omeshp can you please check if new tunnel version is resolving the issue. If yes, update task to take dependency on newer version of azure-devops-node-api.

0reactions
github-actions[bot]commented, Oct 8, 2020

This issue is stale because it has been open for a year with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release pipeline fails with "Failed in getBuildApi with error: Error
Release pipeline fails with the following error while "Download build artifacts" task is running;. "Failed in getBuildApi with error: Error: tunneling ...
Read more >
Azure DevOps: build artifact download error "Error: in ...
I got this error when using the task 'Download Build Artifact' in the release pipeline of devops server 2019 or devops server 2020:....
Read more >
Client begins to download artifact, then fails - Microsoft Q&A
The logs show that the artifact gets partially downloaded, Downloaded 19.8 MB out of 57.9 MB (34%). Then we see, Try 3/5, Task...
Read more >
Downloading artifacts from Azure DevOps using .NET
In this post I show how to use the Azure DevOps REST API to view the results of builds from Pipelines and how...
Read more >
How I Failed My Way to Success with Azure Pipelines - Part 2
These are matched to two "Publish Pipeline Artifact" tasks in my build ... I didn't realize you actually have to download the artifacts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found