perfsonar-user - Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation
Subject: perfSONAR User Q&A and Other Discussion
List archive
- From: Roman Lapacz <>
- To:
- Cc: Loukik Kudarimoti <>,
- Subject: Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation
- Date: Thu, 05 Apr 2007 16:56:33 +0200
Sorry for this but could you send me /var/lib/tomcat5/conf/server.xml
Would it be possible to run the installation procedure again, download Tomcat by the install procedure script and restart this Tomcat just for test purpose?
Roman
Frederic LOUI wrote:
Roman,
1) Please find hereattached this mail the /etc/init.d/tomcat5 script
2) you mean statically in /etc/profile ? If so, NO.
But tomcat5 installation has been performed using Ubuntu repository and CATALINA_BASE default to /var/lib/tomcat5
Thanks again in advance for your support
Bgrds/Fred
Roman Lapacz a écrit :
Hi again
1) could you show us your /etc/init.d/tomcat5 script
2) do you have CATALINA_BASE env variable set up statically in your system?
Roman
------------------------------------------------------------------------
#! /bin/sh -e
#
# /etc/init.d/tomcat5 -- startup script for the Tomcat 5 servlet engine
#
# Written by Miquel van Smoorenburg
<>.
# Modified for Debian GNU/Linux by Ian Murdock
<>.
# Modified for Tomcat by Stefan Gybas
<>.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=tomcat5
DESC="Tomcat 5 servlet engine"
CATALINA_HOME=/usr/share/$NAME
DAEMON=$CATALINA_HOME/bin/catalina.sh
DEFAULT=/etc/default/$NAME
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/home/perfsonar/perfsonar-bundle-2.0-RC1/perfSONAR-RRD-MA-2.0/perfsonar/contrib/rrdjtool/build
# The following variables can be overwritten in $DEFAULT
# Run Tomcat 5 as this user ID
TOMCAT5_USER=tomcat5
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/j2sdk1.4-sun /usr/lib/j2sdk1.4-blackdown /usr/lib/j2se/1.4
/usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.3-sun /usr/lib/j2sdk1.3-blackdown
/usr/lib/jvm/java-gcj /usr/lib/kaffe"
# Directory for per-instance configuration files and webapps
CATALINA_BASE=/var/lib/tomcat5
# Use the Java security manager? (yes/no)
TOMCAT5_SECURITY=yes
# Timeout in seconds for the shutdown of all webapps
TOMCAT5_SHUTDOWN=30
# End of variables that can be overwritten in $DEFAULT
# overwrite settings from default file
if [ -f "$DEFAULT" ]; then
. "$DEFAULT"
fi
test -f $DAEMON || exit 0
if [ `id -u` -ne 0 ]; then
echo "Not starting/stopping $DESC, you are not root."
exit 4
fi
if [ -z "$TOMCAT5_USER" ]; then
echo "Not starting/stopping $DESC as configured (TOMCAT5_USER is"
echo "empty in $DEFAULT)."
exit 0
fi
# Look for the right JVM to use
for jdir in $JDK_DIRS; do
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
JAVA_HOME_TMP="$jdir"
# checks for a real JDK like environment, needed to check if # really the java-gcj-compat-dev package is installed
if [ -r "$jdir/bin/jdb" ]; then
JAVA_HOME="$JAVA_HOME_TMP"
fi
fi
done
export JAVA_HOME
# Set java.awt.headless=true if CATALINA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
# so the maximum heap size is set to 128M
if [ -z "$CATALINA_OPTS" ]; then
CATALINA_OPTS="-Djava.awt.headless=true -Xmx128M"
fi
# Set the JSP compiler if set in the tomcat5.default file
if [ -n "$JSP_COMPILER" ]; then
CATALINA_OPTS="$CATALINA_OPTS -Dbuild.compiler=$JSP_COMPILER"
fi
# Define other required variables
CATALINA_PID="$CATALINA_BASE/temp/$NAME.pid"
STARTUP_OPTS=""
if [ "$TOMCAT5_SECURITY" = "yes" ]; then
STARTUP_OPTS="-security"
fi
# Look for Java Secure Sockets Extension (JSSE) JARs
if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then
JSSE_HOME="${JAVA_HOME}/jre/"
fi
export CATALINA_HOME CATALINA_BASE CATALINA_OPTS CATALINA_PID JSSE_HOME
case "$1" in
start)
if [ -z "$JAVA_HOME" ]; then
echo "Could not start $DESC because no Java Development Kit"
echo "(JDK) was found. Please download and install JDK 1.3 or
higher and set"
echo "JAVA_HOME in $DEFAULT to the JDK's installation
directory."
exit 0
fi
if [ ! -d "$CATALINA_BASE/conf" ]; then
echo "Not starting Tomcat 5: Invalid CATALINA_BASE specified in
$DEFAULT"
exit 1
fi
echo -n "Starting $DESC using Java from $JAVA_HOME: "
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
--user $TOMCAT5_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
# Create catalina.policy (for the security manager)
rm -f "$CATALINA_BASE/conf/catalina.policy"
umask 022
echo "// AUTO-GENERATED FILE -- DO NOT EDIT!" \
> "$CATALINA_BASE/conf/catalina.policy"
echo "// Edit the files in /etc/tomcat5/policy.d/ instead" \
>> "$CATALINA_BASE/conf/catalina.policy"
echo "" >> "$CATALINA_BASE/conf/catalina.policy"
cat /etc/tomcat5/policy.d/*.policy \
>> "$CATALINA_BASE/conf/catalina.policy"
# Clean up and set permissions on required files
rm -rf "$CATALINA_BASE"/temp/* \
"$CATALINA_BASE/logs/catalina.out"
mkfifo -m700 "$CATALINA_BASE/logs/catalina.out"
chown --dereference "$TOMCAT5_USER" "$CATALINA_BASE/conf" \
"$CATALINA_BASE/conf/tomcat-users.xml" \
"$CATALINA_BASE/logs" "$CATALINA_BASE/temp" \
"$CATALINA_BASE/webapps" "$CATALINA_BASE/work" \
"$CATALINA_BASE/logs/catalina.out" || true
# Look for rotatelogs/rotatelogs2
if [ -x /usr/sbin/rotatelogs ]; then
ROTATELOGS=/usr/sbin/rotatelogs
else
ROTATELOGS=/usr/sbin/rotatelogs2
fi
# -p preserves the environment (for $JAVA_HOME etc.)
# -s is required because tomcat5's login shell is /bin/false
su -p -s /bin/sh $TOMCAT5_USER \
-c "$ROTATELOGS
\"$CATALINA_BASE/logs/catalina_%F.log\" 86400" \
< "$CATALINA_BASE/logs/catalina.out" &
su -p -s /bin/sh $TOMCAT5_USER \
-c "\"$DAEMON\" start $STARTUP_OPTS" \
>> "$CATALINA_BASE/logs/catalina.out" 2>&1
echo "$NAME."
else
echo "(already running)."
fi
;;
stop)
echo -n "Stopping $DESC: "
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
--user "$TOMCAT5_USER" --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
echo "(not running)."
else
su -p -s /bin/sh $TOMCAT5_USER -c "\"$DAEMON\" stop" \
>/dev/null 2>&1 || true
# Fallback to kill the JVM process in case stopping didn't
work
sleep 1
while ! start-stop-daemon --test --start \
--pidfile "$CATALINA_PID" --user "$TOMCAT5_USER" \
--startas "$JAVA_HOME/bin/java" >/dev/null; do
sleep 1
echo -n "."
TOMCAT5_SHUTDOWN=`expr $TOMCAT5_SHUTDOWN - 1` || true
if [ $TOMCAT5_SHUTDOWN -le 0 ]; then
echo -n " (killing) "
start-stop-daemon --stop --signal 9 --oknodo \
--quiet --pidfile "$CATALINA_PID" \
--user "$TOMCAT5_USER"
fi
done
rm -f "$CATALINA_PID" "$CATALINA_BASE/logs/catalina.out"
echo "$NAME."
fi
;;
status)
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
--user $TOMCAT5_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
if [ -f "$CATALINA_PID" ]; then
echo "$DESC is not running, but pid file exists."
exit 1
else
echo "$DESC is not running."
exit 3
fi
else
echo -n "$DESC is running with Java pid "
cat "$CATALINA_PID"
exit 0
fi
;;
reload)
echo "Reload is not implemented!" >&2
exit 3
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: /etc/init.d/tomcat5 {start|stop|restart|force-reload|status}"
>&2
exit 2
;;
esac
exit 0
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, (continued)
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Jerome Durand, 04/09/2007
- Message not available
- Message not available
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/16/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/16/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Nina Jeliazkova, 04/17/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/17/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Valentin Rosic, 04/10/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/10/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/05/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Roman Lapacz, 04/05/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/05/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Roman Lapacz, 04/05/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Frederic LOUI, 04/05/2007
- Re: [perfsonar-user] PerfSONAR 2.0 RRD-MA installation, Roman Lapacz, 04/05/2007
Archive powered by MHonArc 2.6.16.