Bug 1062253 - JBoss Cartridge needs to have dependency on both JDK 1.6 and JDK 1.7 packages.
Summary: JBoss Cartridge needs to have dependency on both JDK 1.6 and JDK 1.7 packages.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-06 14:18 UTC by Eric Rich
Modified: 2018-12-04 17:21 UTC (History)
6 users (show)

Fixed In Version: openshift-origin-cartridge-jbosseap-2.26.3.1-1.el6op openshift-origin-cartridge-jbossews-1.34.3.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Previously, the java-1.6.0-openjdk package was not listed as a requirement for the JBoss EAP and JBoss EWS cartridges. This caused the 'java6' marker to not work appropriately if java-1.6.0-openjdk was not already installed on the system by other packages. This bug fix adds java-1.6.0-openjdk as a requirement to these cartridges to correct this issue.
Clone Of:
Environment:
Last Closed: 2015-09-30 16:35:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 111663 0 None None None Never
Red Hat Knowledge Base (Solution) 715243 0 None None None Never
Red Hat Product Errata RHSA-2015:1844 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.7 security, bug fix and enhancement update 2015-09-30 20:35:28 UTC

Description Eric Rich 2014-02-06 14:18:25 UTC
Description of problem:

With out the proper version of Java installed on the node JBoss gears will report the following:

Failed to execute: 'control start' for /var/lib/openshift/GEAR_UUID/jbosseap
CLIENT_MESSAGE: Starting jbosseap cart
CLIENT_MESSAGE: Timed out waiting for http listening port

Looking at the jbosseap.log in the gear. It was calling a java that was not installed.

  JBOSS_HOME: /var/lib/openshift/GAR_UUID/jbosseap

  JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java

  JAVA_OPTS:  -server -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=GEAR_UUID -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv
4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=appname-namespace.openshift.domain -Djgroups.bind_addr=127.1.xxx.xxx -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on

=========================================================================

/var/lib/openshift/GEAR_UUID/jbosseap//bin/standalone.sh: line 177: /etc/alternatives/java_sdk_1.6.0/bin/java: No such file or directory

NOTE: This means it requires java-1.6.0-openjdk-devel see article 111663

Looking a the mailing list it seems that others have run into this before. 

https://lists.openshift.redhat.com/openshift-archives/dev/2013-February/msg00004.html

While it is a simple thing to fix I think the cartridge should require both (it currently does not).

# rpm -qR openshift-origin-cartridge-jbosseap-2.3.10-1.1.el6op.noarch | grep java
java-1.7.0-openjdk  
java-1.7.0-openjdk-devel

Another important thing to note is that our User Documentation points out that you can use both version of java (based on the dependencies this is not correct).

Example: 

https://access.redhat.com/site/documentation/en-US/OpenShift_Enterprise/2/html-single/User_Guide/index.html#Deploying_on_Java_6_or_Java_7 

Version-Release number of selected component (if applicable):
1.2 and 2.0

Additional info:

https://github.com/openshift/enterprise-server/blob/0791ee4e4c7e7cda9a19de95b31e8a6a7bcaea51/cartridges/openshift-origin-cartridge-jbosseap/bin/util#L6-L11

https://github.com/openshift/enterprise-server/blob/0791ee4e4c7e7cda9a19de95b31e8a6a7bcaea51/cartridges/openshift-origin-cartridge-jbosseap/env/OPENSHIFT_JBOSSEAP_JDK6

https://github.com/openshift/enterprise-server/blob/0791ee4e4c7e7cda9a19de95b31e8a6a7bcaea51/cartridges/openshift-origin-cartridge-jbosseap/env/OPENSHIFT_JBOSSEAP_JDK7

Comment 1 Brenton Leanhardt 2014-02-06 14:27:43 UTC
I'm hesitant to add dependencies that many customers might not want.  I do see a few possible improvements:

* improve our documentation of the marker
* improve the error output.  We could probably detect if the jvm was available before trying to use it in the cartridge.  If it doesn't exist print clear warning message on how to solve the problem (any possibily consider falling back to jdk7 in the meantime).

Comment 3 Miciah Dashiel Butler Masters 2015-09-25 17:41:17 UTC
We missed this one before, but this issue should be resolved by changes in the JBoss EAP and EWS cartridges we have tagged and built for OpenShift Enterprise 2.2.7.

Comment 8 Johnny Liu 2015-09-28 03:06:58 UTC
Verified this bug with 2.2/2015-09-23.1 puddle, and PASS.

# rpm -qf /etc/alternatives/java_sdk_1.6.0/bin/java
java-1.6.0-openjdk-devel-1.6.0.36-1.13.8.1.el6_7.x86_64

# rpm -qR openshift-origin-cartridge-jbossews-1.34.3.1-1.el6op.noarch|grep java
java-1.6.0-openjdk  
java-1.6.0-openjdk-devel  
java-1.7.0-openjdk  
java-1.7.0-openjdk-devel  

# rpm -qR openshift-origin-cartridge-jbosseap-2.26.3.1-1.el6op.noarch|grep java
java-1.6.0-openjdk  
java-1.6.0-openjdk-devel  
java-1.7.0-openjdk  
java-1.7.0-openjdk-devel  
java-1.8.0-openjdk  
java-1.8.0-openjdk-devel

Comment 10 errata-xmlrpc 2015-09-30 16:35:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1844.html


Note You need to log in before you can comment on or make changes to this bug.