XRAY: Resolving rpm error in jf docker scan for JAS

XRAY: Resolving rpm error in jf docker scan for JAS

AuthorFullName__c
Jian Sun
articleNumber
000006225
FirstPublishedDate
2024-11-07T12:28:09Z
lastModifiedDate
2025-08-01
Introduction 

Sometimes when running On-Demand Docker scan on Xray with JAS, by executing jf docker scan minio/minio:latest, an error occurs, returning the following terminal message:
[🚨Error] [Thread 0] failed to run Applicability scan. Exit code received: exit status 51

 

Additionally, three log files are generated for this scan:

1. ~/.jfrog/logs/jfrog-cli.<date>.log
  • This log file does not show any errors.
2. ~/.jfrog/logs/analyzerManagerLogs/AnalyzerManagerLogFile_sec_<date>
  • This log file does not show any errors.
3. ~/.jfrog/logs/analyzerManagerLogs/AnalyzerManagerLogFile_ca_<date>
  • While using the jas_scanner, an exception occurs during RPM detection due to missing dependencies. The error logs display:

    Traceback (most recent call last):
      File loguru/_handler.py, line 147, in emit
      File loguru/_better_exceptions.py, line 528, in format_exception
      ...
    FileNotFoundError: [Errno 2] No such file or directory: 'rpm'

     

Root Cause
This error occurs because the jas_scanner relies on the rpm tool to detect RPM-based packages, which is not installed on the system.

Resolution
Install the rpm package manager on your system using one of the following commands, depending on your OS:
For Red Hat-based distributions (e.g., CentOS, RHEL):
$ yum install rpm


For Debian-based distributions (e.g., Ubuntu):

$ apt install rpm


For macOS:

$ brew install rpm


After installing rpm, rerun jas_scanner. The detection process should proceed without encountering the missing file error.