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

V 1.13.5 can't download JFROG cli behind a corporate proxy #314

Closed
Bjego opened this issue Feb 15, 2022 · 5 comments
Closed

V 1.13.5 can't download JFROG cli behind a corporate proxy #314

Bjego opened this issue Feb 15, 2022 · 5 comments

Comments

@Bjego
Copy link

Bjego commented Feb 15, 2022

Dear JFROG Team,
since the last update of the plugin we are facing issues in V.13.5 when the plugin tries to download the JFROG cli. The proxy settings aren't read from Azure DevOps as in other plugins. Please fix the code to use the proxy settings provided by the agent software.

Previous versions of the plugin could download the cli without any issues.
Maybe this link helps:
https://github.com/microsoft/azure-pipelines-task-lib/blob/master/node/docs/proxy.md

Log:

2022-02-15T09:19:19.3322535Z ##[section]Starting: Deploying to Artifactoy
2022-02-15T09:19:19.5697099Z ##[section]Starting: Initialize job
2022-02-15T09:19:19.5698457Z Agent name: 'WINDOWS-SERVER-NAME'
2022-02-15T09:19:19.5698792Z Agent machine name: 'WINDOWS-SERVER-NAME'
2022-02-15T09:19:19.5699004Z Current agent version: '2.193.1'
2022-02-15T09:19:19.5723698Z Agent running as: '***'
2022-02-15T09:19:19.5724054Z Agent is running behind proxy server: 'http://proxy.MYCORPORATE.de:8080'
2022-02-15T09:19:19.5757379Z Prepare build directory.
2022-02-15T09:19:19.6158348Z Set build variables.
2022-02-15T09:19:19.6184259Z Download all required tasks.
2022-02-15T09:19:19.6459799Z Checking job knob settings.
2022-02-15T09:19:19.6466831Z Finished checking job knob settings.
2022-02-15T09:19:19.6805024Z Start tracking orphan processes.

## Removed some logs here

2022-02-15T09:19:42.3635231Z ##[section]Starting: ArtifactoryGenericUpload
2022-02-15T09:19:42.3785724Z ==============================================================================
2022-02-15T09:19:42.3786045Z Task         : Artifactory Generic Upload
2022-02-15T09:19:42.3786477Z Description  : Upload build artifacts to Artifactory using FileSpecs while allowing to collect build-info. The collected build-info can be later published to Artifactory by the "Artifactory Publish Build Info" task.
2022-02-15T09:19:42.3786891Z Version      : 2.13.5
2022-02-15T09:19:42.3787082Z Author       : JFrog
2022-02-15T09:19:42.3787506Z Help         : [More Information](https://www.jfrog.com/confluence/display/JFROG/Artifactory+Azure+DevOps+Extension#ArtifactoryAzureDevOpsExtension-UploadingGenericArtifactstoArtifactory)
2022-02-15T09:19:42.3787934Z ==============================================================================
2022-02-15T09:19:43.4442819Z (node:1076) Warning: Use Cipheriv for counter mode of aes-256-ctr
2022-02-15T09:19:43.4450425Z Downloading: https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.1/jfrog-cli-windows-amd64/jfrog.exe
2022-02-15T09:19:43.4483224Z ##[error]Error occurred while executing task:
Failed while attempting to download JFrog CLI from https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.1/jfrog-cli-windows-amd64/jfrog.exe. If this build agent cannot access the internet, you may use the 'Artifactory Tools Installer' task, to download JFrog CLI through an Artifactory repository, which proxies https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.1/jfrog-cli-windows-amd64/jfrog.exe. You may also manually download version 1.53.1 of JFrog CLI and place it on the agent in the following path: C:\AgentSoftware\_work\_tool\_jfrog\current\jfrog.exe
Error: tunneling socket could not be established, statusCode=407
2022-02-15T09:19:43.4497112Z ##[section]Finishing: ArtifactoryGenericUpload
2022-02-15T09:19:43.4642443Z ##[section]Starting: Finalize Job
2022-02-15T09:19:43.4671054Z Cleaning up task key
2022-02-15T09:19:43.4672905Z Start cleaning up orphan processes.
2022-02-15T09:19:43.4691803Z ##[section]Finishing: Finalize Job
2022-02-15T09:19:43.4728440Z ##[section]Finishing: Deploying to Artifactoy

Other versions:
image

@RobiNino
Copy link
Contributor

Hi @Bjego ,
Thanks for reaching out.
Since the JFrog CLI version hasn't been updated since 1.13.2, it may have been downloaded and cached then so you didn't encounter the issue up until now.

We are not aware of any changes in the last patches that could cause this. The only change that might be relevant is the upgrade of azure-pipelines-task-lib as part of the Node10 migration, but I believe it's irrelevant since the download is done by azure-pipelines-tool-lib and it wasn't updated lately.

We weren't able to reproduce it on our side, but will continue looking into it.
Are you able to verify the proxy configuration is working in other extensions that download tools?

In the meantime as a workaround, you can try using the Artifactory Tools Installer task to configure the JFrog CLI version to 1.52.0 so the cached version will be used.

Thanks

@Bjego
Copy link
Author

Bjego commented Feb 17, 2022

@RobiNino I've "installed" the cli by downloading it and putting it into the currentfolder - from the error logs.

Failed while attempting to download JFrog CLI from https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.1/jfrog-cli-windows-amd64/jfrog.exe. If this build agent cannot access the internet, you may use the 'Artifactory Tools Installer' task, to download JFrog CLI through an Artifactory repository, which proxies https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.1/jfrog-cli-windows-amd64/jfrog.exe. You may also manually download version 1.53.1 of JFrog CLI and place it on the agent in the following path: C:\AgentSoftware\_work\_tool\_jfrog\current\jfrog.exe

Which version of the agent software did you use for your tests? And did you test with the new V2 plugin or the V1 plugin (which I use).

Is there any documentation of the V2 plugin compared to the V1 plugin?

@RobiNino
Copy link
Contributor

@Bjego
We have a proxy test that runs on Ubuntu and Windows.
I also tested it on MacOS with the v1 plugin. We'll test it manually on windows as well to make sure.

Documentation:
Artifactory Extension - v1 vs JFrog Extension - v2, but I don't recall anything changing in that aspect.

@RobiNino
Copy link
Contributor

Hi @Bjego ,
It is possible that you were also affected by the issue described at #316 , and your proxy masked the error.
Please try again with the latest version and let us know if it was resolved for you.
Thanks

@Bjego
Copy link
Author

Bjego commented Sep 25, 2023

No longer from interest - Thank you

@Bjego Bjego closed this as completed Sep 25, 2023
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

2 participants