[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Jetty 7 and JMX Console JConsole help
|
I have connected susscesfully to remote jetty server with VisualVm. I had
difficulties at first because of my firewall. You have to open two ports in
it, one for JMX, one for the RMI registry.
I was unable to do this via SSH though, because visualVm was not working
properly with my socks for whatever reason and tunnels also did not work,
because of the stupid persistence of this program to use host other than
localhost (It says localhost is already monitored as local) But you should
be able to do SSH with Jconsole I think. I any case you need those two ports
to be accesible. I see that you service URL only has one port specified.
This is wrong. See below the end of my jetty-jmx.xml config, use that and
then use the exact service URL produced in startup by jetty! GL!
<!-- In order to connect to the JMX server remotely from a different
process, possibly running on a different host, Jetty JMX module
can create a remote JMX connector. It requires RMI registry to
be started prior to creating the connector server because the
JMX specification uses RMI to facilitate connections.
-->
<!-- Optionally start the RMI registry. Normally RMI registry runs on
port 1099. The argument below can be changed in order to comply
with the firewall requirements.
-->
<Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
<!-- RMI registry port 1099-->
<Arg type="java.lang.Integer">1099</Arg>
<Call name="sleep" class="java.lang.Thread">
<Arg type="java.lang.Integer">1000</Arg>
</Call>
</Call>
<!-- Optionally add a remote JMX connector. The parameters of the
constructor
below specify the JMX service URL, and the object name string for the
connector server bean. The parameters of the JMXServiceURL
constructor
specify the protocol that clients will use to connect to the remote
JMX
connector (RMI), the hostname of the server (local hostname), port
number
(automatically assigned), and the URL path. Note that URL path
contains
the RMI registry hostname and port number, that may need to be
modified
in order to comply with the firewall requirements.
-->
<New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
<Arg>
<New class="javax.management.remote.JMXServiceURL">
<Arg type="java.lang.String">rmi</Arg>
<Arg type="java.lang.String">somehost</Arg>
<!-- JMX port 1799 -->
<Arg type="java.lang.Integer">1799</Arg>
<!-- RMI registry port 1099-->
<Arg
type="java.lang.String">/jndi/rmi://somehost:1099/jettyjmx</Arg>
</New>
</Arg>
<Arg>org.eclipse.jetty:name=rmiconnectorserver</Arg>
<Call name="start" />
</New>
--------------------------------------------------
From: "Don Santillan" <donzymeth@xxxxxxxxx>
Sent: Tuesday, August 24, 2010 10:34 AM
To: "JETTY user mailing list" <jetty-users@xxxxxxxxxxx>
Subject: [jetty-users] Jetty 7 and JMX Console JConsole help
Changed subject.
Any idea? Anyone?
Don Santillan wrote:
Hello,
I've been struggling making JMX using JConsole to connect to a remote
Jetty 7 server.
I was able to do a successful connection to a local server but not to a
remote one.
My Jetty on the remote server comes from a fresh installation.
Can anybody tell me the trick how to make this work?
Here's what I did so far:
1. In start.ini, I uncommented -exec and -Dcom.sun.management.jmxremote
2. Running /etc/init.d/jetty start, I can
see -Dcom.sun.management.jmxremote set from ps aux | grep java.
3. Run JConsole and connect to remote url using the
service:jmx:rmi://remote.hostname.com/jndi/rmi://localhost:1099/jettyjmx
-don
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users