puppetlabs / puppetserver

Server automation framework and application
https://tickets.puppetlabs.com/browse/SERVER
Apache License 2.0
292 stars 235 forks source link

ruby java mismatch with puppetserver 8 on EL8 systems - puppetserver does not start #2870

Open tskirvin opened 1 month ago

tskirvin commented 1 month ago

Describe the Bug

The ruby version built into puppetserver doesn't work with EL8 systems:

HOST1 ~# puppetserver ruby --version
Execution error (UnsupportedClassVersionError) at java.lang.ClassLoader/defineClass1 (ClassLoader.java:-2).
com/puppetlabs/puppetserver/EnvironmentRegistry has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Expected Behavior

This is what it looked like on EL8 running puppetserver 7:

HOST2 ~# puppetserver ruby --version
jruby 9.3.4.0 (2.6.8) 2022-03-23 eff48c1ebf OpenJDK 64-Bit Server VM 25.412-b08 on 1.8.0_412-b08 +jit [x86_64-linux]

And, on the first host after downgrading to puppetserver-7.17.2-1:

HOST1 ~# puppetserver ruby --version
jruby 9.3.14.0 (2.6.8) 2024-02-20 0db23ddd14 OpenJDK 64-Bit Server VM 25.422-b05 on 1.8.0_422-b05 +jit [x86_64-linux]

Steps to Reproduce

yum localinstall https://yum.puppetlabs.com/puppet8/el/8/x86_64/puppetserver-8.6.2-1.el8.noarch.rpm
puppetserver ruby --version

Environment

Additional Context

tskirvin commented 1 month ago

To be clear, this means that puppetserver does not start.

joshcooper commented 1 month ago

@tskirvin Puppetserver 8 doesn't support Java 8 https://www.puppet.com/docs/puppet/8/server/release_notes#deprecations-and-removals

tskirvin commented 1 month ago

Yes, but this is (as a far as I can tell) all running within the internal rpm stack? There's no java to upgrade on the system, and no additional puppet-land rpms to install. What should I be installing to make this work on EL8?

joshcooper commented 1 month ago

Try Java 11 as described in https://developers.redhat.com/blog/2018/12/10/install-java-rhel8

tskirvin commented 1 month ago

Good, that works! Should there be documentation to that effect? Is there a simple puppet module to handle this with the puppetlabs/java module, assuming we're already properly bootstrapped?

tskirvin commented 4 weeks ago

Or maybe this is just a packaging thing? Shouldn't the rpm specify the requirements adequately to run the software?