Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Help on JMX using JConsole

Hello,

I was able to get montoring through JConsole connecting to my local jetty server. Here's what I did: 1. Made sure that "jmx" is included in OPTIONS=Server,jsp,jmx,resources,websocket,ext in JETTY_HOME/start.ini.
2. Edited JETTY_HOME/start.ini to uncomment etc/jetty-jmx.xml.
3. Edited JETTY_HOME/etc/jetty-jmx.xml to uncomment the following lines:
 <Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
   <Arg type="java.lang.Integer">1099</Arg>
   <Call name="sleep" class="java.lang.Thread">
      <Arg type="java.lang.Integer">1000</Arg>
   </Call>
 </Call>

 <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" />
       <Arg type="java.lang.Integer">0</Arg>
<Arg type="java.lang.String">/jndi/rmi://localhost:1099/jettyjmx</Arg>
     </New>
   </Arg>
   <Arg>org.eclipse.jetty:name=rmiconnectorserver</Arg>
   <Call name="start" />
 </New>
4. Run "jconsole &" to start JConsole application.
5. Entered "localhost:1099" in the "Remote Process" text box and clicked "Connect". (Note that I did not enter any user name and password. How can I make this possible?).
6. I was able to connect properly.

But connecting to a remote server did not work for me. I followed the same configurations and verified that port 1099 is open and no firewall is blocking the connection. I also tried entering the JMX Remote URL value found in the jetty log file after a successful server startup but it still fails. Example of the URL is "service:jmx:rmi://myLocalDomainName/jndi/rmi://myDomainName:1099/jettyjmx" (note that I change <Arg type="java.lang.String">/jndi/rmi://localhost:1099/jettyjmx</Arg> from JETTY_HOME/etc/jetty-jmx.xml to <Arg type="java.lang.String">/jndi/rmi://myDomainName:1099/jettyjmx</Arg>). I also tried connecting using "myDomainName:1099" as input for the JConsole's Remote Process field but it still fails.

Any ideas?

Thanks in advance!
-don




Back to the top