Tomcat 5.x with yjp not working
-
- Posts: 5
- Joined: Sun Jan 16, 2005 6:15 pm
Tomcat 5.x with yjp not working
Hello,
I've used EAP 4.0 build 502 and it worked great for me. Now i've downloaded build 508 and when i try to set up my Tomcat startup.sh with yjp support it does not work anymore. Startup script works by itself though, but with yjp it does not. Any ideas why this is happening?
Configuration: Tomcat 5.0.19, Java 1.4.2_05, YJP EAP 4.0 build 508
Thanks,
Anton
I've used EAP 4.0 build 502 and it worked great for me. Now i've downloaded build 508 and when i try to set up my Tomcat startup.sh with yjp support it does not work anymore. Startup script works by itself though, but with yjp it does not. Any ideas why this is happening?
Configuration: Tomcat 5.0.19, Java 1.4.2_05, YJP EAP 4.0 build 508
Thanks,
Anton
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm
Please send us your startup script at [email protected]
-
- Posts: 5
- Joined: Sun Jan 16, 2005 6:15 pm
Ok, this is the script with yjp:
and this is without yjp support:
For whatever reason, whithout yjp the tomcat sturts up fine and has no problems running, but with yjp support it does not start, even though it does not show any error massages... I've used build 502 before that and it was working fine for me, did not have any problems of this kind. Just to let you know, I did delete the old script for 502, so i'm not using the old one... It is weird because it does show the Java options needed for yjp on startup, but tomcat does not start up itself though... i'll try manually adding those in catalina.sh, should be working that way at least, i'll let you know how it goes.
Thanks for responce everybody,
Anton
Code: Select all
# Generated with YourKit Java Profiler 4.0 EAP build 508
export LD_LIBRARY_PATH=/root/work/yjp-4.0-eap-build508/bin/linux:$LD_LIBRARY_PATH
export JAVA_TOOL_OPTIONS=-agentlib:yjpagent=port=10100,sessionname=Tomcat $JAVA_TOOL_OPTIONS
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.1 2004/05/13 16:06:05 ajcachia Exp $
# -----------------------------------------------------------------------------
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi
JAVA_OPTS=-Xrunyjpagent:port=10100,sessionname=Tomcat $JAVA_OPTS
export JAVA_OPTS
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Code: Select all
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.1 2004/05/13 16:06:05 ajcachia Exp $
# -----------------------------------------------------------------------------
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Thanks for responce everybody,
Anton
-
- Posts: 5
- Joined: Sun Jan 16, 2005 6:15 pm
I've tryed editing startup_with_yjp.sh to:
with not much success, Tomcat still does not start... I've also tried adding those options to catalina.sh itself like this:
In this case Tomcat starts up, but YourKit does not find any apps that can be profiled... I'll send complete catalina.sh, startup.sh and startup_with_yjp.sh to above mentioned email for support for you to look at it... Again, there was no problem of this sort with build 502...
Thank you for helping,
Anton
Code: Select all
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.1 2004/05/13 16:06:05 ajcachia Exp $
# -----------------------------------------------------------------------------
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi
# Generated with YourKit Java Profiler 4.0 EAP build 508
LD_LIBRARY_PATH=/root/work/yjp-4.0-eap-build508/bin/linux:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
JAVA_TOOL_OPTIONS=-agentlib:yjpagent=port=10100,sessionname=Tomcat $JAVA_TOOL_OPTIONS
export JAVA_TOOL_OPTIONS
JAVA_OPTS=-Xrunyjpagent:port=10100,sessionname=Tomcat $JAVA_OPTS
export JAVA_OPTS
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Code: Select all
#!/bin/sh
# -----------------------------------------------------------------------------
# Start/Stop Script for the CATALINA Server
#
# Environment Variable Prequisites
#
# CATALINA_HOME May point at your Catalina "build" directory.
#
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
# of a Catalina installation. If not present, resolves to
# the same directory that CATALINA_HOME points to.
#
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
# the JVM should use (java.io.tmpdir). Defaults to
# $CATALINA_BASE/temp.
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
# JAVA_OPTS (Optional) Java runtime options used when the "start",
# "stop", or "run" command is executed.
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
# command is executed. The default is 8000.
#
# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
# (JSSE) installation, whose JAR files will be added to the
# system class path used to start Tomcat.
#
# CATALINA_PID (Optional) Path of the file which should contains the pid
# of catalina startup java process, when start (fork) is used
#
# $Id: catalina.sh,v 1.1 2004/05/13 16:06:05 ajcachia Exp $
# -----------------------------------------------------------------------------
# Set JAVA_OPTS to give max heap of 256Mb and no GC on classes.
export JAVA_OPTS=$JAVA_OPTS" -Xmx256M -Xnoclassgc"
# -----------------------------------------------------------------------------
# Generated with YourKit Java Profiler 4.0 EAP build 508
LD_LIBRARY_PATH=/root/work/yjp-4.0-eap-build508/bin/linux:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
JAVA_TOOL_OPTIONS=-agentlib:yjpagent=port=10100,sessionname=Tomcat $JAVA_TOOL_OPTIONS
export JAVA_TOOL_OPTIONS
JAVA_OPTS=-Xrunyjpagent:port=10100,sessionname=Tomcat $JAVA_OPTS
export JAVA_OPTS
# -----------------------------------------------------------------------------
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
esac
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
. "$CATALINA_HOME"/bin/setenv.sh
fi
...
...
...
Thank you for helping,
Anton
-
- Posts: 5
- Joined: Sun Jan 16, 2005 6:15 pm
-
- Posts: 5
- Joined: Sun Jan 16, 2005 6:15 pm
-
- Posts: 64
- Joined: Wed Oct 06, 2004 7:56 am
Hi Anton, sorry not to reply to any of your subsequent posts (not sure where you are located but they were like midnight my time and I was tucked up in bed, lol), I would have tried today however from what you are saying the solution was I don't think I would have been much help anyway since I wouldn't have even though of that!!
Well done for solving it, like you I'm not sure what it all has to do with FC2 though.
Well done for solving it, like you I'm not sure what it all has to do with FC2 though.
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm