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  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Bug in sampleStartup.sh of archiverAppliance?
From: Jörn Dreyer <j.dreyer@hzdr.de>
To: tech-talk@aps.anl.gov
Date: Thu, 07 Dec 2017 11:14:15 +0100
Hello,

I have migrated an archiver appliance from one machine/filesystem to another 
machine/filesystem. Everything works fine except I can not retrieve values 
from within CSS. Must be a missconfiguration.
Searching for the reason, I found a bug in the sample startup script.

In the startup function:

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}
    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 \
        ${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 start
     popd
}

Here LD_LIBRARY_PATH gets set to an invalid path, as CATALINA_BASE is set from 
the parameter passed to the function:

which is called like:

startTomcatAtLocation ${ARCHAPPL_DEPLOY_DIR}/mgmt

So in the end the path looks like:

${ARCHAPPL_DEPLOY_DIR}/mgmt/webapps/engine/WEB-INF/lib/native/linux-x86...

But the real PATH here should be 

${ARCHAPPL_DEPLOY_DIR}/mgmt/webapps/mgmt/WEB-INF/lib/native/linux-x86...

The archiver still works without the LD_LIBRARY_PATH set correctly.

Regards,

Jörn




Navigate by Date:
Prev: Re: caget() from C++ Mark Rivers
Next: Macro for ImageJ running in headless mode for the AreaDetector plugin? David Michel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: Recommendations for EPICS Based Data Acquisition System Peter Milne
Next: Re: Bug in sampleStartup.sh of archiverAppliance? Shankar, Murali
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 08 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·