Problem:
I found a reproducible issue between Candlepin 4.8.4 and the configuration generated by foreman-installer.
The installed Candlepin RPM explicitly requires Java 25:
rpm -q --requires candlepin | grep java
Output:
java-25-headless >= 1:25.0.0
However, foreman-installer rewrites:
/etc/tomcat/tomcat.conf
to:
JAVA_HOME=“/usr/lib/jvm/jre-17”
After a Tomcat restart, Candlepin fails to start and hammer ping reports:
candlepin:
Status: FAIL
Server Response: Message: 404 Not Found
candlepin_auth:
Status: FAIL
Server Response: Message: Katello::Errors::CandlepinNotRunning
Tomcat logs contain:
java.lang.UnsupportedClassVersionError:
org.candlepin.guice.CandlepinContextListener has been compiled by a more recent version of the Java Runtime
class file version 69.0
this version of the Java Runtime only recognizes class file versions up to 61.0
Expected outcome:
Either:
- Candlepin 4.8.4 should run correctly with the Java version configured by foreman-installer
or
- foreman-installer should configure the Java version required by the installed Candlepin package.
I would also like to know the supported/recommended way to override candlepin::java_home if Java 25 is expected.
Foreman and Proxy versions:
Foreman 3.19.1
Integrated Smart Proxy only (no external Capsules)
Foreman and Proxy plugin versions:
Katello 4.21.1.1
Candlepin 4.8.4-1.el9
Distribution and version:
RHEL 9
Other relevant data:
Installed package:
rpm -qi candlepin
NAME=candlepin
VERSION=4.8.4
RELEASE=1.el9
VENDOR=Fedora Copr - group @theforeman
BUILDHOST=aws-x86-64-reserved-prod-15474770-20260731-131023
RPM dependency:
rpm -q --requires candlepin | grep java
java-25-headless >= 1:25.0.0
Katello manifest:
grep -R “java_home” /usr/share/foreman-installer/modules/katello
Output:
java_home => ‘/usr/lib/jvm/jre-17’
Reproduction:
1. Set:
JAVA_HOME=“/usr/lib/jvm/java-25-openjdk”
2. Restart Tomcat.
3. Verify:
hammer ping
All services are OK.
4. Save current configuration:
cp -p /etc/tomcat/tomcat.conf /root/tomcat.conf.before
5. Run:
foreman-installer
6. Observe:
diff -u /root/tomcat.conf.before /etc/tomcat/tomcat.conf
Result:
- JAVA_HOME=“/usr/lib/jvm/java-25-openjdk”
+ JAVA_HOME=“/usr/lib/jvm/jre-17”
7. Before restarting Tomcat:
hammer ping still reports all services OK.
8. Restart Tomcat:
systemctl restart tomcat
9. Result:
candlepin FAIL
candlepin_auth FAIL
10. Restore:
JAVA_HOME=“/usr/lib/jvm/java-25-openjdk”
11. Restart Tomcat again:
systemctl restart tomcat
12. Result:
hammer ping returns all services OK again.
Question:
Is Java 25 expected for candlepin-4.8.4-1.el9?
If yes, should foreman-installer configure Java 25 instead of Java 17?
Or is there another supported way to override candlepin::java_home?
Regards,