Upgrade issues 3.7 onwards

I have a Foreman/Katello server that I’ve been neglecting and finally have some time to upgrade it to the current release. 3.5->3.6 went fine. 3.6->3.7 is where things started to go off the rails.

My system is using Rocky Linux 8. I started by upgrading the OS from 8.7-8.9.

As I said, the upgrade of Foreman 3.5/Katello 4.7 to Foreman 3.6/Katello 4.8 went fine.

Issue #1:

The first issue I had was the rubygem-foreman_column_view package. Running ‘dnf update --nobest’ obsoletes and removes the package. I saw in the release notes and elsewhere on the forum that the functionality in this package had been incorporated into Foreman and it was no longer needed. Running foreman-install, however, attempts to install the package.

I got around this by uninstalling foreman-obsolete-packages and re-installing rubygem-foreman_column_view via URL directly from the Foreman 3.6 repo. This allowed the installation to continue. This is an annoyance and having an extraneous package shouldn’t affect the rest of the install.

Issue #2

Post-upgrade tasks fail because Candlepin isn’t running.

After some digging, I found this error in /var/log/tomcat/localhost.2024-05-03.log:

03-May-2024 11:08:47.964 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart
    Error configuring application listener of class [org.candlepin.guice.CandlepinContextListener]
        java.lang.UnsupportedClassVersionError: org/candlepin/guice/CandlepinContextListener has been
             compiled by a more recent version of the Java Runtime (class file version 61.0), 
             this version of the Java Runtime only recognizes class file versions up to 55.0 (unable
             to load class [org.candlepin.guice.CandlepinContextListener])

55 = Java 11
61 = Java 17

I tried removing Java 11 and setting alternatives, but I can’t get Candlepin to use the correct JRE.

java                  	manual	/usr/lib/jvm/java-17-openjdk-
jre_openjdk           	manual	/usr/lib/jvm/java-17-openjdk-
javac                 	manual	/usr/lib/jvm/java-17-openjdk-
java_sdk_openjdk      	manual	/usr/lib/jvm/java-17-openjdk-

jre_1.8.0             	auto  	/usr/lib/jvm/java-1.8.0-openjdk-
jre_1.8.0_openjdk     	auto  	/usr/lib/jvm/jre-1.8.0-openjdk-
java_sdk_1.8.0        	auto  	/usr/lib/jvm/java-1.8.0-openjdk-
java_sdk_1.8.0_openjdk	auto  	/usr/lib/jvm/java-1.8.0-openjdk-

jre_17                	auto  	/usr/lib/jvm/java-17-openjdk-
jre_17_openjdk        	auto  	/usr/lib/jvm/jre-17-openjdk-
java_sdk_17           	auto  	/usr/lib/jvm/java-17-openjdk-
java_sdk_17_openjdk   	auto  	/usr/lib/jvm/java-17-openjdk-

jre_11                	auto  	/usr/lib/jvm/java-11-openjdk-
jre_11_openjdk        	auto  	/usr/lib/jvm/jre-11-openjdk-

I’ve attempted to run through subsequent upgrades all the way to Foreman 3.10 hoping that it would sort itself out, but no luck. I feel like I’ve missed something fairly basic, and I could use some suggestions.