[RTFACT-17884] ScanBuild API call on non-existant build causes 500 error Created: 20/Nov/18  Updated: 04/May/20

Status: Open
Project: Artifactory Binary Repository
Component/s: Xray
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Patrick Russell Assignee: Unassigned
Resolution: Unresolved Votes: 1
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]


Generated at Tue Sep 29 11:35:04 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.