Bug 42951 - In catalina.sh CATALINA_OPTS is used for both start and stop.
In catalina.sh CATALINA_OPTS is used for both start and stop.
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.10
All All
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
http://svn.apache.org/repos/asf/tomca...
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-07-22 10:28 UTC by Andrey Polozov
Modified: 2007-07-22 11:39 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Polozov 2007-07-22 10:28:48 UTC
Looks like an old bug in startup scripts, which has been fixed around 5.5.20,
has been reintroduced (or hasn't been ported) in 6.0.X:
CATALINA_OPTS variable is used for stopping, while it's supposed to be used for
starting only:
------------------
elif [ "$1" = "stop" ] ; then

  shift
  FORCE=0
  if [ "$1" = "-force" ]; then
    shift
    FORCE=1
  fi

  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    org.apache.catalina.startup.Bootstrap "$@" stop
------------------

This makes impossible using JMX agent/jconsole as well as other tools which rely
on socket listening.

I'm not sure if catalina.bat does the same thing...

I guess the latest 5.5.X version of catalina.sh (and probably .bat) shall be
merged into 6.6.X tree...
Comment 1 Rainer Jung 2007-07-22 11:39:18 UTC
Thanks for reporting this.
Fixed in revision r558523 for TC 6.0.15.
Also ported to trunk and 5.0.x.