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

Issues with Downloading Large Files from Artifactory through Jenkins Pipeline : Urgent Assistance Needed #941

Open
safeereshan12 opened this issue Jun 7, 2024 · 2 comments
Labels
question Further information is requested

Comments

@safeereshan12
Copy link

Hello,

I am currently working on a Jenkins pipeline that involves the build, upload, and download of a large file (approximately 10GB). The build and upload stages are executed on a pod template container, while the download is performed on a Linux VM, which we have connected as a node in Jenkins.

However, I am encountering issues during the download stage from Artifactory. The error message I receive is as follows:

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:833)
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 2,495,238,826; received: 1,092,704,438)
	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:148)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1487)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1107)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1460)
	at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:31)

Here is a snippet of the pipeline code for the download stage:

stage('rtDownload') {
    steps {
        rtDownload (
            serverId: "ABC - 123",
            buildName: "${JOB_NAME}",
            buildNumber: "${BUILD_NUMBER}",
            spec: """{
                "files": [
                    {
                        "pattern": "ProjectName/${JOB_NAME}/${BUILD_NUMBER}/filename.iso",
                        "target": "$WORKSPACE/$BUILD_NUMBER/source/",
                        "flat": "true"
                    }
                ]
            }"""
        )
    }
}

I am unsure if there is a file size limit for downloads from Artifactory or if there is another underlying issue causing this problem. I would greatly appreciate any insights or suggestions on how to resolve this issue.

Jenkins
Version 2.440.1

Thank you in advance for your assistance.

Best Regards,
Safeer Pasha

@safeereshan12 safeereshan12 added the question Further information is requested label Jun 7, 2024
@eyalbe4
Copy link

eyalbe4 commented Jun 7, 2024

@safeereshan12,
We strongly recommend switching over to the next gen JFrog Jenkins Plugin. It's superior in terms of performance, stability and feature set compared to the older Artifactory Jenkins Plugin.

@kreuzberger
Copy link

After upgrading our artifactory server instance to Open source license 7.38.10 rev 73810900 we get the same error.

We are using the same plugin, but that worked with the prior version of the artifcatory server well.
nginx configuration is properly set, so upload the large files is no problem from jenkins.
Update of jenkins plugin is not possible (currently).

The download stops each time at the same nearly same size.
jt download and download via ui behave and works like expected.

Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 3,959,299,414; received: 1,094,656,004)

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

No branches or pull requests

3 participants