diff --git a/edexOsgi/build.edex/esb/bin/start.sh b/edexOsgi/build.edex/esb/bin/start.sh index 16f22224e0..63ace4ef0b 100644 --- a/edexOsgi/build.edex/esb/bin/start.sh +++ b/edexOsgi/build.edex/esb/bin/start.sh @@ -45,6 +45,13 @@ if [ -z "${SKIP_RPM_CHECK}" ]; then echo "Unable To Continue ... Terminating." exit 1 fi + + rpm -q awips2-yajsw > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "ERROR: awips2-yajsw Must Be Installed." + echo "Unable To Continue ... Terminating." + exit 1 + fi fi path_to_script=`readlink -f $0` @@ -58,6 +65,7 @@ awips_home=$(dirname $EDEX_HOME) if [ -z "$PYTHON_INSTALL" ]; then PYTHON_INSTALL="$awips_home/python"; fi if [ -z "$JAVA_INSTALL" ]; then JAVA_INSTALL="$awips_home/java"; fi if [ -z "$PSQL_INSTALL" ]; then PSQL_INSTALL="$awips_home/psql"; fi +if [ -z "$YAJSW_HOME" ]; then YAJSW_HOME="$awips_home/yajsw"; fi # Source The File With The Localization Information source ${dir}/setup.env @@ -150,4 +158,4 @@ if [ $DEBUG_FLAG == "on" ]; then echo "To Debug ... Connect to Port: ${EDEX_DEBUG_PORT}." fi -java -Xmx32m -XX:MaxPermSize=12m -XX:ReservedCodeCacheSize=4m -jar ${EDEX_HOME}/bin/yajsw/wrapper.jar -c ${EDEX_HOME}/conf/${CONF_FILE} ${WRAPPER_ARGS} +java -Xmx32m -XX:MaxPermSize=12m -XX:ReservedCodeCacheSize=4m -jar ${YAJSW_HOME}/wrapper.jar -c ${EDEX_HOME}/conf/${CONF_FILE} ${WRAPPER_ARGS} diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-cli-2-SNAPSHOT.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-cli-2-SNAPSHOT.jar deleted file mode 100644 index 7819797827..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-cli-2-SNAPSHOT.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-collections-3.2.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-collections-3.2.jar deleted file mode 100644 index 75580be255..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-collections-3.2.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-configuration-1.8.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-configuration-1.8.jar deleted file mode 100644 index ae9ae9969b..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-configuration-1.8.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-io-1.3.1.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-io-1.3.1.jar deleted file mode 100644 index 7affdefcd2..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-io-1.3.1.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-lang-2.4.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-lang-2.4.jar deleted file mode 100644 index 532939ecab..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-lang-2.4.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-logging-1.1.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-logging-1.1.jar deleted file mode 100644 index 2ff9bbd90d..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-logging-1.1.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-vfs2-2.0.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-vfs2-2.0.jar deleted file mode 100644 index 5e1b0b4d2f..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/commons/commons-vfs2-2.0.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/groovy/groovy-all-1.8.6.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/groovy/groovy-all-1.8.6.jar deleted file mode 100644 index 03c02efae3..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/groovy/groovy-all-1.8.6.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/jna-3.4.1.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/jna-3.4.1.jar deleted file mode 100644 index 8e6d0c32a3..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/jna-3.4.1.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/platform-3.4.1.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/platform-3.4.1.jar deleted file mode 100644 index 8357d2e214..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/jna/platform-3.4.1.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/netty/netty-3.5.1.Final.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/netty/netty-3.5.1.Final.jar deleted file mode 100644 index 2c6f4b05b7..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/netty/netty-3.5.1.Final.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/regex/jrexx-1.1.1.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/regex/jrexx-1.1.1.jar deleted file mode 100644 index 5968c9a0a1..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/regex/jrexx-1.1.1.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/yajsw/ahessian.jar b/edexOsgi/build.edex/esb/bin/yajsw/lib/core/yajsw/ahessian.jar deleted file mode 100644 index 6a86db57b0..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/lib/core/yajsw/ahessian.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/scripts/wrapperCapture.sh b/edexOsgi/build.edex/esb/bin/yajsw/scripts/wrapperCapture.sh deleted file mode 100644 index 7bf295aebc..0000000000 --- a/edexOsgi/build.edex/esb/bin/yajsw/scripts/wrapperCapture.sh +++ /dev/null @@ -1,180 +0,0 @@ -#!/bin/sh -##################################################################### -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -##################################################################### -##################################################################### -# Script for capturing data from a wrapper java process when the -# wrapper restarts the process -# -# SOFTWARE HISTORY -# -# Date Ticket# Engineer Description -# ------------- -------- ----------- -------------------------- -# Aug 07, 2014 3470 rjpeter Initial creation -# -##################################################################### -# NOTE: Script must be located at /awips2/qpid/bin/yajsw/scripts for it to work - -# base path to save capture data to, will create subdirectory for each server -basePath="/data/fxa/cave" - -state=$1 -string_state=$2 -pid=$4 - -path_to_script=`readlink -f $0` -curTime=`date +%Y%m%d_%H%M%S` -echo "$curTime: Wrapper running $path_to_script due to state transition for pid $pid. New State $state|$string_state" - -# ensure directory is created and has write permissions -checkDir() { - dir="$1" - if [ ! -d "$dir" ]; then - mkdir -p $dir - if [ ! -d "$dir" ]; then - message="Unable to create qpid capture data directory\n$dir" - echo -e "Capture failed: $message" - exit 1 - fi - fi - - if [ ! -w "$dir" ]; then - message="Do not have write permissions to qpid capture data directory\n$dir" - echo -e "Capture failed: $message" - exit 1 - fi -} - -# gets top output of local server -runTop() { - local curTime=`date "+%Y%m%d_%H:%M:%S"` - echo "$curTime: Capturing top" - echo "$curTime: Capturing top" >> $processFile - local out_file="${dataPath}/top.log" - export COLUMNS=160 - top -b -c -n1 >> $out_file 2>&1 - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: top captured" -} - -# runs jstack 10 times, if it fails will run again with -F -runJstack() { - local curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: Capturing jstacks" - local pid="$1" - local count=1 - local cmd="/awips2/java/bin/jstack" - local prePath="${dataPath}/pid_${pid}_" - local log="" - - while [ "$count" -le "10" ]; do - curTime=`date "+%Y%m%d_%H:%M:%S"` - log="${prePath}jstack_${count}.log" - - echo "${curTime}: Running command: ${cmd} ${pid} >> ${log} 2>&1" >> $processFile - echo "Running for $curTime" >> $log - ${cmd} ${pid} >> ${log} 2>&1 - - if [[ "$?" != "0" && $FORCE != "y" ]]; then - curTime=`date "+%Y%m%d_%H:%M:%S"` - echo "${curTime}: jstack for $pid failed to connect, rerunning with -F" >> $processFile - ${cmd} -F ${pid} >> ${log} 2>&1 - fi - let "count+=1" - done - - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: jstacks captured" -} - -# runs jmap -heap -runJmapHeap() { - local curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: Capturing jmap -heap" - local pid=$1 - local prePath="${dataPath}/pid_${pid}_" - - local log="${prePath}jmapHeap.log" - local cmd="/awips2/java/bin/jmap -heap" - echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile - $cmd $pid >> $log 2>&1 - - if [[ "$?" != "0" && $FORCE != "y" ]]; then - curTime=`date "+%Y%m%d_%H:%M:%S"` - echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile - $cmd -F $pid >> $log 2>&1 - fi - - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: jmap -heap captured" -} - -# runs jmap, if it fails will run again with -F -runJmap() { - local curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: Capturing jmap -dump" - local pid=$1 - local prePath="${dataPath}/pid_${pid}_jmap" - - local log="${prePath}.log" - local dumpPath="${prePath}.hprof" - local cmd="/awips2/java/bin/jmap -dump:format=b,file=${dumpPath}" - echo "${curTime}: Running command: $cmd $pid >> $log 2>&1" >> $processFile - $cmd $pid >> $log 2>&1 - - if [[ "$?" != "0" && $FORCE != "y" ]]; then - curTime=`date "+%Y%m%d_%H:%M:%S"` - echo "${curTime}: jmap for $pid failed to connect, rerunning with -F" >> $processFile - $cmd -F $pid >> $log 2>&1 - fi - - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: jmap -dump captured" -} - - - -if [[ "$pid" != "-1" ]]; then - process=`ps -ef | grep $pid | grep java` - - if [[ "$process" != "" ]]; then - hostName=`hostname -s` - dataPath="${basePath}/${hostName}/wrapperCaptureData_${curTime}_pid_$pid" - checkDir $dataPath - processFile=${dataPath}/capture_info.log - echo "Wrapper running $0 due to state transition for pid $pid. New State $state|$string_state" >> $processFile - echo "Process information:" >> $processFile - ps -ef | grep $pid >> $processFile - runTop & - runJstack $pid & - runJmapHeap $pid & - # TODO: Double check if jvm already dumped one - runJmap $pid & - wait - - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: Data captured to $dataPath" - else - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: PID $pid is no longer running, nothing to capture" - fi -else - curTime=`date +%Y%m%d_%H%M%S` - echo "$curTime: PID was -1, process no longer running, nothing to capture" -fi diff --git a/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar b/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar deleted file mode 100644 index 1c51679218..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/wrapper.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar b/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar deleted file mode 100644 index bd97cf4919..0000000000 Binary files a/edexOsgi/build.edex/esb/bin/yajsw/wrapperApp.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/conf/wrapper.conf b/edexOsgi/build.edex/esb/conf/wrapper.conf index 8efa5bc15e..6c8414a1dc 100644 --- a/edexOsgi/build.edex/esb/conf/wrapper.conf +++ b/edexOsgi/build.edex/esb/conf/wrapper.conf @@ -42,13 +42,11 @@ wrapper.pidfile=${EDEX_HOME}/bin/${EDEX_RUN_MODE}.pid # use system java instead of awips2 java wrapper.app.env.use.system.java=${WRAPPER_USE_SYSTEM_JAVA} -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=${EDEX_HOME}/bin/yajsw/wrapper.jar -wrapper.java.classpath.2=${EDEX_HOME}/conf/ -wrapper.java.classpath.3=${EDEX_HOME}/conf/cache/ -wrapper.java.classpath.4=${EDEX_HOME}/conf/spring/ -wrapper.java.classpath.5=${EDEX_HOME}/conf/resources/ +# Java Classpath. Add class path elements as needed starting from 1. +wrapper.java.classpath.1=${EDEX_HOME}/conf/ +wrapper.java.classpath.2=${EDEX_HOME}/conf/cache/ +wrapper.java.classpath.3=${EDEX_HOME}/conf/spring/ +wrapper.java.classpath.4=${EDEX_HOME}/conf/resources/ # include ANY jar files that are found in the locations denoted by # wrapper.search.java.classpath.# diff --git a/rpms/awips2.edex/Installer.edex/component.spec b/rpms/awips2.edex/Installer.edex/component.spec index a60fc03fa9..f11d96d8db 100644 --- a/rpms/awips2.edex/Installer.edex/component.spec +++ b/rpms/awips2.edex/Installer.edex/component.spec @@ -19,6 +19,7 @@ provides: awips2-base requires: awips2-python requires: awips2-java requires: awips2-psql +requires: awips2-yajsw %description AWIPS II Edex Installation - Installs and configures AWIPS II Edex.