Upgrade to Red Hat Satellite 6.4 fails to start candlepin with error Unsupported major.minor version 52.0.

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.4

Issue

  • Red Hat Satellite upgrade from 6.3 to 6.4 fails to start candlepin services:
[root@satellite6.4 ~]# hammer ping

candlepin:      
    Status:          FAIL
    Server Response:
candlepin_auth: 
    Status:          FAIL
    Server Response:
pulp:           
    Status:          ok
    Server Response: Duration: 58ms
pulp_auth:      
    Status:          ok
    Server Response: Duration: 25ms
foreman_tasks:  
    Status:          ok
    Server Response: Duration: 170ms

Resolution

  • This is a known issue filed in Bug.

  • The following workaround fixes the issue on Red Hat Satellite 6.4:

[root@satellite6.4 ~]# alternatives --config java
<select number for java-1.8.0>

[root@satellite6.4 ~]# satellite-installer -S satellite --upgrade

Root Cause

  • Red Hat Satellite 6.4 seems to always have java-1.8.0 selected by default and this issue seems likely to only be hit by the upgrade of Red Hat Satellites whose Java versions were never changed to 1.8.0.
  • Ideally, the upgrade should be installing the newer Java as we do require java-1.8.0 in Red Hat Satellite 6.4.

Diagnostic Steps

  • Full trace of errors as witnessed in /var/log/foreman-installer/satellite.log:
[ INFO 2019-07-10T16:10:21 main] Upgrade Step: migrate_candlepin...
[DEBUG 2019-07-10T16:10:27 main] 
[DEBUG 2019-07-10T16:10:27 main] ########## ERROR ############
[DEBUG 2019-07-10T16:10:27 main] Error running command: liquibase --driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/cla
sses/ --changeLogFile=db/changelog/changelog-update.xml --url=jdbc:postgresql://localhost/candlepin --username=candlepin --password=+FILTERED+ --logLevel=severe migrate -Dcommunity=False
[DEBUG 2019-07-10T16:10:27 main] Status code: 65280
[DEBUG 2019-07-10T16:10:27 main] Command output: Liquibase update Failed: org/candlepin/liquibase/FixDuplicatePoolsLiquibaseWrapper : Unsupported major.minor version 52.0
[DEBUG 2019-07-10T16:10:27 main] SEVERE 7/10/19 4:10 PM:liquibase: org/candlepin/liquibase/FixDuplicatePoolsLiquibaseWrapper : Unsupported major.minor version 52.0
[DEBUG 2019-07-10T16:10:27 main] java.lang.UnsupportedClassVersionError: org/candlepin/liquibase/FixDuplicatePoolsLiquibaseWrapper : Unsupported major.minor version 52.0
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.ClassLoader.defineClass1(Native Method)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
[DEBUG 2019-07-10T16:10:27 main]        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[DEBUG 2019-07-10T16:10:27 main]        at java.net.URLClassLoader.defineClass(URLClassLoader.java:443)
[DEBUG 2019-07-10T16:10:27 main]        at java.net.URLClassLoader.access$100(URLClassLoader.java:65)
[DEBUG 2019-07-10T16:10:27 main]        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[DEBUG 2019-07-10T16:10:27 main]        at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
[DEBUG 2019-07-10T16:10:27 main]        at java.security.AccessController.doPrivileged(Native Method)
[DEBUG 2019-07-10T16:10:27 main]        at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.resource.CompositeResourceAccessor$CompositeClassLoader.loadClass(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.Class.forName0(Native Method)
[DEBUG 2019-07-10T16:10:27 main]        at java.lang.Class.forName(Class.java:278)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.change.custom.CustomChangeWrapper.setClass(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.setProperty(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.setAllProperties(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:744)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2781)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:849)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:778)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:642)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:357)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2781)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:849)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:778)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[DEBUG 2019-07-10T16:10:27 main]        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:642)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.Liquibase.getDatabaseChangeLog(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.Liquibase.update(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.Liquibase.update(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.integration.commandline.Main.doMigration(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main]        at liquibase.integration.commandline.Main.main(Unknown Source)
[DEBUG 2019-07-10T16:10:27 main] 
[DEBUG 2019-07-10T16:10:27 main] 
[DEBUG 2019-07-10T16:10:27 main] For more information, use the --logLevel flag
[DEBUG 2019-07-10T16:10:27 main] Configuring PostgreSQL with JDBC URL: jdbc:postgresql://localhost/candlepin
[DEBUG 2019-07-10T16:10:27 main] Migrating Candlepin database
[DEBUG 2019-07-10T16:10:27 main] --driver=org.postgresql.Driver --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changeLogFile=db/changelog/changelog-update.xml --url=jdbc:postgresql://localhost/candlepin --username=candlepin --password=+FILTERED+ --logLevel=severe
[DEBUG 2019-07-10T16:10:27 main] Traceback (most recent call last):
[DEBUG 2019-07-10T16:10:27 main]   File "/usr/share/candlepin/cpdb", line 317, in <module>
[DEBUG 2019-07-10T16:10:27 main]     dbsetup.update()
[DEBUG 2019-07-10T16:10:27 main]   File "/usr/share/candlepin/cpdb", line 75, in update
[DEBUG 2019-07-10T16:10:27 main]     self._run_liquibase("db/changelog/changelog-update.xml")
[DEBUG 2019-07-10T16:10:27 main]   File "/usr/share/candlepin/cpdb", line 106, in _run_liquibase
[DEBUG 2019-07-10T16:10:27 main]     output = run_command("liquibase %s migrate -Dcommunity=%s" % (liquibase_options, self.community))
[DEBUG 2019-07-10T16:10:27 main]   File "/usr/share/candlepin/cpdb", line 38, in run_command
[DEBUG 2019-07-10T16:10:27 main]     error_out(command, status, output)
[DEBUG 2019-07-10T16:10:27 main]   File "/usr/share/candlepin/cpdb", line 46, in error_out
[DEBUG 2019-07-10T16:10:27 main]     raise Exception("Error running command")
[DEBUG 2019-07-10T16:10:27 main] Exception: Error running command
[ERROR 2019-07-10T16:10:27 main] /usr/share/candlepin/cpdb --update --database '//localhost/candlepin' --user 'candlepin' --password 'nB4mQrYJqyWZA4KL2riWjqYiAvZwqbwN' failed! Check the output for error!
[ERROR 2019-07-10T16:10:27 main] Upgrade step migrate_candlepin failed. Check logs for more information.
[DEBUG 2019-07-10T16:10:27 main] Exit with status code: 1 (signal was 1)
[ERROR 2019-07-10T16:10:27 main] Errors encountered during run:
[ERROR 2019-07-10T16:10:27 main] /usr/share/candlepin/cpdb --update --database '//localhost/candlepin' --user 'candlepin' --password 'nB4mQrYJqyWZA4KL2riWjqYiAvZwqbwN' failed! Check the output for error!
[ERROR 2019-07-10T16:10:27 main] Upgrade step migrate_candlepin failed. Check logs for more information.
[DEBUG 2019-07-10T16:10:27 main] Cleaning /tmp/kafo_puppet20190710-4179-15ke20l.conf
[DEBUG 2019-07-10T16:10:27 main] Cleaning /tmp/default_values.yaml
[ INFO 2019-07-10T16:10:27 main] Installer finished in 41.499032316 seconds

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.