[
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 don't know about jconsole I never tried it. Make sure the host you are
using is valid and client mashine can resolve it. See that those ports are
open on the target mashine. Test the connectivity with some tool like
TCPping. If connectivity is ok, try to enable JMX debug in jetty (I don't
know how) or in Jconsole. Maybe jconsole does not understand the URL
properly? And finally, wait and pray for help from jetty developers.
Although I did not get any up to this point :)
I now run VisualVm locally and monitor it with remote desktop. That
solutions is much more secure and convenient, because JMX can manipulate the
server and I was unable to secure it as I mentioned before. I don't even
know how to use login credentials to JMS in Jetty, it should be possible,
but no mention of it anywhere.
Best Regards
--------------------------------------------------
From: "Don Santillan" <donzymeth@xxxxxxxxx>
Sent: Tuesday, August 24, 2010 2:02 PM
To: "JETTY user mailing list" <jetty-users@xxxxxxxxxxx>
Subject: Re: [jetty-users] Jetty 7 and JMX Console JConsole help
Hello,
Thank you for the info. Your solution makes sense but it still won't work
on my end.
I also have already opened up all the ports on my firewall just to make
this to work but it still doesn't work.
Here's my new service URL from startup jetty log:
service:jmx:rmi://remote.hostname.com:1799/jndi/rmi://remote.hostname.com:1099/jettyjmx
Is there a configuration in jetty where I should set the
remote.hastname.com? Maybe I should set my "remote.hostname.com" name in
jetty for this to work?
-don
Boris Hamanov wrote:
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
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users