You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adrien RUFFIE <a....@e-deal.com> on 2012/12/06 16:03:04 UTC

Tomcat JMX remote

Hello all,

I have a tomcat6 installed in one debian,
But openjdk6 is installed and I try to active
JMX access on the throught the network
On my tomcat, but it doesn't work ...

I use following option (CATALINA_OPTS or JAVA_OPTS I have try two):
set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=9999 \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=true \
    -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \
    -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \

My tomcat is launched correctly with following jvm parameter:

root@rd4-was7:/usr/local# ps -ef | grep java
root     23943     1  0 15:30 pts/2    00:00:01 /usr/lib/jvm/java-6-openjdk/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.endorsed.dirs=/usr/local/tomcat6/endorsed -classpath /usr/local/tomcat6/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat6 -Dcatalina.home=/usr/local/tomcat6 -Djava.io.tmpdir=/usr/local/tomcat6/temp org.apache.catalina.startup.Bootstrap start

But I cannot access with my JVisualVM:
Cannot connect to tomcat@192.168.101.160:9999<mailto:tomcat@192.168.101.160:9999> using service:jmx:rmi///jndi/rmi://192.168.101.160:9999/jmxrmi

Tomcat of tomcat@192.168.101.160<ma...@192.168.101.160> must be are a user on my debian ? Because the current tomcat user is "tomcat6" on file system

Attached file is my catalina.sh

Any one have an idea ?

Bien cordialement,

[cid:image002.png@01CDD3CB.2C9AD9A0]<http://e-deal.biz/kd/9eZ>

[cid:image003.png@01CDD3C9.DC171580]<http://e-deal.biz/kd/UOh>[cid:image004.png@01CDD3C9.DC171580]<http://e-deal.biz/kd/X9Q>[cid:image005.png@01CDD3C9.DC171580]<http://e-deal.biz/kd/bTG>

Adrien RUFFIE
Ingénieur R&D

40, rue du Village d'Entreprises
31670 Labège
www.e-deal.com<http://www.e-deal.com/>


LD : +33 1 73 03 29 50
Std : +33 1 73 03 29 80
Fax : +33 1 73 01 69 77
a.ruffie@e-deal.com <ma...@e-deal.com>


E-DEAL soutient le Pacte Mondial de l'ONU<http://e-deal.biz/kd/mPQ>


Re: Tomcat JMX remote

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Daniel,

On 12/6/12 10:21 AM, Daniel Mikusa wrote:
> On Dec 6, 2012, at 10:03 AM, Adrien RUFFIE wrote:
> 
>> But I cannot access with my JVisualVM: Cannot connect to
>> tomcat@192.168.101.160:9999 using 
>> service:jmx:rmi///jndi/rmi://192.168.101.160:9999/jmxrmi
> 
> Seems like you are accessing from a remote machine. Is there a 
> firewall in the way?
> 
> If so, you might also want to look at
> 
> https://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener

+1

If
> 
disabling your firewall temporarily works, then using the
JMXRemoteLifecycleListener will work: it explicitly sets the alternate
port JMX requires to operate to a known value. Then, you can poke a
small hole in your firewall instead of opening everything up.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEAREIAAYFAlDAukMACgkQ9CaO5/Lv0PCftQCeIGChgjlfvrlHYhqhmqM3keR3
gBUAn3jslYPntnTWaGbgUZETme2bkUGd
=xzwh
-----END PGP SIGNATURE-----

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


Re: Tomcat JMX remote

Posted by Daniel Mikusa <dm...@vmware.com>.
On Dec 6, 2012, at 10:03 AM, Adrien RUFFIE wrote:

> Hello all,
>  
> I have a tomcat6 installed in one debian,
> But openjdk6 is installed and I try to active
> JMX access on the throught the network
> On my tomcat, but it doesn’t work …
>  
> I use following option (CATALINA_OPTS or JAVA_OPTS I have try two):
> set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
>     -Dcom.sun.management.jmxremote.port=9999 \
>     -Dcom.sun.management.jmxremote.ssl=false \
>     -Dcom.sun.management.jmxremote.authenticate=true \
>     -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \
>     -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \

Are jmxremote.password and jmxremote.access setup correctly?  These should contain your user, password and access permissions.

>  
> My tomcat is launched correctly with following jvm parameter:
>  
> root@rd4-was7:/usr/local# ps -ef | grep java
> root     23943     1  0 15:30 pts/2    00:00:01 /usr/lib/jvm/java-6-openjdk/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcom.sun.management.jmxremote.port=9999

> -Dcom.sun.management.jmxremote.authenticate=false

This is not what you specified above.

> -Dcom.sun.management.jmxremote.ssl=false -Djava.endorsed.dirs=/usr/local/tomcat6/endorsed -classpath /usr/local/tomcat6/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat6 -Dcatalina.home=/usr/local/tomcat6 -Djava.io.tmpdir=/usr/local/tomcat6/temp org.apache.catalina.startup.Bootstrap start
>  
> But I cannot access with my JVisualVM:
> Cannot connect to tomcat@192.168.101.160:9999 using service:jmx:rmi///jndi/rmi://192.168.101.160:9999/jmxrmi

Seems like you are accessing from a remote machine.  Is there a firewall in the way?

If so, you might also want to look at 

https://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener

Dan


>  
> Tomcat of tomcat@192.168.101.160 must be are a user on my debian ? Because the current tomcat user is “tomcat6” on file system
>  
> Attached file is my catalina.sh
>  
> Any one have an idea ?
>  
> Bien cordialement,
>  
> <image002.png>
> <image003.png><image004.png><image005.png>
> Adrien RUFFIE
> Ingénieur R&D
> 40, rue du Village d’Entreprises
> 31670 Labège
> www.e-deal.com
>  
> LD : +33 1 73 03 29 50
> Std : +33 1 73 03 29 80
> Fax : +33 1 73 01 69 77
> a.ruffie@e-deal.com
> 
> E-DEAL soutient le Pacte Mondial de l'ONU
>  
> <catalina.txt>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


Re: Tomcat JMX remote

Posted by Schadler Johann <ao...@aon.at>.
I suggest the following additional params:

-Dcom.sun.management.jmxremote.host=<ip-address>
-Djava.rmi.server.hostname=<ip-address, same as above>

For me, this (with the options below, of course) works as expected.

wbr Johann

From: Adrien RUFFIE 
Sent: Thursday, December 06, 2012 4:03 PM
To: users@tomcat.apache.org 
Subject: Tomcat JMX remote

Hello all,

 

I have a tomcat6 installed in one debian,

But openjdk6 is installed and I try to active

JMX access on the throught the network

On my tomcat, but it doesn’t work …

 

I use following option (CATALINA_OPTS or JAVA_OPTS I have try two):

set CATALINA_OPTS=-Dcom.sun.management.jmxremote \

    -Dcom.sun.management.jmxremote.port=9999 \

    -Dcom.sun.management.jmxremote.ssl=false \

    -Dcom.sun.management.jmxremote.authenticate=true \

    -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \

    -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \

 

My tomcat is launched correctly with following jvm parameter:

 

root@rd4-was7:/usr/local# ps -ef | grep java

root     23943     1  0 15:30 pts/2    00:00:01 /usr/lib/jvm/java-6-openjdk/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.endorsed.dirs=/usr/local/tomcat6/endorsed -classpath /usr/local/tomcat6/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat6 -Dcatalina.home=/usr/local/tomcat6 -Djava.io.tmpdir=/usr/local/tomcat6/temp org.apache.catalina.startup.Bootstrap start

 

But I cannot access with my JVisualVM:

Cannot connect to tomcat@192.168.101.160:9999 using service:jmx:rmi///jndi/rmi://192.168.101.160:9999/jmxrmi

 

Tomcat of tomcat@192.168.101.160 must be are a user on my debian ? Because the current tomcat user is “tomcat6” on file system

 

Attached file is my catalina.sh

 

Any one have an idea ?

 

Bien cordialement,
 


     
     
      Adrien RUFFIE
      Ingénieur R&D 
     
      40, rue du Village d’Entreprises
      31670 Labège
      www.e-deal.com 
     
      LD : +33 1 73 03 29 50
      Std : +33 1 73 03 29 80
      Fax : +33 1 73 01 69 77
      a.ruffie@e-deal.com 
     


E-DEAL soutient le Pacte Mondial de l'ONU

 



--------------------------------------------------------------------------------

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

Re: Tomcat JMX remote

Posted by André Warnier <aw...@ice-sa.com>.
Adrien RUFFIE wrote:
> Hello all,
> 
> I have a tomcat6 installed in one debian,
> But openjdk6 is installed and I try to active
> JMX access on the throught the network
> On my tomcat, but it doesn't work ...
> 
> I use following option (CATALINA_OPTS or JAVA_OPTS I have try two):
> set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
>     -Dcom.sun.management.jmxremote.port=9999 \
>     -Dcom.sun.management.jmxremote.ssl=false \
>     -Dcom.sun.management.jmxremote.authenticate=true \
>     -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \
>     -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \
> 
> My tomcat is launched correctly with following jvm parameter:
> 
> root@rd4-was7:/usr/local# ps -ef | grep java
> root     23943     1  0 15:30 pts/2    00:00:01 /usr/lib/jvm/java-6-openjdk/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.endorsed.dirs=/usr/local/tomcat6/endorsed -classpath /usr/local/tomcat6/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat6 -Dcatalina.home=/usr/local/tomcat6 -Djava.io.tmpdir=/usr/local/tomcat6/temp org.apache.catalina.startup.Bootstrap start
> 

I believe that you are not reading this correctly.  I do not see the same parameters above 
and below..

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