How to run JMX monitoring (e.g.: jconsole, jvisualvm) over ssh tunnel?

283 views
Skip to first unread message

Tim Olsen

unread,
Oct 7, 2012, 8:03:15 AM10/7/12
to rails-t...@googlegroups.com
Hello,

I switched from Trinidad to  justTomcat a few weeks ago so I could follow instructions I found for enabling JMX monitoring through an SSH tunnel in order to troubleshoot performance problems.  Namely, I added the following xml tag to tomcat's server.xml:

  <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
            useLocalPorts="true" rmiRegistryPortPlatform="JMX_PORT_1"
            rmiServerPortPlatform="JMX_PORT_2"/>

where JMX_PORT_1 and JMX_PORT_2 are the ports I forward over ssh.

I also made sure catalina-jmx-remote.jar was in tomcat's lib folder.

I've fixed my app's performance problems and would like to switch back to Trinidad, but I would like to keep the JMX monitoring.  How can I add JMX monitoring to trinidad so that it is easy to use over ssh tunnel?  Is it easy to add the equivalent Listener and catalina-jmx-remote.jar to trinidad?  

I took a look at trinidad_lifecycle_extension but I received no response on an issue I opened a few weeks ago asking how to set useLocalPorts on the JmxRemoteLifeCycleListener: https://github.com/trinidad/trinidad_lifecycle_extension/issues/1 .  I suspect  trinidad_lifecycle_extension is inactive as it hasn't seen a commit in 2 years.

Any help would be greatly appreciated.  It would be great to be back on Trinidad!

Tim


kares

unread,
Oct 8, 2012, 5:46:03 AM10/8/12
to rails-t...@googlegroups.com
 
 Hi Tim, sorry about that.

I've seen the issue but forgot about it later due a few others (and maybe hoped you'll figure it out :)).
First of all the lifecycle extension was not compatible with the latest Trinidad (although in your case you wouldn't probably notice since you only need a server listener) but now 0.3 is.

I've added an "untested" quick sample to the comment, hope it's understandable ...

Cheeers, K.

Tim Olsen

unread,
Oct 8, 2012, 10:22:44 AM10/8/12
to rails-t...@googlegroups.com
Awesome!  Thanks Karol!  I'll try it out.

Tim

--
Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para ver este debate en la Web, visita https://groups.google.com/d/msg/rails-trinidad/-/n6Vzmp1tqoEJ.
Para publicar una entrada en este grupo, envía un correo electrónico a rails-t...@googlegroups.com.
Para anular tu suscripción a este grupo, envía un correo electrónico a rails-trinida...@googlegroups.com
Para tener acceso a más opciones, visita el grupo en http://groups.google.com/group/rails-trinidad?hl=es.

Ricardo Wolosker

unread,
Nov 4, 2014, 11:31:54 AM11/4/14
to rails-t...@googlegroups.com, t...@jux.com
é incrível como que ninguém sabe / consegue responder essa merda.
Reply all
Reply to author
Forward
0 new messages