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

Unable to download artifacts with latest LTS version of Jenkins #896

Open
ravindrakmr opened this issue Oct 16, 2023 · 5 comments
Open

Unable to download artifacts with latest LTS version of Jenkins #896

ravindrakmr opened this issue Oct 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ravindrakmr
Copy link

Describe the bug
When running Jenkins service as local system and trying to download some artifact with the downloadArtifact() method of plugin, pipeline gives the below exception -
Downloading 'pricing-tool-local/DEVELOP/ui/2.46.1/pricing/Build-14928_Artifacts_sourcemaps.zip'...
[Thread downloader_0] downloading C:\WINDOWS\TEMP\15639933076458494381\DEVELOP/ui/2.46.1/pricing/Build-1492_Artifacts_sourcemaps.zip0 as part of file pricing-tool-local/DEVELOP/ui/2.46.1/pricing/Build-14928_Artifacts_sourcemaps.zip threw an exception: java.io.IOException: Could not create nor write to file: C:\Windows\Temp\15639933076458494381\DEVELOP\ui\2.46.1\pricing\Build-14928_Artifacts_sourcemaps.zip0
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:34)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.setResponse(DownloadToFile.java:40)
at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.processResponse(JFrogService.java:143)
at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:123)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadToFile(ArtifactoryManager.java:128)
at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.lambda$doConcurrentDownload$0(DependenciesDownloaderHelper.java:277)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.FileNotFoundException: C:\WINDOWS\TEMP\15639933076458494381\DEVELOP\ui\2.46.1\pricing\Build-14928_Artifacts_sourcemaps.zip0 (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:187)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:30)
... 6 more

To Reproduce
Run Jenkins windows service as local system and try to download some artifact from local repository via Artifactory plugin's downloadArtifact() method. Use Jenkins LTS version 2.414.2.

Expected behavior
It should be able to download the artifact without any exception.

Versions

  • Jenkins Artifactory plugin version: 3.18.12
  • Jenkins operating system: Windows Server 2019
  • Artifactory Version: 7.21.5
  • Jenkins Version: 2.414.2

Additional context
Getting same exception even with downgraded version of Artifactory plugin.

@ravindrakmr ravindrakmr added the bug Something isn't working label Oct 16, 2023
@yahavi
Copy link
Member

yahavi commented Oct 16, 2023

@ravindrakmr,
Thank you for using the Jenkins Artifactory plugin.
There isn't a downloadArtifact method available in the Jenkins Artifactory plugin. Could you please provide the complete steps for reproduction?

You have the option to use rtDownload or server.download methods for downloading.

@ravindrakmr
Copy link
Author

ravindrakmr commented Oct 17, 2023

@yahavi , Sorry my bad. Method downloadArtifact is a wrapper we created and it uses rtDownload method only under the hood from the plugin. To reproduce , please run latest LTS Jenkins as windows service (with local system user) and try to use rtDownload() method to download some artifact.

@aniljadaun
Copy link

Hi @yahavi @ravindrakmr Are you able to resolve this ? I am getting a similar issue. Seems like a regression to me. it is working for us with older version

@atr1hc
Copy link

atr1hc commented Jan 16, 2024

Hello @aniljadaun
Could you please tell me which older version work for you?
From my testing, seems that it work on Jenkins LTS 2.401.3 (no matter Artifactory (plugin) version)

@aniljadaun
Copy link

Hi @atr1hc

I am using jenkins LTS 2.426.2 and it is still not working. please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants