You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vadzim Mikhalenak <va...@gmail.com> on 2012/05/22 16:49:51 UTC

Tomcat 7. MX4J

Hello,

We are going to migrate our application from tomcat 6 to tomcat 7. But
during migration we've faced with the following issue:
we have the following configuration to have possbility to manage JMX Bean
using browser (through http):
...
<Connector port="8009"
                 handler.list="mx"
                 mx.enabled="true"
                 mx.httpHost="10.30.244.40"
                 mx.authMode="basic"
                 mx.authUser="someUser"
                 mx.authPassword="pass"
                 mx.httpPort="9012"
                 enableLookups="false" redirectPort="8443"
protocol="AJP/1.3"/>
...

as described at the following page:
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
But when we use this configuration we have the following warnings: WARNING:
[SetAllPropertiesRule]{Server/Service/Connector} Setting property
'handler.list' to 'mx' did not find a matching property.
However
http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#Monitoring_your_Cluster_with_JMX
.
Also I've noticed that some classes where removed from catalina.jar (such
as JkMX, JkMain and others).

Could you please point me how should tomcat  be configured / what libraries
should be added?

Thanks in advance!
Vadim.

Re: Tomcat 7. MX4J

Posted by Vadzim Mikhalenak <va...@gmail.com>.
Hi,

This Listener doesn't register MX4J HttpAdapter. So I wrote my Listener
that do it. Now I can access MBeans through http://host:port (MX4J Page)

Best regards,
Vadim.

On Wed, May 23, 2012 at 10:14 PM, Filip Hanik Mailing Lists <
devlists@hanik.com> wrote:

>
> http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener
>
>
>
> ----- Original Message -----
> > From: "Vadzim Mikhalenak" <va...@gmail.com>
> > To: "Tomcat Users List" <us...@tomcat.apache.org>
> > Sent: Tuesday, May 22, 2012 4:06:52 PM
> > Subject: Re: Tomcat 7. MX4J
> >
> > On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko
> > <knst.kolinko@gmail.com
> > > wrote:
> >
> > > 2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
> > > > Hello  Christopher,
> > > > *
> > > > *
> > > > Thank you for the reply! Yes, link
> > > > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for
> > > > version
> > > 5.5
> > > > but we are migrating from version 6 (sorry for the confusion) but
> > > > the
> > > > configuration above was valid for version 6
> > > >
> > >
> > > It works (or at least tries to start, to my surprise) in Tomcat 6
> > > with
> > > this particular AJP/1.3 connector implementation, but it is not
> > > documented and not supported.  Other connectors do not support
> > > those
> > > attributes and this one was removed from Tomcat 7.
> > >
> > > Tomcat 6 and 7 use JMX support provided by JRE and if you need http
> > > access to it, the common way is to use "JMXProxy" servlet that is
> > > part
> > > of the manager webapp.
> > >
> > > It is all is documented
> > > http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
> > >
> > >
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
> > >
> > > or see the same docs for Tomcat 7.
> > >
> > >
> > >
> > > >  <Connector port="${AJP.PORT}"
> > > >            handler.list="mx"
> > > >            mx.enabled="true"
> > > >            mx.httpHost="${JMX.HOST}"
> > > >            mx.httpPort="${JMX.PORT}"
> > > >            protocol="AJP/1.3" />
> > > >
> > > >
> > > > *
> > > > *
> > > > and gave us opportunity to manage JMX beans using  http://
> > > > ${JMX.HOST}:${JMX.PORT} (please see
> > > >
> > >
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > > > )
> > > > In version 7 I couldn't see any possibility to do it.
> > > > I've noticed that in Connector class of version 6
> > > > if ("AJP/1.3".equals(protocol)) {
> > > >                setProtocolHandlerClassName
> > > >                    ("org.apache.jk.server.JkCoyoteHandler");
> > > >
> > > > org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX
> > > > where
> > > > HttpAdapter from mx4j-tool.jar was used.
> > > >
> > > > but in version 7
> > > > else if ("AJP/1.3".equals(protocol)) {
> > > >                setProtocolHandlerClassName
> > > >                    ("org.apache.coyote.ajp.AjpAprProtocol");
> > > >
> > > >
> > > >
> > > > So do we have possibility to manage JMX beans in version 7 as we
> > > > could in
> > > > version 6? (please see
> > > >
> > >
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > > >  )
> > > >
> > >
> > > Please
> > > 1. Post your response below the text that you are replying to (aka
> > > "do
> > > not top-post")
> > > 2. Do not cross-post questions between users@ and dev@ lists.
> > >
> > > This one belongs to users@.
> > >
> > > Best regards,
> > > Konstantin Kolinko
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > > Hi,
> >
> > Thanks for the reply.
> > I know about JMX Proxy Servlet but it was more preferable to use MX4J
> > page
> > and I thought there is simple way to configure it (as it was
> > configured in
> > 6 version).
> > I'll be looking for solution to get mx4j page working.
> > Thanks again for your help!
> > Sorry for the trouble.
> >
> > Best regards,
> > Vadim.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: After going to Tomcat 6 I get log4j problems. Why?

Posted by Pid <pi...@pidster.com>.
On 25/05/2012 10:03, Hermes Flying wrote:
> Hi,
> 
> I have upgraded from Tomcat 5.5 to Tomcat 6.0.35
> I am getting java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
> I didn't have this problem before.
> Note that I have commons-logging already in my web apps WEB-INF\lib
> And this exception is from a class (custom class) running from a jar in %TOMCAT_HOME%\lib
> If I drop commons-logging in %TOMCAT_HOME%\lib the exception does not happen BUT now I get exceptions in log4j from inside my web app.
> I tried also deleting the commons-logging from %TOMCAT_HOME%\webapps\myApp\WEB-INF\lib but no success.
> 
> Any idea what is the problem here?

Please start a new thread, rather than hijacking an existing thread, by
editing a subject/body.


p



-- 

[key:62590808]


Re: After going to Tomcat 6 I get log4j problems. Why?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/5/25 Hermes Flying <fl...@yahoo.com>:
> Hi,
>
> I have upgraded from Tomcat 5.5 to Tomcat 6.0.35
> I am getting java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
> I didn't have this problem before.
> Note that I have commons-logging already in my web apps WEB-INF\lib
> And this exception is from a class (custom class) running from a jar in %TOMCAT_HOME%\lib
>
> If I drop commons-logging in %TOMCAT_HOME%\lib the exception does not happen BUT now I get exceptions in log4j from inside my web app.
> I tried also deleting the commons-logging from %TOMCAT_HOME%\webapps\myApp\WEB-INF\lib but no success.
>
> Any idea what is the problem here?

Your description is too generic to say.

You do not say what jars are exactly where and what actual
configuration (server.xml and logging) you have.

See
1) "Class Loading" page in documentation.

Placing custom jars into %TOMCAT_HOME%\lib is usually a bad idea.

I'd suspect that one of them is the culprit.

2) "Logging" page in documentation.

Compare it with your configuration.  It might be that you config
matches some of the steps for "enabling log4j" described there, but
not all of them. Note that using log4j in Tomcat is not the default
configuration.

3) Apache Commons Logging documentation
http://commons.apache.org/logging/guide.html

Especially how commons-logging switches between java.util.logging and
log4j (preferring the latter if it is available).

Best regards,
Konstantin Kolinko

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


After going to Tomcat 6 I get log4j problems. Why?

Posted by Hermes Flying <fl...@yahoo.com>.
Hi,

I have upgraded from Tomcat 5.5 to Tomcat 6.0.35
I am getting java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
I didn't have this problem before.
Note that I have commons-logging already in my web apps WEB-INF\lib
And this exception is from a class (custom class) running from a jar in %TOMCAT_HOME%\lib
If I drop commons-logging in %TOMCAT_HOME%\lib the exception does not happen BUT now I get exceptions in log4j from inside my web app.
I tried also deleting the commons-logging from %TOMCAT_HOME%\webapps\myApp\WEB-INF\lib but no success.

Any idea what is the problem here?

Re: Tomcat 7. MX4J

Posted by Vadzim Mikhalenak <va...@gmail.com>.
On Thu, May 24, 2012 at 1:19 PM, Peter Roßbach <pr...@objektpark.de> wrote:

> HI Vadzim,
>
> as you like a hot HTTP-JMX access use
>
> http://www.jolokia.org/
>
> chili...
>
> Peter
>
>
> Am 23.05.2012 um 00:06 schrieb Vadzim Mikhalenak:
>
> > On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko <
> knst.kolinko@gmail.com
> >> wrote:
> >
> >> 2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
> >>> Hello  Christopher,
> >>> *
> >>> *
> >>> Thank you for the reply! Yes, link
> >>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for version
> >> 5.5
> >>> but we are migrating from version 6 (sorry for the confusion) but the
> >>> configuration above was valid for version 6
> >>>
> >>
> >> It works (or at least tries to start, to my surprise) in Tomcat 6 with
> >> this particular AJP/1.3 connector implementation, but it is not
> >> documented and not supported.  Other connectors do not support those
> >> attributes and this one was removed from Tomcat 7.
> >>
> >> Tomcat 6 and 7 use JMX support provided by JRE and if you need http
> >> access to it, the common way is to use "JMXProxy" servlet that is part
> >> of the manager webapp.
> >>
> >> It is all is documented
> >> http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
> >>
> >>
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
> >>
> >> or see the same docs for Tomcat 7.
> >>
> >>
> >>
> >>> <Connector port="${AJP.PORT}"
> >>>           handler.list="mx"
> >>>           mx.enabled="true"
> >>>           mx.httpHost="${JMX.HOST}"
> >>>           mx.httpPort="${JMX.PORT}"
> >>>           protocol="AJP/1.3" />
> >>>
> >>>
> >>> *
> >>> *
> >>> and gave us opportunity to manage JMX beans using  http://
> >>> ${JMX.HOST}:${JMX.PORT} (please see
> >>>
> >>
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> >>> )
> >>> In version 7 I couldn't see any possibility to do it.
> >>> I've noticed that in Connector class of version 6
> >>> if ("AJP/1.3".equals(protocol)) {
> >>>               setProtocolHandlerClassName
> >>>                   ("org.apache.jk.server.JkCoyoteHandler");
> >>>
> >>> org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX where
> >>> HttpAdapter from mx4j-tool.jar was used.
> >>>
> >>> but in version 7
> >>> else if ("AJP/1.3".equals(protocol)) {
> >>>               setProtocolHandlerClassName
> >>>                   ("org.apache.coyote.ajp.AjpAprProtocol");
> >>>
> >>>
> >>>
> >>> So do we have possibility to manage JMX beans in version 7 as we could
> in
> >>> version 6? (please see
> >>>
> >>
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> >>> )
> >>>
> >>
> >> Please
> >> 1. Post your response below the text that you are replying to (aka "do
> >> not top-post")
> >> 2. Do not cross-post questions between users@ and dev@ lists.
> >>
> >> This one belongs to users@.
> >>
> >> Best regards,
> >> Konstantin Kolinko
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >> Hi,
> >
> > Thanks for the reply.
> > I know about JMX Proxy Servlet but it was more preferable to use MX4J
> page
> > and I thought there is simple way to configure it (as it was configured
> in
> > 6 version).
> > I'll be looking for solution to get mx4j page working.
> > Thanks again for your help!
> > Sorry for the trouble.
> >
> > Best regards,
> > Vadim.
>
> Hello  Peter,
>

Thanks for the link. May be I'll try it soon :)

Best regards,
Vadim.

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

Re: Tomcat 7. MX4J

Posted by Peter Roßbach <pr...@objektpark.de>.
HI Vadzim,

as you like a hot HTTP-JMX access use

http://www.jolokia.org/

chili...

Peter

 
Am 23.05.2012 um 00:06 schrieb Vadzim Mikhalenak:

> On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko <knst.kolinko@gmail.com
>> wrote:
> 
>> 2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
>>> Hello  Christopher,
>>> *
>>> *
>>> Thank you for the reply! Yes, link
>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for version
>> 5.5
>>> but we are migrating from version 6 (sorry for the confusion) but the
>>> configuration above was valid for version 6
>>> 
>> 
>> It works (or at least tries to start, to my surprise) in Tomcat 6 with
>> this particular AJP/1.3 connector implementation, but it is not
>> documented and not supported.  Other connectors do not support those
>> attributes and this one was removed from Tomcat 7.
>> 
>> Tomcat 6 and 7 use JMX support provided by JRE and if you need http
>> access to it, the common way is to use "JMXProxy" servlet that is part
>> of the manager webapp.
>> 
>> It is all is documented
>> http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
>> 
>> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
>> 
>> or see the same docs for Tomcat 7.
>> 
>> 
>> 
>>> <Connector port="${AJP.PORT}"
>>>           handler.list="mx"
>>>           mx.enabled="true"
>>>           mx.httpHost="${JMX.HOST}"
>>>           mx.httpPort="${JMX.PORT}"
>>>           protocol="AJP/1.3" />
>>> 
>>> 
>>> *
>>> *
>>> and gave us opportunity to manage JMX beans using  http://
>>> ${JMX.HOST}:${JMX.PORT} (please see
>>> 
>> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
>>> )
>>> In version 7 I couldn't see any possibility to do it.
>>> I've noticed that in Connector class of version 6
>>> if ("AJP/1.3".equals(protocol)) {
>>>               setProtocolHandlerClassName
>>>                   ("org.apache.jk.server.JkCoyoteHandler");
>>> 
>>> org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX where
>>> HttpAdapter from mx4j-tool.jar was used.
>>> 
>>> but in version 7
>>> else if ("AJP/1.3".equals(protocol)) {
>>>               setProtocolHandlerClassName
>>>                   ("org.apache.coyote.ajp.AjpAprProtocol");
>>> 
>>> 
>>> 
>>> So do we have possibility to manage JMX beans in version 7 as we could in
>>> version 6? (please see
>>> 
>> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
>>> )
>>> 
>> 
>> Please
>> 1. Post your response below the text that you are replying to (aka "do
>> not top-post")
>> 2. Do not cross-post questions between users@ and dev@ lists.
>> 
>> This one belongs to users@.
>> 
>> Best regards,
>> Konstantin Kolinko
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> Hi,
> 
> Thanks for the reply.
> I know about JMX Proxy Servlet but it was more preferable to use MX4J page
> and I thought there is simple way to configure it (as it was configured in
> 6 version).
> I'll be looking for solution to get mx4j page working.
> Thanks again for your help!
> Sorry for the trouble.
> 
> Best regards,
> Vadim.


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


Re: Tomcat 7. MX4J

Posted by Filip Hanik Mailing Lists <de...@hanik.com>.
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html#JMX_Remote_Lifecycle_Listener_-_org.apache.catalina.mbeans.JmxRemoteLifecycleListener



----- Original Message -----
> From: "Vadzim Mikhalenak" <va...@gmail.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Tuesday, May 22, 2012 4:06:52 PM
> Subject: Re: Tomcat 7. MX4J
> 
> On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko
> <knst.kolinko@gmail.com
> > wrote:
> 
> > 2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
> > > Hello  Christopher,
> > > *
> > > *
> > > Thank you for the reply! Yes, link
> > > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for
> > > version
> > 5.5
> > > but we are migrating from version 6 (sorry for the confusion) but
> > > the
> > > configuration above was valid for version 6
> > >
> >
> > It works (or at least tries to start, to my surprise) in Tomcat 6
> > with
> > this particular AJP/1.3 connector implementation, but it is not
> > documented and not supported.  Other connectors do not support
> > those
> > attributes and this one was removed from Tomcat 7.
> >
> > Tomcat 6 and 7 use JMX support provided by JRE and if you need http
> > access to it, the common way is to use "JMXProxy" servlet that is
> > part
> > of the manager webapp.
> >
> > It is all is documented
> > http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
> >
> > http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
> >
> > or see the same docs for Tomcat 7.
> >
> >
> >
> > >  <Connector port="${AJP.PORT}"
> > >            handler.list="mx"
> > >            mx.enabled="true"
> > >            mx.httpHost="${JMX.HOST}"
> > >            mx.httpPort="${JMX.PORT}"
> > >            protocol="AJP/1.3" />
> > >
> > >
> > > *
> > > *
> > > and gave us opportunity to manage JMX beans using  http://
> > > ${JMX.HOST}:${JMX.PORT} (please see
> > >
> > http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > > )
> > > In version 7 I couldn't see any possibility to do it.
> > > I've noticed that in Connector class of version 6
> > > if ("AJP/1.3".equals(protocol)) {
> > >                setProtocolHandlerClassName
> > >                    ("org.apache.jk.server.JkCoyoteHandler");
> > >
> > > org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX
> > > where
> > > HttpAdapter from mx4j-tool.jar was used.
> > >
> > > but in version 7
> > > else if ("AJP/1.3".equals(protocol)) {
> > >                setProtocolHandlerClassName
> > >                    ("org.apache.coyote.ajp.AjpAprProtocol");
> > >
> > >
> > >
> > > So do we have possibility to manage JMX beans in version 7 as we
> > > could in
> > > version 6? (please see
> > >
> > http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > >  )
> > >
> >
> > Please
> > 1. Post your response below the text that you are replying to (aka
> > "do
> > not top-post")
> > 2. Do not cross-post questions between users@ and dev@ lists.
> >
> > This one belongs to users@.
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> > Hi,
> 
> Thanks for the reply.
> I know about JMX Proxy Servlet but it was more preferable to use MX4J
> page
> and I thought there is simple way to configure it (as it was
> configured in
> 6 version).
> I'll be looking for solution to get mx4j page working.
> Thanks again for your help!
> Sorry for the trouble.
> 
> Best regards,
> Vadim.
> 

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


Re: Tomcat 7. MX4J

Posted by Vadzim Mikhalenak <va...@gmail.com>.
On Wed, May 23, 2012 at 12:31 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> wrote:

> 2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
> > Hello  Christopher,
> > *
> > *
> > Thank you for the reply! Yes, link
> > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for version
> 5.5
> > but we are migrating from version 6 (sorry for the confusion) but the
> > configuration above was valid for version 6
> >
>
> It works (or at least tries to start, to my surprise) in Tomcat 6 with
> this particular AJP/1.3 connector implementation, but it is not
> documented and not supported.  Other connectors do not support those
> attributes and this one was removed from Tomcat 7.
>
> Tomcat 6 and 7 use JMX support provided by JRE and if you need http
> access to it, the common way is to use "JMXProxy" servlet that is part
> of the manager webapp.
>
> It is all is documented
> http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
>
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet
>
> or see the same docs for Tomcat 7.
>
>
>
> >  <Connector port="${AJP.PORT}"
> >            handler.list="mx"
> >            mx.enabled="true"
> >            mx.httpHost="${JMX.HOST}"
> >            mx.httpPort="${JMX.PORT}"
> >            protocol="AJP/1.3" />
> >
> >
> > *
> > *
> > and gave us opportunity to manage JMX beans using  http://
> > ${JMX.HOST}:${JMX.PORT} (please see
> >
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> > )
> > In version 7 I couldn't see any possibility to do it.
> > I've noticed that in Connector class of version 6
> > if ("AJP/1.3".equals(protocol)) {
> >                setProtocolHandlerClassName
> >                    ("org.apache.jk.server.JkCoyoteHandler");
> >
> > org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX where
> > HttpAdapter from mx4j-tool.jar was used.
> >
> > but in version 7
> > else if ("AJP/1.3".equals(protocol)) {
> >                setProtocolHandlerClassName
> >                    ("org.apache.coyote.ajp.AjpAprProtocol");
> >
> >
> >
> > So do we have possibility to manage JMX beans in version 7 as we could in
> > version 6? (please see
> >
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> >  )
> >
>
> Please
> 1. Post your response below the text that you are replying to (aka "do
> not top-post")
> 2. Do not cross-post questions between users@ and dev@ lists.
>
> This one belongs to users@.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Hi,

Thanks for the reply.
I know about JMX Proxy Servlet but it was more preferable to use MX4J page
and I thought there is simple way to configure it (as it was configured in
6 version).
I'll be looking for solution to get mx4j page working.
Thanks again for your help!
Sorry for the trouble.

Best regards,
Vadim.

Re: Tomcat 7. MX4J

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/5/22 Vadzim Mikhalenak <va...@gmail.com>:
> Hello  Christopher,
> *
> *
> Thank you for the reply! Yes, link
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for version 5.5
> but we are migrating from version 6 (sorry for the confusion) but the
> configuration above was valid for version 6
>

It works (or at least tries to start, to my surprise) in Tomcat 6 with
this particular AJP/1.3 connector implementation, but it is not
documented and not supported.  Other connectors do not support those
attributes and this one was removed from Tomcat 7.

Tomcat 6 and 7 use JMX support provided by JRE and if you need http
access to it, the common way is to use "JMXProxy" servlet that is part
of the manager webapp.

It is all is documented
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Using_the_JMX_Proxy_Servlet

or see the same docs for Tomcat 7.



>  <Connector port="${AJP.PORT}"
>            handler.list="mx"
>            mx.enabled="true"
>            mx.httpHost="${JMX.HOST}"
>            mx.httpPort="${JMX.PORT}"
>            protocol="AJP/1.3" />
>
>
> *
> *
> and gave us opportunity to manage JMX beans using  http://
> ${JMX.HOST}:${JMX.PORT} (please see
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> )
> In version 7 I couldn't see any possibility to do it.
> I've noticed that in Connector class of version 6
> if ("AJP/1.3".equals(protocol)) {
>                setProtocolHandlerClassName
>                    ("org.apache.jk.server.JkCoyoteHandler");
>
> org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX where
> HttpAdapter from mx4j-tool.jar was used.
>
> but in version 7
> else if ("AJP/1.3".equals(protocol)) {
>                setProtocolHandlerClassName
>                    ("org.apache.coyote.ajp.AjpAprProtocol");
>
>
>
> So do we have possibility to manage JMX beans in version 7 as we could in
> version 6? (please see
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
>  )
>

Please
1. Post your response below the text that you are replying to (aka "do
not top-post")
2. Do not cross-post questions between users@ and dev@ lists.

This one belongs to users@.

Best regards,
Konstantin Kolinko

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


Re: Fwd: Tomcat 7. MX4J

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

Vadim,

Bringing this back onto the list...

On 5/22/12 4:29 PM, Vadzim Mikhalenak wrote:
> Thank you for the reply! Yes, link
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for 
> version 5.5 but we are migrating from version 6 (sorry for the 
> confusion) but the configuration above was valid for version 6

I'll bet the configuration was not valid for Tomcat 6, but the
connectors are just more chatty in Tomcat 7 when certain properties
don't match anything.

> [This JMX setup] gave us opportunity to manage JMX beans using 
> http://${JMX.HOST}:${JMX.PORT} (please see 
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif)
>  In version 7 I couldn't see any possibility to do it.

You can use the Tomcat Manager webapp and the JMXProxy servlet to do a
lot. Consider reading the reference I posted.

> I've noticed that in Connector class of version 6 if
> ("AJP/1.3".equals(protocol)) { setProtocolHandlerClassName 
> ("org.apache.jk.server.JkCoyoteHandler");
> 
> org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX
> where HttpAdapter from mx4j-tool.jar was used.
> 
> but in version 7 else if ("AJP/1.3".equals(protocol)) { 
> setProtocolHandlerClassName 
> ("org.apache.coyote.ajp.AjpAprProtocol");

There have been many changes to Tomcat between 5.5->6.0->7.0.

> So do we have possibility to manage JMX beans in version 7 as we
> could in version 6? (please see
> http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
> )

I don't see any reason you can't use MX4J in Tomcat 7: there's just no
direct support for configuring it. If you want to use MX4J, then use a
Listener (probably LivecycleListener makes sense) to launch it when
the server starts up.

Feel free to look at how Tomcat used to do it and replicate something
similar in your own code.

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

iEYEARECAAYFAk+8AYAACgkQ9CaO5/Lv0PDcIgCfQAgJ4wqy61okfFhGx47QhH+v
fzoAnAnWoP/qlNIboUmiW/qyFIyOmV9z
=7o4N
-----END PGP SIGNATURE-----

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


Re: Tomcat 7. MX4J

Posted by Vadzim Mikhalenak <va...@gmail.com>.
Hello  Christopher,
*
*
Thank you for the reply! Yes, link
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html is for version 5.5
but we are migrating from version 6 (sorry for the confusion) but the
configuration above was valid for version 6

 <Connector port="${AJP.PORT}"
            handler.list="mx"
            mx.enabled="true"
            mx.httpHost="${JMX.HOST}"
            mx.httpPort="${JMX.PORT}"
            protocol="AJP/1.3" />


*
*
and gave us opportunity to manage JMX beans using  http://
${JMX.HOST}:${JMX.PORT} (please see
http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
)
In version 7 I couldn't see any possibility to do it.
I've noticed that in Connector class of version 6
if ("AJP/1.3".equals(protocol)) {
                setProtocolHandlerClassName
                    ("org.apache.jk.server.JkCoyoteHandler");

org.apache.jk.server.JkCoyoteHandler used JkMain which used JkMX where
HttpAdapter from mx4j-tool.jar was used.

but in version 7
else if ("AJP/1.3".equals(protocol)) {
                setProtocolHandlerClassName
                    ("org.apache.coyote.ajp.AjpAprProtocol");



So do we have possibility to manage JMX beans in version 7 as we could in
version 6? (please see
http://logback.qos.ch/manual/images/chapters/jmxConfigurator/mx4j_jetty.gif
 )

On Tue, May 22, 2012 at 10:22 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> Vadim,
>
> On 5/22/12 10:49 AM, Vadzim Mikhalenak wrote:
> > We are going to migrate our application from tomcat 6 to tomcat 7. But
> > during migration we've faced with the following issue:
> > we have the following configuration to have possbility to manage JMX Bean
> > using browser (through http):
> > ...
> > <Connector port="8009"
> >                  handler.list="mx"
> >                  mx.enabled="true"
> >                  mx.httpHost="10.30.244.40"
> >                  mx.authMode="basic"
> >                  mx.authUser="someUser"
> >                  mx.authPassword="pass"
> >                  mx.httpPort="9012"
> >                  enableLookups="false" redirectPort="8443"
> > protocol="AJP/1.3"/>
> > ...
> >
> > as described at the following page:
> > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>
> Are you upgrading from Tomcat 5.5 or from Tomcat 6.0? The above
> documentation is from Tomcat 5.5 but you said you were upgrading from
> 6.0. Just checking.
>
> > But when we use this configuration we have the following warnings:
> WARNING:
> > [SetAllPropertiesRule]{Server/Service/Connector} Setting property
> > 'handler.list' to 'mx' did not find a matching property.
> > However
> >
> http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#Monitoring_your_Cluster_with_JMX
> > .
> > Also I've noticed that some classes where removed from catalina.jar (such
> > as JkMX, JkMain and others).
> >
> > Could you please point me how should tomcat  be configured / what
> libraries
> > should be added?
>
> You don't need any special settings on the <Connector> anymore.
>
> http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html
>
> -chris
>
>

Re: Tomcat 7. MX4J

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Vadim,

On 5/22/12 10:49 AM, Vadzim Mikhalenak wrote:
> We are going to migrate our application from tomcat 6 to tomcat 7. But
> during migration we've faced with the following issue:
> we have the following configuration to have possbility to manage JMX Bean
> using browser (through http):
> ...
> <Connector port="8009"
>                  handler.list="mx"
>                  mx.enabled="true"
>                  mx.httpHost="10.30.244.40"
>                  mx.authMode="basic"
>                  mx.authUser="someUser"
>                  mx.authPassword="pass"
>                  mx.httpPort="9012"
>                  enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3"/>
> ...
> 
> as described at the following page:
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html

Are you upgrading from Tomcat 5.5 or from Tomcat 6.0? The above
documentation is from Tomcat 5.5 but you said you were upgrading from
6.0. Just checking.

> But when we use this configuration we have the following warnings: WARNING:
> [SetAllPropertiesRule]{Server/Service/Connector} Setting property
> 'handler.list' to 'mx' did not find a matching property.
> However
> http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#Monitoring_your_Cluster_with_JMX
> .
> Also I've noticed that some classes where removed from catalina.jar (such
> as JkMX, JkMain and others).
> 
> Could you please point me how should tomcat  be configured / what libraries
> should be added?

You don't need any special settings on the <Connector> anymore.

http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html

-chris