You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andres Aguado <an...@gmail.com> on 2012/02/09 13:51:37 UTC

Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Hi Guys!

    First of all, I want to be grateful for help. I'm (very) newbie
with apache-tomcat world, level 1 (I've installed Tomcat sucessfully
once ;-) )

    Well, I've a Tomcat 5.5.27 version with an application in
production environment and i've installed the same version for windows
on a VM-WiXP to test configuration before applying changes to
production server
    And I want to monitorize the application remotelly through
jconsole. So, I've added this lines to catalina startup script:

set CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false (When all works I'll
add authentication, but now i need to run jconsole.)

   Now I'm accesible to 8999 port (RMI Registry?) telneting, but
jconsole outputs a connection error. I've executed netstat -an command
and I've seen that 8999 port connextion is STABLISHED, but there is
another port (48657) to the tomcat ip in SYN_WAIT.

    Well, I've been reading documentation and it seems that i must
configure manually an additional port to connect through jconsole
because this port is a random port (RMIServer and RMIConnection?) and
it's a problem to gain access through firewalls

    I've been reading more information and I've arrived to this document
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote

     Then, I've added <Listener
className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
namingPort="8999" port="48657" host="tomcatservername" />

     This is the point i'm blocked. Tomcat doesn't start, and
catalina.out file shows this error:

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.JMXAdaptorLifecycleListener

    I've been looking for JMXAdaptorLifecycleListener, but i don't
know how to make it works.

Could anyone help me?

Thanks and regards
Andres Aguado

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


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Andres Aguado <an...@gmail.com>.
Hi, today I'm very happy because now it's working fine.

Finally, server.xml has these new lines

<Listener className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"

          namingPort="48657" port="8999" host="server-ip" />

and catalina startup script has these new lines

set CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=%CATALINA_HOME%/conf/jmxremote.password
-Dcom.sun.management.jmxremote.access.file=%CATALINA_HOME%/conf/jmxremote.access

and now i'm connected with jconsole running this connection chain,
with credentials defined in jmxremote.passord and jmxremote.access

service:jmx:rmi://server-ip:8999/jndi/rmi://server-ip:48657/server

Again, thank you very much for your help

Regards,
Andres

2012/2/9 Pid * <pi...@pidster.com>:
> On 9 Feb 2012, at 17:10, "Caldarale, Charles R"
> <Ch...@unisys.com> wrote:
>
>>> From: Pid [mailto:pid@pidster.com]
>>> Subject: Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool
>>
>>>> warning: [path] bad path element
>>>> "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
>>>> no such file or directory
>>
>>> The colon character is a path separator.  You have it in
>>> the C: part of each path.
>>
>> Actually, the colon is _not_ a path separator here, it's a drive delimiter.  It's the attempted use of the colon elsewhere that causes the problem; it should be a semi-colon on Windows:
>>
>> C:\apache-tomcat-5.5.27\server\lib\catalina.jar;C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar
>
> Erk. FAIL.
>
>
> p
>
>
>>
>> - 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 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
>

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


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Pid * <pi...@pidster.com>.
On 9 Feb 2012, at 17:10, "Caldarale, Charles R"
<Ch...@unisys.com> wrote:

>> From: Pid [mailto:pid@pidster.com]
>> Subject: Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool
>
>>> warning: [path] bad path element
>>> "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
>>> no such file or directory
>
>> The colon character is a path separator.  You have it in
>> the C: part of each path.
>
> Actually, the colon is _not_ a path separator here, it's a drive delimiter.  It's the attempted use of the colon elsewhere that causes the problem; it should be a semi-colon on Windows:
>
> C:\apache-tomcat-5.5.27\server\lib\catalina.jar;C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar

Erk. FAIL.


p


>
> - 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 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: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

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

Andres,

On 2/9/12 12:29 PM, Andres Aguado wrote:
> Great, it's great!. First obstacle overcomed. Now, i've compiled
> .java file and it's been created a .class file. Now i've got this
> .class file and i've added it to catalina.jar and
> catalina-optional.jar

Don't add the class to both jars. Better yet, don't add it to any jars.

Do what you've apparently done in a later post: put it into
server/classes and not in a JAR file. That way, it will be easier to
see that you've modified the environment.

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

iEYEARECAAYFAk80Nq4ACgkQ9CaO5/Lv0PAMLgCfVyUS/yOG/OyTCrlvfhQspowu
8HYAniN+EGWcEGEnrkPJD0P/A7/bLOrv
=1hqz
-----END PGP SIGNATURE-----

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


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Andres Aguado <an...@gmail.com>.
Ok, i've got it up!!. I've copied .class file into a directory that i
must create; C:\apache-tomcat-5.5.27\server\lib\org\apache\catalina\mbeans.

Also, i must delete lines into catalina.bat startup file
set CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

because i receive an error about rmi in use. Now tomcat is running and
both ports 8999 and 8084 defined in server.xml

<Listener className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"

          namingPort="8999" port="8084" host="tomcat-server-name" />

Now, to enable authentication, is it simillar than in catalina.bat?

Well, i think that i'm going to continue tomorrow, it's a good end of day

Thanks for your responses
Andres

2012/2/9 Andres Aguado <an...@gmail.com>:
> Great, it's great!. First obstacle overcomed. Now, i've compiled .java
> file and it's been created a .class file. Now i've got this .class
> file and i've added it to catalina.jar and catalina-optional.jar, but
> when i try to start catalina script other error appears in
> catalina.out, like this:
>
> GRAVE: Begin event threw exception
> java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.JMXAdapterLifecycleListener
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
> .......
> ADVERTENCIA: Catalina.start using conf/server.xml:
> java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.JMXAdapterLifecycleListener
> ......
>
> Thanks and regards,
> Andres
>
> 2012/2/9 Caldarale, Charles R <Ch...@unisys.com>:
>>> From: Pid [mailto:pid@pidster.com]
>>> Subject: Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool
>>
>>> > warning: [path] bad path element
>>> > "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
>>> > no such file or directory
>>
>>> The colon character is a path separator.  You have it in
>>> the C: part of each path.
>>
>> Actually, the colon is _not_ a path separator here, it's a drive delimiter.  It's the attempted use of the colon elsewhere that causes the problem; it should be a semi-colon on Windows:
>>
>> C:\apache-tomcat-5.5.27\server\lib\catalina.jar;C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar
>>
>>  - 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 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: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Andres Aguado <an...@gmail.com>.
Great, it's great!. First obstacle overcomed. Now, i've compiled .java
file and it's been created a .class file. Now i've got this .class
file and i've added it to catalina.jar and catalina-optional.jar, but
when i try to start catalina script other error appears in
catalina.out, like this:

GRAVE: Begin event threw exception
java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.JMXAdapterLifecycleListener
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
.......
ADVERTENCIA: Catalina.start using conf/server.xml:
java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.JMXAdapterLifecycleListener
......

Thanks and regards,
Andres

2012/2/9 Caldarale, Charles R <Ch...@unisys.com>:
>> From: Pid [mailto:pid@pidster.com]
>> Subject: Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool
>
>> > warning: [path] bad path element
>> > "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
>> > no such file or directory
>
>> The colon character is a path separator.  You have it in
>> the C: part of each path.
>
> Actually, the colon is _not_ a path separator here, it's a drive delimiter.  It's the attempted use of the colon elsewhere that causes the problem; it should be a semi-colon on Windows:
>
> C:\apache-tomcat-5.5.27\server\lib\catalina.jar;C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar
>
>  - 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 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: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Pid [mailto:pid@pidster.com] 
> Subject: Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

> > warning: [path] bad path element
> > "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
> > no such file or directory

> The colon character is a path separator.  You have it in 
> the C: part of each path.

Actually, the colon is _not_ a path separator here, it's a drive delimiter.  It's the attempted use of the colon elsewhere that causes the problem; it should be a semi-colon on Windows:

C:\apache-tomcat-5.5.27\server\lib\catalina.jar;C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Pid <pi...@pidster.com>.
On 09/02/2012 16:26, Andres Aguado wrote:
> Hi, first, for me there is a powerfull reason for maintain 5.5
> version. This is the initial version and application is working fine
> now, and I think that i'm not prepare to execute the upgrade, i don't
> know how and where to begin.
> 
> And second, i'm trying to compile JMXAdaptorLifecycleListener.java to
> get class file (i think that i must do this, but not sure), and i'm
> getting this error. Here is one example, but it's appearing me 11
> errors like this one.
> 
> C:\Program Files\Java\jdk1.5.0_22\bin>javac -classpath
> %CATALINA_HOME%\server\lib\catalina.jar:%CATALINA_HOME%\bin\commons-logging-api-1.1.1.jar
> c:\JMXAdaptorLifecycleListener.java -Xlint
> warning: [path] bad path element
> "C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
> no such file or directory

The colon character is a path separator.  You have it in the C: part of
each path.


p

> c:\JMXAdaptorLifecycleListener.java:25: cannot find symbol
> symbol  : class Lifecycle
> location: package org.apache.catalina
> import org.apache.catalina.Lifecycle;
> 
> I've created .java file copying text from internet, as attached
> 
> The last, I've checked catalina-optional.jar but no similar class
> could be found inside, i suppose that i must copy into this jar file
> the .class file obtained after compiling .java file, but this is my
> assumption
> 
> Thanks a lot for your time, it's very appreciated
> 
> Regards,
> Andres
> 
> 2012/2/9 Pid <pi...@pidster.com>:
>> On 09/02/2012 14:03, Rainer Jung wrote:
>>> On 09.02.2012 13:51, Andres Aguado wrote:
>>>> Hi Guys!
>>>>
>>>>      First of all, I want to be grateful for help. I'm (very) newbie
>>>> with apache-tomcat world, level 1 (I've installed Tomcat sucessfully
>>>> once ;-) )
>>>>
>>>>      Well, I've a Tomcat 5.5.27 version with an application in
>>>> production environment and i've installed the same version for windows
>>>> on a VM-WiXP to test configuration before applying changes to
>>>> production server
>>>>      And I want to monitorize the application remotelly through
>>>> jconsole. So, I've added this lines to catalina startup script:
>>>>
>>>> set CATALINA_OPTS=-Dcom.sun.management.jmxremote
>>>> -Dcom.sun.management.jmxremote.port=8999
>>>> -Dcom.sun.management.jmxremote.ssl=false
>>>> -Dcom.sun.management.jmxremote.authenticate=false (When all works I'll
>>>> add authentication, but now i need to run jconsole.)
>>>>
>>>>     Now I'm accesible to 8999 port (RMI Registry?) telneting, but
>>>> jconsole outputs a connection error. I've executed netstat -an command
>>>> and I've seen that 8999 port connextion is STABLISHED, but there is
>>>> another port (48657) to the tomcat ip in SYN_WAIT.
>>>>
>>>>      Well, I've been reading documentation and it seems that i must
>>>> configure manually an additional port to connect through jconsole
>>>> because this port is a random port (RMIServer and RMIConnection?) and
>>>> it's a problem to gain access through firewalls
>>>>
>>>>      I've been reading more information and I've arrived to this document
>>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote
>>>>
>>>>
>>>>       Then, I've added<Listener
>>>> className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
>>>> namingPort="8999" port="48657" host="tomcatservername" />
>>>>
>>>>       This is the point i'm blocked. Tomcat doesn't start, and
>>>> catalina.out file shows this error:
>>>>
>>>> SEVERE: Begin event threw exception
>>>> java.lang.ClassNotFoundException:
>>>> org.apache.catalina.mbeans.JMXAdaptorLifecycleListener
>>>>
>>>>      I've been looking for JMXAdaptorLifecycleListener, but i don't
>>>> know how to make it works.
>>>>
>>>> Could anyone help me?
>>>
>>> I think for TC 5.5 the class is not included in the binary downloads.
>>> You need to grab a source download and build it using Java 5.
>>>
>>> When building using Java 1.4.2 which IMHO is the default for a release,
>>> the class can't be build.
>>>
>>> Check your jar files, the class should be in catalina-optional.jar.
>>>
>>> Starting with Tomcat 6 this functionality is available as a separate
>>> Jar, which is part of the so-called "extra" downloads (in the extra
>>> folder underneath the bin folder.
>>
>> +1  Is there a reason you can't use a newer version, like 7.0 Andres?
>>
>>
>> p
>>
>>
>> --
>>
>> [key:62590808]
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


-- 

[key:62590808]


Re: [OT] Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

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

Andres,

On 2/9/12 11:26 AM, Andres Aguado wrote:
> Hi, first, for me there is a powerfull reason for maintain 5.5 
> version. This is the initial version and application is working
> fine now, and I think that i'm not prepare to execute the upgrade,
> i don't know how and where to begin.

Upgrading from 5.5 to 7.0 should ideally be as painless as installing
Tomcat 7 and dropping your WAR into the webapps directory. The APIs
are all backward-compatible.

You may run into trouble in the following areas:
0. Don't have a META-INF/context.xml file?
   Make one. Don't use server.xml for webapp deployment anymore.

1. Non-spec-standard behavior
   Newer versions of Tomcat have become increasingly cranky about
   bad code, configurations, etc. You may have some warnings and/or
   errors that you will have to fix. You should fix those /anyway/,
   but now Tomcat complains about them.

2. Logging
   Logging has changed a lot over the years and so you'll have to read
   the documentation if things don't work for you.

3. Edge cases
   There are lots more settings in the later versions of Tomcat to
   get it to behave in ways that used to be the standard (or at least
   expected behavior). If you find that your webapp is acting strangely,
   check Tomcat's changelog to see what might have changed.

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

iEYEARECAAYFAk80NmcACgkQ9CaO5/Lv0PDfswCeMmlkGkP9Q57W1uthyie/txvw
7rsAnikU1dpAc8lQM+zYVxNcB/Zk5Fky
=idKe
-----END PGP SIGNATURE-----

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


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Andres Aguado <an...@gmail.com>.
Hi, first, for me there is a powerfull reason for maintain 5.5
version. This is the initial version and application is working fine
now, and I think that i'm not prepare to execute the upgrade, i don't
know how and where to begin.

And second, i'm trying to compile JMXAdaptorLifecycleListener.java to
get class file (i think that i must do this, but not sure), and i'm
getting this error. Here is one example, but it's appearing me 11
errors like this one.

C:\Program Files\Java\jdk1.5.0_22\bin>javac -classpath
%CATALINA_HOME%\server\lib\catalina.jar:%CATALINA_HOME%\bin\commons-logging-api-1.1.1.jar
c:\JMXAdaptorLifecycleListener.java -Xlint
warning: [path] bad path element
"C:\apache-tomcat-5.5.27\server\lib\catalina.jar:C:\apache-tomcat-5.5.27\bin\commons-logging-api-1.1.1.jar":
no such file or directory
c:\JMXAdaptorLifecycleListener.java:25: cannot find symbol
symbol  : class Lifecycle
location: package org.apache.catalina
import org.apache.catalina.Lifecycle;

I've created .java file copying text from internet, as attached

The last, I've checked catalina-optional.jar but no similar class
could be found inside, i suppose that i must copy into this jar file
the .class file obtained after compiling .java file, but this is my
assumption

Thanks a lot for your time, it's very appreciated

Regards,
Andres

2012/2/9 Pid <pi...@pidster.com>:
> On 09/02/2012 14:03, Rainer Jung wrote:
>> On 09.02.2012 13:51, Andres Aguado wrote:
>>> Hi Guys!
>>>
>>>      First of all, I want to be grateful for help. I'm (very) newbie
>>> with apache-tomcat world, level 1 (I've installed Tomcat sucessfully
>>> once ;-) )
>>>
>>>      Well, I've a Tomcat 5.5.27 version with an application in
>>> production environment and i've installed the same version for windows
>>> on a VM-WiXP to test configuration before applying changes to
>>> production server
>>>      And I want to monitorize the application remotelly through
>>> jconsole. So, I've added this lines to catalina startup script:
>>>
>>> set CATALINA_OPTS=-Dcom.sun.management.jmxremote
>>> -Dcom.sun.management.jmxremote.port=8999
>>> -Dcom.sun.management.jmxremote.ssl=false
>>> -Dcom.sun.management.jmxremote.authenticate=false (When all works I'll
>>> add authentication, but now i need to run jconsole.)
>>>
>>>     Now I'm accesible to 8999 port (RMI Registry?) telneting, but
>>> jconsole outputs a connection error. I've executed netstat -an command
>>> and I've seen that 8999 port connextion is STABLISHED, but there is
>>> another port (48657) to the tomcat ip in SYN_WAIT.
>>>
>>>      Well, I've been reading documentation and it seems that i must
>>> configure manually an additional port to connect through jconsole
>>> because this port is a random port (RMIServer and RMIConnection?) and
>>> it's a problem to gain access through firewalls
>>>
>>>      I've been reading more information and I've arrived to this document
>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote
>>>
>>>
>>>       Then, I've added<Listener
>>> className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
>>> namingPort="8999" port="48657" host="tomcatservername" />
>>>
>>>       This is the point i'm blocked. Tomcat doesn't start, and
>>> catalina.out file shows this error:
>>>
>>> SEVERE: Begin event threw exception
>>> java.lang.ClassNotFoundException:
>>> org.apache.catalina.mbeans.JMXAdaptorLifecycleListener
>>>
>>>      I've been looking for JMXAdaptorLifecycleListener, but i don't
>>> know how to make it works.
>>>
>>> Could anyone help me?
>>
>> I think for TC 5.5 the class is not included in the binary downloads.
>> You need to grab a source download and build it using Java 5.
>>
>> When building using Java 1.4.2 which IMHO is the default for a release,
>> the class can't be build.
>>
>> Check your jar files, the class should be in catalina-optional.jar.
>>
>> Starting with Tomcat 6 this functionality is available as a separate
>> Jar, which is part of the so-called "extra" downloads (in the extra
>> folder underneath the bin folder.
>
> +1  Is there a reason you can't use a newer version, like 7.0 Andres?
>
>
> p
>
>
> --
>
> [key:62590808]
>


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Pid <pi...@pidster.com>.
On 09/02/2012 14:03, Rainer Jung wrote:
> On 09.02.2012 13:51, Andres Aguado wrote:
>> Hi Guys!
>>
>>      First of all, I want to be grateful for help. I'm (very) newbie
>> with apache-tomcat world, level 1 (I've installed Tomcat sucessfully
>> once ;-) )
>>
>>      Well, I've a Tomcat 5.5.27 version with an application in
>> production environment and i've installed the same version for windows
>> on a VM-WiXP to test configuration before applying changes to
>> production server
>>      And I want to monitorize the application remotelly through
>> jconsole. So, I've added this lines to catalina startup script:
>>
>> set CATALINA_OPTS=-Dcom.sun.management.jmxremote
>> -Dcom.sun.management.jmxremote.port=8999
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.authenticate=false (When all works I'll
>> add authentication, but now i need to run jconsole.)
>>
>>     Now I'm accesible to 8999 port (RMI Registry?) telneting, but
>> jconsole outputs a connection error. I've executed netstat -an command
>> and I've seen that 8999 port connextion is STABLISHED, but there is
>> another port (48657) to the tomcat ip in SYN_WAIT.
>>
>>      Well, I've been reading documentation and it seems that i must
>> configure manually an additional port to connect through jconsole
>> because this port is a random port (RMIServer and RMIConnection?) and
>> it's a problem to gain access through firewalls
>>
>>      I've been reading more information and I've arrived to this document
>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote
>>
>>
>>       Then, I've added<Listener
>> className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
>> namingPort="8999" port="48657" host="tomcatservername" />
>>
>>       This is the point i'm blocked. Tomcat doesn't start, and
>> catalina.out file shows this error:
>>
>> SEVERE: Begin event threw exception
>> java.lang.ClassNotFoundException:
>> org.apache.catalina.mbeans.JMXAdaptorLifecycleListener
>>
>>      I've been looking for JMXAdaptorLifecycleListener, but i don't
>> know how to make it works.
>>
>> Could anyone help me?
> 
> I think for TC 5.5 the class is not included in the binary downloads.
> You need to grab a source download and build it using Java 5.
> 
> When building using Java 1.4.2 which IMHO is the default for a release,
> the class can't be build.
> 
> Check your jar files, the class should be in catalina-optional.jar.
> 
> Starting with Tomcat 6 this functionality is available as a separate
> Jar, which is part of the so-called "extra" downloads (in the extra
> folder underneath the bin folder.

+1  Is there a reason you can't use a newer version, like 7.0 Andres?


p


-- 

[key:62590808]


Re: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Rainer Jung <ra...@kippdata.de>.
On 09.02.2012 13:51, Andres Aguado wrote:
> Hi Guys!
>
>      First of all, I want to be grateful for help. I'm (very) newbie
> with apache-tomcat world, level 1 (I've installed Tomcat sucessfully
> once ;-) )
>
>      Well, I've a Tomcat 5.5.27 version with an application in
> production environment and i've installed the same version for windows
> on a VM-WiXP to test configuration before applying changes to
> production server
>      And I want to monitorize the application remotelly through
> jconsole. So, I've added this lines to catalina startup script:
>
> set CATALINA_OPTS=-Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=8999
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false (When all works I'll
> add authentication, but now i need to run jconsole.)
>
>     Now I'm accesible to 8999 port (RMI Registry?) telneting, but
> jconsole outputs a connection error. I've executed netstat -an command
> and I've seen that 8999 port connextion is STABLISHED, but there is
> another port (48657) to the tomcat ip in SYN_WAIT.
>
>      Well, I've been reading documentation and it seems that i must
> configure manually an additional port to connect through jconsole
> because this port is a random port (RMIServer and RMIConnection?) and
> it's a problem to gain access through firewalls
>
>      I've been reading more information and I've arrived to this document
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote
>
>       Then, I've added<Listener
> className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
> namingPort="8999" port="48657" host="tomcatservername" />
>
>       This is the point i'm blocked. Tomcat doesn't start, and
> catalina.out file shows this error:
>
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.JMXAdaptorLifecycleListener
>
>      I've been looking for JMXAdaptorLifecycleListener, but i don't
> know how to make it works.
>
> Could anyone help me?

I think for TC 5.5 the class is not included in the binary downloads. 
You need to grab a source download and build it using Java 5.

When building using Java 1.4.2 which IMHO is the default for a release, 
the class can't be build.

Check your jar files, the class should be in catalina-optional.jar.

Starting with Tomcat 6 this functionality is available as a separate 
Jar, which is part of the so-called "extra" downloads (in the extra 
folder underneath the bin folder.

Regards,

Rainer

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


RE: Enabling JMX Remote Ports to connect Tomcat server remotelly with jconsole tool

Posted by Casper Wandahl Schmidt <ka...@gmail.com>.
See comments inline

-----Original Message-----
From: Andres Aguado [mailto:andriu.one@gmail.com] 
Sent: 9. februar 2012 13:52
To: users@tomcat.apache.org
Subject: Enabling JMX Remote Ports to connect Tomcat server remotelly with
jconsole tool

Hi Guys!

    First of all, I want to be grateful for help. I'm (very) newbie with
apache-tomcat world, level 1 (I've installed Tomcat sucessfully once ;-) )

    Well, I've a Tomcat 5.5.27 version with an application in production
environment and i've installed the same version for windows on a VM-WiXP to
test configuration before applying changes to production server
    And I want to monitorize the application remotelly through jconsole. So,
I've added this lines to catalina startup script:

set CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false (When all works I'll add
authentication, but now i need to run jconsole.)

   Now I'm accesible to 8999 port (RMI Registry?) telneting, but jconsole
outputs a connection error. I've executed netstat -an command and I've seen
that 8999 port connextion is STABLISHED, but there is another port (48657)
to the tomcat ip in SYN_WAIT.

    Well, I've been reading documentation and it seems that i must configure
manually an additional port to connect through jconsole because this port is
a random port (RMIServer and RMIConnection?) and it's a problem to gain
access through firewalls

    I've been reading more information and I've arrived to this document
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote

     Then, I've added <Listener
className="org.apache.catalina.mbeans.JMXAdaptorLifecycleListener"
namingPort="8999" port="48657" host="tomcatservername" />

     This is the point i'm blocked. Tomcat doesn't start, and catalina.out
file shows this error:

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.JMXAdaptorLifecycleListener

    I've been looking for JMXAdaptorLifecycleListener, but i don't know how
to make it works.

I'm new to this too but my guess is that the name is
JMXAdapterLifecycleListener (Adapter not Adaptor)

Could anyone help me?

Thanks and regards
Andres Aguado

---------------------------------------------------------------------
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