Risk Factor: High (Error)
Title: DNF execution failed with a non-zero exit code
Error Summary:
During the Leapp upgrade from RHEL 7 to RHEL 8, the upgrade process failed due to a dependency conflict involving Tomcat packages. The error message specifically highlights an issue with tomcat-lib-7.0.76-16.el7_9.noarch, which cannot be upgraded to its best candidate in RHEL 8. This is because the tomcat package has been removed from RHEL 8 in favor of JBoss Web Server’s Tomcat offering.
Key Error Messages Extracted:
Warning: Package marked by Leapp to install not found in repositories metadata: log4j12Warning: Package marked by Leapp to upgrade not found in repositories metadata: leapp-upgrade-el7toel8 gpg-pubkey leapp python2-leappProblem: problem with installed package tomcat-lib-7.0.76-16.el7_9.noarchCannot install the best update candidate for package tomcat-lib-7.0.76-16.el7_9.noarchPackage tomcat-lib-1:9.0.62-27.el8_9.3.noarch from rhel-8-for-x86_64-appstream-rpms requires tomcat-servlet-4.0-api, but none of the providers can be installedPackage tomcat-servlet-4.0-api conflicts with pki-servlet-4.0-api(multiple instances)tomcat-lib-7.0.76-16.el7_9.noarch from @System does not belong to a distupgrade repository
Root Cause Analysis
The primary reason for this failure is that tomcat and its associated libraries (tomcat-lib, tomcat-servlet) are no longer available in RHEL 8. Red Hat has removed these packages in favor of JBoss Web Server, leading to package dependency conflicts during the upgrade process.
Additionally, the conflicting pki-servlet-4.0-api versions in the repository cause further issues in resolving dependencies, preventing the upgrade from proceeding.
Resolution Steps
To resolve the issue, follow these steps:
Step 1: Remove Tomcat-Related Packages from the Leapp Transaction
Since tomcat is no longer supported in RHEL 8, we need to explicitly remove it before proceeding with the upgrade.
- Open a terminal with root privileges.
- Run the following command to append
tomcat-libto the list of packages to be removed:echo tomcat-lib >> /etc/leapp/transaction/to_removeThis command instructs Leapp to removetomcat-libbefore proceeding with the upgrade.
Step 2: Verify Package Removal List
To confirm that tomcat-lib is included in the removal list, execute:
cat /etc/leapp/transaction/to_remove
Ensure that tomcat-lib appears in the output.
Step 3: Retry the Upgrade Process
After confirming the removal, reattempt the upgrade process:
leapp upgrade
This should allow the upgrade to proceed without encountering Tomcat-related dependency issues.
Step 4: Post-Upgrade Validation
Once the upgrade completes successfully:
- Verify that the system is running RHEL 8:
cat /etc/redhat-releaseThe output should confirm the OS version as RHEL 8. - If your applications require Tomcat, consider migrating to JBoss Web Server as per Red Hat’s recommendation.
Additional Information
- Tomcat has been removed from RHEL 8 in favor of JBoss Web Server’s Tomcat offering. If your applications depend on Tomcat, you may need to install and configure JBoss Web Server manually after the upgrade.
- If further dependency conflicts arise, you can analyze the transaction logs under
/var/log/leapp/for additional troubleshooting.
Conclusion
The failure of the Leapp upgrade was caused by the removal of Tomcat from RHEL 8, which led to dependency conflicts. By explicitly removing tomcat-lib before the upgrade, we ensure that the upgrade process completes successfully. If Tomcat functionality is required post-upgrade, migrating to JBoss Web Server is recommended.









