You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2008/09/23 12:35:48 UTC
Re: Another confused person trying to get jconsole to monitor tomcat.
Tim Funk wrote:
> vnc might have acceptable performance. Not sure if you'd run into issue
> by installing vncserver.
>
> -Tim
>
> Bill Davidson wrote:
>> Tim Funk wrote:
>>> An easy kludge is to run jconsole locally on the server and send the
>>> display to yourself.
>>>
>>> ssh -Y yourserver (or ssh -X server YMMV)
>>> $JAVA_HOME/bin/jconsole pid
>>>
>>> No iptables tricks needed.
>>
>> I'm running the client on a Windows machine. I did try Cygwin/X
>> and an ssh tunnel with Putty. The performance was bad enough to
>> be effectively unusable.
I got bitten by this recently. I am working on a LifecycleListener (that
can be configured in server.xml) that fixes both ports that are used by
jconsole. This makes it much easier to configure firewalls, tunnel through
PuTTY etc.
If I get it finished in time, it will be in 6.0.19+. If not, a later
version. Keep an eye on the change log and/or the dev list.
Mark
---------------------------------------------------------------------
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
Re: Another confused person trying to get jconsole to monitor tomcat.
Posted by Kees Jan Koster <kj...@kjkoster.org>.
Dear Martin,
> http://www.jdocs.com/tomcat/6.0.14/org/apache/catalina/ServerFactory.html
> ServerFactory.getServer() will return
> org.apache.catalina.ServerFactory
Thanks for the information. I changed the mbean server code to make
use of all available mbean servers and now my code can always see
Tomcat's mbeans as well as the platform ones. Excellent.
--
Kees Jan
http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192
Rule 1 for being in a hole: stop digging.
---------------------------------------------------------------------
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
RE: Another confused person trying to get jconsole to monitor
tomcat.
Posted by Martin Gainty <mg...@hotmail.com>.
http://www.jdocs.com/tomcat/6.0.14/org/apache/catalina/ServerFactory.html
ServerFactory.getServer() will return
org.apache.catalina.ServerFactory
concerning LifecycleListener take a look at
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/LifecycleListener.html
the events that the LifecycleListener reponds to are listed at
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/Lifecycle.html
a brief synopsis of the Lifecycle events described here would be
static java.lang.String
AFTER_START_EVENT
The LifecycleEvent type for the "component after start" event.
static java.lang.String
AFTER_STOP_EVENT
The LifecycleEvent type for the "component after stop" event.
static java.lang.String
BEFORE_START_EVENT
The LifecycleEvent type for the "component before start" event.
static java.lang.String
BEFORE_STOP_EVENT
The LifecycleEvent type for the "component before stop" event.
static java.lang.String
DESTROY_EVENT
The LifecycleEvent type for the "component destroy" event.
static java.lang.String
INIT_EVENT
The LifecycleEvent type for the "component init" event.
static java.lang.String
PERIODIC_EVENT
The LifecycleEvent type for the "periodic" event.
static java.lang.String
START_EVENT
The LifecycleEvent type for the "component start" event.
static java.lang.String
STOP_EVENT
The LifecycleEvent type for the "component stop" event.
for these derived components
AccessLogValve, AuthenticatorBase, Connector, ContainerBase, DeltaManager, Embedded, ExtendedAccessLogValve, FastCommonAccessLogValve, JDBCAccessLogValve, JvmRouteBinderValve, PersistentManagerBase, RealmBase, SemaphoreValve, SimpleTcpCluster, SingleSignOn, StandardManager, StandardPipeline, StandardServer, StandardService, StoreBase, WebappClassLoader, WebappLoaderthe derived component StandardServer contains documentation located at
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/core/StandardServer.html
and supports the following attributes
protected java.lang.String
domain
protected javax.management.MBeanServer
mserver
protected javax.management.ObjectName
oname
protected java.lang.String
suffix
protected java.beans.PropertyChangeSupport
support
The property change support for this component.
protected java.lang.String
type
which implements the interface you are interested in (javax.management.MBeanRegistration)
JavaDoc listed at
http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanRegistration.html
and registers the MBeanServer located at
http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html
you will want to configure your security requirements to ensure accessing each attribute is permittable
such as what is described in catalina.policy here
grant codeBase "file:${catalina.home}/-"
{
...
permission java.util.PropertyPermission "javax.management.MBeanServer",
"read,write";
permission javax.management.MBeanServerPermission "*";
permission javax.management.MBeanPermission "*", "*";
permission javax.management.MBeanTrustPermission "register";
...
};
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> From: kjkoster@kjkoster.org
> To: users@tomcat.apache.org
> Subject: Re: Another confused person trying to get jconsole to monitor tomcat.
> Date: Thu, 2 Oct 2008 20:26:16 +0200
>
> Dear Mark,
>
> > I got bitten by this recently. I am working on a LifecycleListener
> > (that
> > can be configured in server.xml) that fixes both ports that are used
> > by
> > jconsole. This makes it much easier to configure firewalls, tunnel
> > through
> > PuTTY etc.
> >
> > If I get it finished in time, it will be in 6.0.19+. If not, a later
> > version. Keep an eye on the change log and/or the dev list.
>
>
> Since you are knowledgeable in the sources for Tomcat, are you aware
> of any programmatic way to register the Catalina mbeans? I'd like to
> do so from code, without specifying any command line options.
>
> For JBoss I found a special JMXserver class that I can load using
> reflection. Is there such a thing for Tomcat?
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> The secret of success lies in the stability of the goal. -- Benjamin
> Disraeli
>
>
> ---------------------------------------------------------------------
> 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
>
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
Re: Another confused person trying to get jconsole to monitor tomcat.
Posted by Kees Jan Koster <kj...@kjkoster.org>.
Dear Mark,
> I got bitten by this recently. I am working on a LifecycleListener
> (that
> can be configured in server.xml) that fixes both ports that are used
> by
> jconsole. This makes it much easier to configure firewalls, tunnel
> through
> PuTTY etc.
>
> If I get it finished in time, it will be in 6.0.19+. If not, a later
> version. Keep an eye on the change log and/or the dev list.
Since you are knowledgeable in the sources for Tomcat, are you aware
of any programmatic way to register the Catalina mbeans? I'd like to
do so from code, without specifying any command line options.
For JBoss I found a special JMXserver class that I can load using
reflection. Is there such a thing for Tomcat?
--
Kees Jan
http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192
The secret of success lies in the stability of the goal. -- Benjamin
Disraeli
---------------------------------------------------------------------
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