View Source


h1. Problem

Groundwork currently provides the latest version of Oracle JDK7 (1.7.0u76). While functional, this version may be too old to meet the requirements for certain organizations. Groundwork is unable to update to Oracle JDK8 at this time due to incompatibilities with JBOSS Portal Platform. The OpenJDK-7 has been shown (under certain conditions) to work well with Groundwork and may help these organizations meet their requirements. At this time, Groundwork is unable to provide OpenJDK as an installation option due to various platform-specific dependency conflicts, although this is still under investigation.

h1. Support Considerations

Groundwork is committed to ensuring that customers are able to meet their organizational requirements and we will strive to ensure that OpenJDK will work well for you. With that said, this approach has not been widely tested and is considered a feature that should only be pursued if there are no other good alternatives. At this time, we have conducted basic testing in the following environments and not observed any unexpected behavior:

|| GW Version || Linux Version || Java Version || Status ||
| 7.1.0 | Ubuntu 14.04 | OpenJDK 1.7.0_121\\ | Pass |
| 7.1.1 | Ubuntu 14.04 | OpenJDK 1.7.0_121\\ | Pass |
| 7.1.0\\ | Ubuntu 12.04\\ | OpenJDK 1.7.0_121\\ | Pass |
| 7.1.1\\ | Ubuntu 12.04\\ | OpenJDK 1.7.0_121\\ | Pass |
| 7.1.0 | Centos 6.7 | OpenJDK 1.7.0_121 | Pass |
| 7.1.1 | Centos 6.7 | OpenJDK 1.7.0_121 | Pass |
| 7.1.0\\ | SuSE 11sp4 | OpenJDK 1.7.0_121\\ | Pass |
| 7.1.1\\ | SuSE 11sp4\\ | OpenJDK 1.7.0_121\\ | Pass\\ |
| 7.1.0 | SLES12-SP2 | OpenJDK 1.7.0_121 | Pass |
| 7.1.1 | SLES12-SP2 | OpenJDK 1.7.0_121 | Pass |
| 7.1.0 | RHEL 6.3 | OpenJDK 1.7.0_121 | Pass |
| 7.1.1 | RHEL 6.3 | OpenJDK 1.7.0_121\\ | Pass\\ |
| 7.1.0 | RHEL 7 | OpenJDK 1.7.0_121\\ | Pass\\ |
| 7.1.1 | RHEL 7 | OpenJDK 1.7.0_121\\ | Pass\\ |


In depth testing of various features with complex configuration scenarios are in progress but have yet to result in any failures or other system issues. 

h1. Solution

TB 7.1.1-2 provides the changes necessary to a Groundwork 7.1.0 or 7.1.1 installation to use a separately installed JDK7 such as OpenJDK 1.7.0_121.

h2. Installing

# Install desired JDK7 (e.g., OpenJDK 1.7.0_121)
# Download and run the install script:
{attachments:patterns=TB7.1.1-2_install}

h3. Note for SSL:

For systems with SSL enabled following the procedures in the [SSL Doc|https://kb.groundworkopensource.com/display/DOC71/How+to+enable+SSL+support], the following change is necessary for this Technical Bulletin:

Step 15 calls for the following command:

{code}
keytool -import -file /usr/local/groundwork/apache2/conf/server.crt -alias myserver.mydomain.com -keystore /usr/local/groundwork/java/jre/lib/security/cacerts
{code}
The "*/usr/local/groundwork/java*" portion of the last argument must be changed to the location of the version of Java selected as a part of the Technical Bulletin installation. 

Ex: 

{code}
keytool -import -file /usr/local/groundwork/apache2/conf/server.crt -alias myserver.mydomain.com -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts
{code}
where, "*/usr/lib/jvm/java-7-openjdk-amd64/*" is the new java path. 

Make this change when enabling SSL as a part of that defined procedure, or execute this updated command on a system with SSL already enabled prior to installation of the Technical Bulletin

h3. Example

more /etc/issue
{noformat}
Welcome to SUSE Linux Enterprise Server 12 SP2 (x86_64) - Kernel \r (\l).
{noformat}
more /usr/local/groundwork/Info.txt
{noformat}
GroundWork Installation Report
==============================
Components Installed:
PostgreSQL ..... 9.4.1
Monitor ..... 7.1.0-br391-gw2842
Product Info
=============
name= enterprise
version= 7.1.0
bitrock_build= br391
gw_build= gw2842
installer_name= groundworkenterprise-7.1.0-br391-gw2842-linux-64-installer.run
installation_date= 02/04/2017 08:07 AM
{noformat}
java \-version
{noformat}
If 'java' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf java
{noformat}
chmod \+x /home/ec2-user/install-jdk7-121.sh
/home/ec2-user/install-jdk7-121.sh
{noformat}
===== Groundwork Patch 7.1.1-2 installer =====
This patch will allow you to have Groundwork use a
custom installed JDK7 instead of the included Oracle JDK7.
Please note that this script will stop/start Groundwork which
will result in a few minutes of downtime.
which: no java in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/mit/bin)
ERROR: java required but not found
{noformat}
zypper install java-1.7.0-openjdk-devel
{noformat}
......
{noformat}
java \-version
{noformat}
java version "1.7.0_121"
OpenJDK Runtime Environment (IcedTea 2.6.8) (suse-36.2-x86_64)
OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode)
{noformat}
/home/ec2-user/install-jdk7-121.sh
{noformat}
PATCH: TB7.1.1-2
USER: root
HOST: rg-xps.dev.local
INSTALL START: Tue Feb 7 11:22:44 EST 2017
==================================================
Determining JDK location...
System default JDK is at /usr/lib/jvm/java-7-openjdk-amd64
Use this? [Y/n] Stopping gwservices...
Stopping GroundWork Services: [  OK  ]
Backing up original JDK...
Setting JAVA_HOME to /usr/lib/jvm/java-7-openjdk-amd64 in /usr/local/groundwork/scripts/setenv.sh....
Starting gwservices...
Cleanup SNAPSHOT Libraries ...Checking for GroundWork Services:
JBoss Portal Platform is not running
Standalone Foundation is not running
JOSSO server is not running
svscan is not running
dumblogs are not running
supervise for JBoss Portal Platform is not running
supervise for Standalone Foundation is not running
Feeders are not running
Notifications are not running
nagios2collage_socket is not running
nagios2collage_eventlog is not running
fping_process is not running
cacti_feeder is not running
perfdata_scanner is not running
gdma_spool_processor is not running
Starting GroundWork Services:
Waiting for portal to be completely up and running:
Portal controller is not available ...
Portal controller is not available ...
Portal is still starting ...
Portal is still starting ...
Portal is still starting ...
Portal is now running.
Waiting for sequential application deployments:
Waiting for icefaces-push-server-1.8.2-P06-EE.war deployment: .1234567
Waiting for foundation-webapp.war deployment: .123456789.1
Waiting for legacy-rest.war deployment: .12345
Connecting to Foundation:
Listener is ready to accept data feeds ...
Listener services are available.
Waiting for sequential application deployments:
Waiting for groundwork-enterprise.ear deployment: .12345678
Waiting for portal-groundwork-base.war deployment: .123456
Waiting for portal-reportviewer.war deployment: .123456
Waiting for birtviewer.war deployment: .123456789
Waiting for cloudhub.war deployment: .12345678
Waiting for monarch.war deployment: .12345
Waiting for nagvis.war deployment: .12345
Waiting for nms-rstools.war deployment: .123456789
Waiting for monarch-export.war deployment: .12345
Waiting for nagios-app.war deployment: .12345
Waiting for nagvis_share.war deployment: .12345
Waiting for nedi.war deployment: .12345
Waiting for nms-cacti.war deployment: .12345
Waiting for performance.war deployment: .12345
Waiting for profiles.war deployment: .12345
Waiting for reports.war deployment: .123456
Waiting for parallel application deployments:
Total portal startup time: 47.931 seconds.
Total listener wait time: 0.004 seconds.
Total war-file deployment time: 120.134 seconds.
Total gwservices start-wait time: 168.069 seconds.
GroundWork Services start [  OK  ]
==================================================
INSTALL COMPLETE: Tue Feb 7 11:25:57 EST 2017
{noformat}

h2. Uninstalling

# Download and run the uninstall script:
{attachments:patterns=TB7.1.1-2_uninstall}

Note that the uninstaller restores the use in GroundWork of the bundled Java 1.7. It does not uninstall the version of Java 1.7 121 or other that you placed into the operating system. Thus once the uninstaller has run you will have the system back to native GroundWork consistency. The log file in the common/var/patches directory contains the record of all installs and uninstalls as you do them.