EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Archiver appliance, only the first container is launched correctly
From: Max Power <[email protected]>
To: "Shankar, Murali" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 24 Nov 2016 18:54:21 +0100
Hi Murali,

I am going to check the logs, but by the moment I pass you the entire script that I use, that is based in one I took from EPICS archiver appliance website:

Take note that some environment variables that ar note defined in this script, are in the .bash_profile

Thanks a lot for your answers

#!/bin/bash

# Sample startup script for the archiver appliance
# Please change the various environment variables to suit your environment.

# We assume that we inherit the EPICS environment variables from something that calls this script
# However, if this is a init.d startup script, this is not going to be the case and we'll need to add them here.
# This includes setting up the LD_LIBRARY_PATH to include the JCA .so file.

#D COMMENTED
###source /opt/local/setEPICSEnv.sh

export EPICS_CA_AUTO_ADDR_LIST=yes
export EPICS_CA_ADDR_LIST=127.0.0.1


export JAVA_HOME=/usr/java/jdk1.8.0_73
export PATH=${JAVA_HOME}/bin:${PATH}
# We use a lot of memory; so be generous with the heap.

###export JAVA_OPTS="-XX:MaxPermSize=128M -XX:+UseG1GC -Xmx2G -Xms1G -ea"
export JAVA_OPTS="-Xmx756M -Xms512M -ea"



# Set up Tomcat home
export TOMCAT_HOME=/home/max/Downloads/apache-tomcat-7.0.72

# Set up the root folder of the individual Tomcat instances.
export ARCHAPPL_DEPLOY_DIR=/home/max/scratch


# Set appliance.xml and the identity of this appliance
export ARCHAPPL_APPLIANCES=/home/max/Downloads/archappl_v0.0.1_SNAPSHOT_20-September-2016T13-50-17/arch_appliances_folder/production_appliances.xml
export ARCHAPPL_MYIDENTITY="appliance0"

# If you have your own policies file, please change this line.
# export ARCHAPPL_POLICIES=/nfs/epics/archiver/production_policies.py

# Set the location of short term and long term stores; this is necessary only if your policy demands it
export ARCHAPPL_SHORT_TERM_FOLDER=/home/max/Downloads/archappl_v0.0.1_SNAPSHOT_20-September-2016T13-50-17/arch/sts/ArchiverStore
export ARCHAPPL_MEDIUM_TERM_FOLDER=/home/max/Downloads/archappl_v0.0.1_SNAPSHOT_20-September-2016T13-50-17/arch/mts/ArchiverStore
export ARCHAPPL_LONG_TERM_FOLDER=/home/max/Downloads/archappl_v0.0.1_SNAPSHOT_20-September-2016T13-50-17/arch/lts/ArchiverStore

if [[ ! -d ${TOMCAT_HOME} ]]
then
    echo "Unable to determine the source of the tomcat distribution"
    exit 1
fi

if [[ ! -f ${ARCHAPPL_APPLIANCES} ]]
then
    echo "Unable to find appliances.xml at ${ARCHAPPL_APPLIANCES}"
    exit 1
fi

# Enable core dumps in case the JVM fails
ulimit -c unlimited




function startTomcatAtLocation() {
    if [ -z "$1" ]; then echo "startTomcatAtLocation called without any arguments"; exit 1; fi
    export CATALINA_HOME=$TOMCAT_HOME
    export CATALINA_BASE=$1
    echo "Starting tomcat at location ${CATALINA_BASE}"
   
    ARCH=`uname -m`
    if [[ $ARCH == 'x86_64' || $ARCH == 'amd64' ]]
    then
      echo "Using 64 bit versions of libraries"
###      export LD_LIBRARY_PATH=${CATALINA_BASE}/webapps/engine/WEB-INF/lib/native/linux-x86_64:${LD_LIBRARY_PATH}
     export LD_LIBRARY_PATH=${CATALINA_BASE}/webapps/engine/WEB-INF/lib/native/linux-x86_64:/home/max/EPICS/base/lib/linux-x86_64:${LD_LIBRARY_PATH}
    else
      echo "Using 32 bit versions of libraries"
      export LD_LIBRARY_PATH=${CATALINA_BASE}/webapps/engine/WEB-INF/lib/native/linux-x86:${LD_LIBRARY_PATH}
    fi
   
    pushd ${CATALINA_BASE}/logs
    ${CATALINA_HOME}/bin/jsvc \
        -server \
        -cp ${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar:/home/max/scratch/mgmt/webapps/WEB-INF/lib/log4j-1.2.17.jar \
        ${JAVA_OPTS} \
        -Dcatalina.base=${CATALINA_BASE} \
        -Dcatalina.home=${CATALINA_HOME} \
        -cwd ${CATALINA_BASE}/logs \
        -outfile ${CATALINA_BASE}/logs/catalina.out \
        -errfile ${CATALINA_BASE}/logs/catalina.err \
        -pidfile ${CATALINA_BASE}/pid \
        org.apache.catalina.startup.Bootstrap run
     popd
}

function stopTomcatAtLocation() {
    if [ -z "$1" ]; then echo "stopTomcatAtLocation called without any arguments"; exit 1; fi
    export CATALINA_HOME=$TOMCAT_HOME
    export CATALINA_BASE=$1
    echo "Stopping tomcat at location ${CATALINA_BASE}"
    pushd ${CATALINA_BASE}/logs
    ${CATALINA_HOME}/bin/jsvc \
        -server \
        -cp ${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
        ${JAVA_OPTS} \
        -Dcatalina.base=${CATALINA_BASE} \
        -Dcatalina.home=${CATALINA_HOME} \
        -cwd ${CATALINA_BASE}/logs \
        -outfile ${CATALINA_BASE}/logs/catalina.out \
        -errfile ${CATALINA_BASE}/logs/catalina.err \
        -pidfile ${CATALINA_BASE}/pid \
        -stop \
        org.apache.catalina.startup.Bootstrap
     popd
}

function stop() {
    stopTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/engine
    stopTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/retrieval
    stopTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/etl
    stopTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/mgmt
}

function start() {
    startTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/mgmt
    sleep 20s
    startTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/engine
    sleep 20s
    startTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/etl
    sleep 20s
    startTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/retrieval
}


# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart}"
    exit 2
esac



2016-11-24 18:34 GMT+01:00 Shankar, Murali <[email protected]>:

I am reasonably sure that you have some exception in the log that aborted the startup process. 


Could you please check for exceptions in all your log files? I typically use something like so...


find /arch/tomcats -wholename '*/logs/*' -exec grep -l xception {} \;
find /arch/tomcats -wholename '*/logs/*' -exec grep -l FATAL {} \;


Regards,

Murali





From: Shankar, Murali
Sent: Thursday, November 24, 2016 7:50 AM
To: [email protected]; [email protected]
Subject: Re: EPICS Archiver appliance, only the first container is launched correctly
 

>> 

but the following containers does
not execute because all of them report in the log file the same error:


I created a sample install based on the portions of the script you enclosed and I could start up the server correctly. ​ I assume that you are setting up the appliance identity and the xml file somewhere else in the script. Something that looks like so.


export ARCHAPPL_MYIDENTITY=appliance0
export ARCHAPPL_APPLIANCES=/scratch/Work/temp/aadeploytest/appliances.xml
export ARCHAPPL_DEPLOY_DIR=/scratch/LargeDisk/tomcats


Can you send me (perhaps offline) all your logs for all your components? I will respond to this thread...



Regards,

Murali




References:
Re: EPICS Archiver appliance, only the first container is launched correctly Shankar, Murali
Re: EPICS Archiver appliance, only the first container is launched correctly Shankar, Murali

Navigate by Date:
Prev: Re: EPICS Archiver appliance, only the first container is launched correctly Shankar, Murali
Next: Issue with PvaClientRPC matthew.taylor
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Archiver appliance, only the first container is launched correctly Shankar, Murali
Next: Issue with PvaClientRPC matthew.taylor
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 25 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·