You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JLucas ZB <jl...@orange.fr> on 2008/04/18 11:56:41 UTC

Activating jmx under linux

Hello,

I still have probs in configuring jmx under my Tomcat hosted by Linux
Here is an excerpt of $TOMCAT_HOME/bin/catalina.sh

# ----- Execute The Requested Command -----------------------------------------

export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false"

echo "Using CATALINA_BASE:   $CATALINA_BASE"
echo "Using CATALINA_HOME:   $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
echo "Using CATALINA_OPTS: $CATALINA_OPTS"
echo "Using JAVA_HOME:       $JAVA_HOME"

The processes list:

---------------- T O M C A T -----------------
root       380     1  3 11:31 pts/5    00:00:04 /home/jlzb/apps/j2sdk1.4.2_08/bin/java -Dcom.sun.management.jmxremote-Dcom.sun.management.
jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.endorsed.dirs=/home/
jlzb/apps/jakarta-tomcat-5.0.28/common/endorsed -classpath /home/jlzb/apps/j2sdk1.4.2_08/lib/tools.jar:/home/jlzb/apps/jakarta-tomcat-5.0.
28/bin/bootstrap.jar:/home/jlzb/apps/jakarta-tomcat-5.0.28/bin/commons-logging-api.jar -Dcatalina.base=/home/jlzb/apps/jakarta-tomcat-5.0.
28 -Dcatalina.home=/home/jlzb/apps/jakarta-tomcat-5.0.28 -Djava.io.tmpdir=/home/jlzb/apps/jakarta-tomcat-5.0.28/temp org.apache.catalina.s
tartup.Bootstrap start
---------------- A P A C H E -----------------
root     32753     1  0 11:31 ?        00:00:00 /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
daemon   32755 32753  0 11:31 ?        00:00:00 /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
daemon   32756 32753  0 11:31 ?        00:00:00 /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
daemon   32758 32753  0 11:31 ?        00:00:00 /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
daemon   32760 32753  0 11:31 ?        00:00:00 /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
[jlzb@redhot::/home/jlzb/apps/jakarta-tomcat-5.0.28/conf]#

The -Dcom.sun.management.jmxremote.port jvm argument seems to be well set but I can't access Tomcat through jmx console; netstat -an don't show the 8888 port:

Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat
tcp        0      0 0.0.0.0:32769           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:741             0.0.0.0:*               LISTEN
tcp        0      0 10.0.0.20:5000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:37435         0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:8005          :::*                    LISTEN
tcp        0      0 :::8009                 :::*                    LISTEN
tcp        0      0 :::8080                 :::*                    LISTEN
tcp        0      0 :::80                   :::*                    LISTEN
tcp        0      0 :::22                   :::*                    LISTEN
tcp        0      0 ::1:25                  :::*                    LISTEN
tcp        0      0 10.0.0.20:22      10.0.0.59:4642    ESTABLISHED
tcp        0      0 10.0.0.20:22      10.0.0.59:4736    ESTABLISHED
tcp        0     53 10.0.0.20:22      10.0.0.23:1954    FIN_WAIT1
tcp        0      0 10.0.0.20:22      10.0.0.23:1961    ESTABLISHED
tcp        0      0 10.0.0.20:22      10.0.0.23:1944    TIME_WAIT
udp        0      0 0.0.0.0:32768           0.0.0.0:*
udp        0      0 0.0.0.0:2049            0.0.0.0:*
udp        0      0 0.0.0.0:32770           0.0.0.0:*
udp        0      0 0.0.0.0:740             0.0.0.0:*
udp        0      0 0.0.0.0:5353            0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 0.0.0.0:631             0.0.0.0:*

There's no error within log file
What's wrong

Thanks

JLucas

Re: Activating jmx under linux

Posted by Upul Godage <up...@gmail.com>.
Check whether /etc/hosts has the host name resolved to machine ip address.
Something like this. I remember we had a JMX issue and this resolved it.

10.100.1.123 myhost

Upul




On Fri, Apr 18, 2008 at 3:26 PM, JLucas ZB <jl...@orange.fr> wrote:

> Hello,
>
> I still have probs in configuring jmx under my Tomcat hosted by Linux
> Here is an excerpt of $TOMCAT_HOME/bin/catalina.sh
>
> # ----- Execute The Requested Command
> -----------------------------------------
>
> export CATALINA_OPTS="-Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=8888
> -Dcom.sun.management.jmxremote.ssl=false \
> -Dcom.sun.management.jmxremote.authenticate=false"
>
> echo "Using CATALINA_BASE:   $CATALINA_BASE"
> echo "Using CATALINA_HOME:   $CATALINA_HOME"
> echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
> echo "Using CATALINA_OPTS: $CATALINA_OPTS"
> echo "Using JAVA_HOME:       $JAVA_HOME"
>
> The processes list:
>
> ---------------- T O M C A T -----------------
> root       380     1  3 11:31 pts/5    00:00:04
> /home/jlzb/apps/j2sdk1.4.2_08/bin/java
> -Dcom.sun.management.jmxremote-Dcom.sun.management.
> jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Djava.endorsed.dirs=/home/
> jlzb/apps/jakarta-tomcat-5.0.28/common/endorsed -classpath
> /home/jlzb/apps/j2sdk1.4.2_08/lib/tools.jar:/home/jlzb/apps/jakarta-tomcat-5.0.
> 28/bin/bootstrap.jar:/home/jlzb/apps/jakarta-tomcat-5.0.28/bin/commons-logging-api.jar
> -Dcatalina.base=/home/jlzb/apps/jakarta-tomcat-5.0.
> 28 -Dcatalina.home=/home/jlzb/apps/jakarta-tomcat-5.0.28
> -Djava.io.tmpdir=/home/jlzb/apps/jakarta-tomcat-5.0.28/temp
> org.apache.catalina.s
> tartup.Bootstrap start
> ---------------- A P A C H E -----------------
> root     32753     1  0 11:31 ?        00:00:00
> /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
> daemon   32755 32753  0 11:31 ?        00:00:00
> /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
> daemon   32756 32753  0 11:31 ?        00:00:00
> /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
> daemon   32758 32753  0 11:31 ?        00:00:00
> /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
> daemon   32760 32753  0 11:31 ?        00:00:00
> /home/jlzb/apps/httpd-2.2.4//bin/httpd -k start
> [jlzb@redhot::/home/jlzb/apps/jakarta-tomcat-5.0.28/conf]#
>
> The -Dcom.sun.management.jmxremote.port jvm argument seems to be well set
> but I can't access Tomcat through jmx console; netstat -an don't show the
> 8888 port:
>
> Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat
> tcp        0      0 0.0.0.0:32769           0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:741             0.0.0.0:*               LISTEN
> tcp        0      0 10.0.0.20:5000            0.0.0.0:*
> LISTEN
> tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
> tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN
> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
> tcp        0      0 127.0.0.1:37435         0.0.0.0:*               LISTEN
> tcp        0      0 127.0.0.1:8005          :::*                    LISTEN
> tcp        0      0 :::8009                 :::*                    LISTEN
> tcp        0      0 :::8080                 :::*                    LISTEN
> tcp        0      0 :::80                   :::*                    LISTEN
> tcp        0      0 :::22                   :::*                    LISTEN
> tcp        0      0 ::1:25                  :::*                    LISTEN
> tcp        0      0 10.0.0.20:22      10.0.0.59:4642    ESTABLISHED
> tcp        0      0 10.0.0.20:22      10.0.0.59:4736    ESTABLISHED
> tcp        0     53 10.0.0.20:22      10.0.0.23:1954    FIN_WAIT1
> tcp        0      0 10.0.0.20:22      10.0.0.23:1961    ESTABLISHED
> tcp        0      0 10.0.0.20:22      10.0.0.23:1944    TIME_WAIT
> udp        0      0 0.0.0.0:32768           0.0.0.0:*
> udp        0      0 0.0.0.0:2049            0.0.0.0:*
> udp        0      0 0.0.0.0:32770           0.0.0.0:*
> udp        0      0 0.0.0.0:740             0.0.0.0:*
> udp        0      0 0.0.0.0:5353            0.0.0.0:*
> udp        0      0 0.0.0.0:111             0.0.0.0:*
> udp        0      0 0.0.0.0:631             0.0.0.0:*
>
> There's no error within log file
> What's wrong
>
> Thanks
>
> JLucas

RE: Activating jmx under linux

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: JLucas ZB [mailto:jl.zibbibo@orange.fr] 
> Subject: Activating jmx under linux
> 
> root       380     1  3 11:31 pts/5    00:00:04 
> /home/jlzb/apps/j2sdk1.4.2_08/bin/java 
> -Dcom.sun.management.jmxremote-Dcom.sun.management.
> jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false 
> -Dcom.sun.management.jmxremote.authenticate=false 

Is there a typo in the above, or is there really a space missing between
  "-Dcom.sun.management.jmxremote"
and
  "-Dcom.sun.management.jmxremote.port=8888"?

By the way, I don't think you need the first parameter if you have any other jmxremote settings.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org