You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/10/06 08:20:14 UTC

[Bug 57059] New: Unable to identify the process name due to JAVA_OPTS appearing later in the order while starting JVM from catalina.sh

https://issues.apache.org/bugzilla/show_bug.cgi?id=57059

            Bug ID: 57059
           Summary: Unable to identify the process name due to JAVA_OPTS
                    appearing later in the order while starting JVM from
                    catalina.sh
           Product: Tomcat 7
           Version: 7.0.54
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: amit_pande@symantec.com

In catalina.sh, to start the JVM, this is what is being done:


eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $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 "$@" start


Basically, while starting the JVM, JAVA_OPTS are passed after the
LOGGING_CONFIG and LOGGING_MANAGER variables. 

In our case, we set JAVA_OPTS one of which is used to identify our process.

But on solaris, 

/usr/bin/ps auxwww is truncating entries in the process table details and hence
we're not able to distinguish our process from other processes.


On Windows, the catalina.bat has 

set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%

where while starting the JVM , JAVA_OPTS is the first parameter passed to it.

Why similar changes haven't been done in catalina.sh where JAVA_OPTS remains
the third option passed ?

If both catalina.sh and catalina.bat be made consistent where JAVA_OPTS is the
first parameter passed while starting JVM, the problem of identifying the
process name on Solaris would go away despite the truncation that happens for
Solaris proc table entries.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57059] Unable to identify the process name due to JAVA_OPTS appearing later in the order while starting JVM from catalina.sh

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57059

--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Amit Pande from comment #0)
> But on solaris, /usr/bin/ps auxwww is truncating entries in the process
> table details and hence we're not able to distinguish our process from
> other processes.

Maybe you just need more "w"s in your command. Head over to the users mailing
list for other possible suggestions for identifying processes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57059] Unable to identify the process name due to JAVA_OPTS appearing later in the order while starting JVM from catalina.sh

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57059

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Using a value inserted in JAVA_OPTS is, as you have discovered, a fragile
solution. If we were to make the change you suggest the chances are that
someone else who is inserting similar information in LOGGING_CONFIG will
complain.

The chances are that there is a better solution for the problem you are trying
to solve. The users mailing list is the best place to get advice on this.

As for why there are differences bewteen .sh and .bat, you can see the hsitory
for both those files in svn.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org