Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-17884

ScanBuild API call on non-existant build causes 500 error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Xray
    • Labels:
      None

      Description

      Symptoms: Artifactory reports a "connection error" when attempting to scan a build, with a 500 error.

      Steps to reproduce:

      1. Run a jfrog CLI command to scan a non-existant build:
        jfrog rt bs my-build-name 18
        [Info] Performing Xray build scan, this operation might take few minutes...
        [Info] Connection error: Artifactory Response: 500 Internal Server Error, reconnecting...
        [Info] Connection error: Artifactory Response: 500 Internal Server Error, reconnecting...
        [Info] Connection error: Artifactory Response: 500 Internal Server Error, reconnecting...
        [Info] Connection error: Artifactory Response: 500 Internal Server Error, reconnecting..

       

      The Artifactory logs indicate there was a connection problem, while Xray reports a correct 404 response:

      [artifactory.log]

      2018-11-20 23:09:01,508 [http-nio-8081-exec-3] [INFO ] (o.a.a.x.XrayServiceImpl:369) - Sending request for scan summary report on build name my-build-name and number 18
      2018-11-20 23:09:01,535 [http-nio-8081-exec-3] [ERROR] (o.j.x.c.e.XrayClientEventHandlerImpl:79) - Scan summary report for build name 'my-build-name' number '18' is not available. Check connectivity to Xray

      [xray-server.log]

      [2018/11/20 23:08:53 UTC] [DEBG] (jfrog.com/xray/handlers/index.Scanner.ScanBuild:51) Got scan build message &{EventType:build DownloadUrl: ArtifactoryId:art-gcp RepoKey:build Path:/my-build-name_build-info.json 

      [...]

      [2018/11/20 23:08:53 UTC] [DEBG] (jfrog.com/xray/handlers/index.scanBuild:79) Failed to send build to index:Build my-build-name:18 isn't found in Artifactory
      [...]

      [2018/11/20 23:09:01 UTC] [DEBG] (jfrog.com/xray/utils/xhttp.HTTPClientImpl.execute:164)

      Url:http://10.138.0.2:8081/artifactory/api/build/my-build-name/18
      <--------- RESPONSE --------->
      StatusCode:404
      Headers:
      Content-Type:[application/json]
      Date:[Tue, 20 Nov 2018 23:09:01 GMT]
      Server:[Artifactory/6.5.2]
      X-Artifactory-Id:[b119ded171c9014f:-7a41cab8:167335a887e:-8000]

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            patrickr Patrick Russell
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: