jenkins-artifactory-plugin icon indicating copy to clipboard operation
jenkins-artifactory-plugin copied to clipboard

"Read timed out" when downloading from Artifactory

Open docdawning opened this issue 3 years ago • 6 comments

Describe the bug With newer versions of the Artifactory plugin installed, our Jenkins servers will routinely fail to complete downloads from our Artifactory server.

In our pipelines, this comes back with the not-so-descriptive report:

Searching for artifacts... 
Error occurred for request POST /artifactory/api/search/aql HTTP/1.1: Read timed out. 
Attempting retry #1 
Resume after a restart not supported for non-blocking synchronous steps

Here's what it looks like in the logs:

Feb 17, 2022 11:15:16 AM org.jfrog.hudson.util.JenkinsBuildInfoLog info
INFO: Searching for artifacts...
Feb 17, 2022 11:20:17 AM org.jfrog.hudson.util.JenkinsBuildInfoLog warn
WARNING: Error occurred for request POST /artifactory/api/search/aql HTTP/1.1: Read timed out.
Feb 17, 2022 11:20:17 AM org.jfrog.hudson.util.JenkinsBuildInfoLog warn
WARNING: Error occurred for request POST /artifactory/api/search/aql HTTP/1.1: Read timed out.
Feb 17, 2022 11:20:17 AM org.jfrog.hudson.util.JenkinsBuildInfoLog warn
WARNING: Error occurred for request POST /artifactory/api/search/aql HTTP/1.1: Read timed out.
Feb 17, 2022 11:20:17 AM org.jfrog.hudson.util.JenkinsBuildInfoLog warn

Our team had several people spend multiple days investigating our stack before we finally pin-pointed the issue as something specifically in this plugin. We're not sure what the root cause is, but we found that older versions of this plugin do not fail for us, and more recent versions do fail.

Here's a few versions and their status for this issue: 3.15.4: Download Time out problem 3.14.2: Download Time out problem 3.13.2: No problem

Interestingly, when we reverted to 3.13.2 we also observed the plugin to be radically faster too.

To Reproduce

  1. Install version 3.15.4 of the Artifactory plugin in to your Jenkins server
  2. Setup your Artifactory server so you can fetch some files from it
  3. Configure a Jenkins job with the below pipeline script (update to align with your environment)
  4. Launch the job
artifactoryServer = Artifactory.server 'artifactory_server'
lightweight_node_label = 'Name_of_some_specific_test_build_server'

stage("Download Artifacts"){
    node(lightweight_node_label){
        arr = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
        def tasks = [:]
        
        arr.each { num ->
            tasks["$num"] = {
                ws('${num}_test'){
                    cleanWs()        
                    echo num
                    def downloadSpecRelease = """{
              "files": [
                {
                    "pattern": "my_repo/$BRANCH/*/release/bin/warp_engine.bin",
                    "target": "local_directory/release/",
                    "flat": "true",
                    "props": "LatestDaily=true"
                }
                ]
            }"""
            
                artifactoryServer.download spec: downloadSpecRelease
                }
            }
        }
    parallel tasks
        
    }
}

Expected behavior The files are fetched successfully. But instead, we get the time out error mentioned above.

Versions

  • Jenkins Artifactory plugin version: 3.15.4
  • Jenkins operating system: Windows 10 - Version 10.0.17763 Build 17763
  • Artifactory Version: 7.33.12

Workaround We ultimately worked around this by simply reverting to version 3.13.2

docdawning avatar Feb 17 '22 19:02 docdawning