Leapp Preupgrade reports `Risk Factor: high (error) - Title: DNF execution failed with non zero exit code.` during in-place upgrade of Red Hat Satellite 6.16 server from RHEL 8.10 to RHEL 9.6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.16
  • Red Hat Enterprise Linux 8.x

Issue

  • Issue during in-place upgrade of Red Hat Satellite 6.16 server from RHEL 8.10 to RHEL 9.6

  • After running the leapp preupgrade --target 9.6 command, the following high risk factor (error) was logged in leapp-report.txt:

      Risk Factor: high (error)
      Title: DNF execution failed with non zero exit code.
      Summary: {"STDOUT": "Last metadata expiration check: 0:02:24 ago on Thu Oct 30 14:23:13 2025.\nPackage candlepin-4.4.21-1.el8sat.noarch is already installed.\nPackage candlepin-selinux-4.4.21-1.el8sat.noarch is already installed.\nPackage foreman-3.12.0.8-1.el8sat.noarch is already installed.\nPackage foreman-installer-1:3.12.0.6-1.el8sat.noarch is already installed.\nPackage foreman-installer-katello-1:3.12.0.6-1.el8sat.noarch is already installed.\nPackage foreman-proxy-3.12.0-1.el8sat.noarch is already installed.\nPackage foreman-selinux-3.12.0-1.el8sat.noarch is already installed.\nPackage katello-4.14.0-0.1.rc2.el8sat.noarch is already installed.\nPackage katello-selinux-5.0.2-1.el8sat.noarch is already installed.\nPackage postgresql-13.22-1.module+el8.10.0+23422+b659575f.x86_64 is already installed.\nPackage postgresql-contrib-13.22-1.module+el8.10.0+23422+b659575f.x86_64 is already installed.\nPackage postgresql-evr-0.0.2-3.el8sat.noarch is already installed.\nPackage postgresql-server-13.22-1.module+el8.10.0+23422+b659575f.x86_64 is already installed.\n ....
    .
    .
      - package rubygem-hammer_cli_katello-1.14.2-1.el8sat.noarch from @System requires (rubygem(hammer_cli_foreman) >= 3.9 with rubygem(hammer_cli_foreman) < 4), but none of the providers can be installed\n  - python3.11-requests-2.32.3-2.el8pc.noarch from @System  does not belong to a distupgrade repository\n  - python3.11-libs-3.11.13-2.el8_10.x86_64 from @System  does not belong to a distupgrade repository\n  - python3.11-3.11.13-2.el8_10.x86_64 from @System  does not belong to a distupgrade repository\n  - conflicting requests\n", "hint": "If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process."}
    Key: 1e26c8b86cec72c25c04ca045d2b0ed3e8ca2df5
    

Resolution

  1. Perform the steps in the Diagnostic Steps section of this solution article to verify whether it fits the observed issue. Proceed only if you get similar outcomes from the diagnostic steps.

  2. Enable the satellite-6.16-for-rhel-8-x86_64-rpms and satellite-maintenance-6.16-for-rhel-8-x86_64-rpms repositories on the Satellite server:

# subscription-manager repos --enable=satellite-6.16-for-rhel-8-x86_64-rpms --enable=satellite-maintenance-6.16-for-rhel-8-x86_64-rpms
  1. Make sure that subscription-manager release is set to 8.10 by running the following command on the Satellite server:
# subscription-manager release --set=8.10
  1. Rerun the leapp upgrade command:
# leapp preupgrade --target 9.6

For more KB articles/solutions related to Red Hat Satellite 6.x LEAPP Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x LEAPP Issues

Root Cause

The satellite-6.16-for-rhel-8-x86_64-rpms and satellite-maintenance-6.16-for-rhel-8-x86_64-rpms repositories were not enabled on the Satellite server before running the leapp preupgrade --target 9.6 command.

Diagnostic Steps

  1. Open the leapp preupgrade report leapp-report.txt with an editor, e.g. vim.

  2. Extract the content of the Summary line of the Risk Factor: high (error) to a new file:

Risk Factor: high (error)
Title: DNF execution failed with non zero exit code.
Summary: {...}
When using *`vim`*, move to the opening bracket, hit **V** key  (uppercase **v**) then, while the line is highlighted, type `:w /tmp/line.out` then hit the ***Enter** key to create a temporary file containing only the highlighted line.
  1. Reformat the error message in human-readable form:

    $ echo -e $(cat /tmp/line.out) > /tmp/summary.out
    
  2. Edit or cat the /tmp/summary.out file to see clearly which errors were happening:

        $ cat /tmp/summary.out
        "STDERR": "warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
        warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
        Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp leapp-upgrade-el8toel9 python3-leapp
        Transaction check:
    
         Problem 1: package rubygem-foreman_maintain-1:1.7.13-1.el8sat.noarch from @System requires python(abi) = 3.6, but none of the providers can be installed
     - conflicting requests
         Problem 2: package python3.11-pulp-rpm-3.26.5-1.el8pc.noarch from @System requires python3.11-createrepo_c >= 1.1.0, but none of the providers can be installed
     - package python3.11-createrepo_c-1.1.3-1.el8pc.x86_64 from @System requires libdrpm.so.0()(64bit), but none of the providers can be installed
     - conflicting requests
         Problem 3: package python3.11-pulpcore-3.49.39-1.el8pc.noarch from @System requires python3.11-cryptography >= 38.0.1, but none of the providers can be installed
     - python3.11-cryptography-42.0.8-1.el8pc.x86_64 from @System does not belong to a distupgrade repository
     - conflicting requests
         Problem 4: package rubygem-foreman_maintain-1:1.7.13-1.el8sat.noarch from @System requires python(abi) = 3.6, but none of the providers can be installed
     - package foreman-installer-katello-1:3.12.0.6-1.el8sat.noarch from @System requires foreman-maintain, but none of the providers can be installed
     - platform-python-3.6.8-71.el8_10.x86_64 from @System does not belong to a distupgrade repository
     - conflicting requests
         Problem 5: package rubygem-sqlite3-1.4.4-1.el8sat.x86_64 from @System requires libruby.so.2.7()(64bit), but none of the providers can be installed
     - package rubygem-smart_proxy_dynflow-0.9.3-1.el8sat.noarch from @System requires (rubygem(sqlite3) >= 1.0 with rubygem(sqlite3) < 2), but none of the providers can be installed
     - ruby-libs-2.7.8-139.module+el8.8.0+18745+f1bef313.x86_64 from @System does not belong to a distupgrade repository
     - conflicting requests
     .
     .
    
  3. Verify that only the rhel-8-for-x86_64-appstream-rpms and rhel-8-for-x86_64-baseos-rpms repositories are enabled on the Satellite server:

# dnf -C repolist
Updating Subscription Management repositories.
repo id                          repo name
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms    Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
SBR
Product(s)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.