Fiorano Logo  
     Fiorano Login 
Knowledge Base Home attachment If there are Attachments: Please click here to contact the Fiorano support team
JMX/RMI connection to Fiorano Servers across firewall
Problem: Cannot create JMX/RMI connection to Fiorano servers across firewall even after RMI connection port is unblocked.
Reason: While creating a connection JMX RMI connector opens two ports: one is for the RMI registry, which is fixed and known and other port is used to export JMX RMI connection objects. This second port is usually dynamically allocated at random. So problem occurs if server is behind a firewall as one of the connection ports is random it cannot be unblocked.
Solution:
This problem can be solved using a custom JVM agent which uses fixed and known ports for creating RMI connection.
newagent.jar: JAR for custom JVM agent.
Firewall.zip: Sources for custom JVM agent.
JMXAttributes.java: sample client code
This custom agent uses only one port for RMI connection so at firewall only one port needs to be unblocked to allow connections.
The changes needed in server.conf to use custom agent are as follows
  1. Copy newagent.jar on to your machine
  2. Say to ./extlib/jmx-rmi-firewall
  3. Add it to the classpath under <java.classpath>
  4. Say ../../../extlib/jmx-rmi-firewall/newagent.jar
  5. Add the port number to connect to the server through the firewall under <java.system.props>
  6. Say: example.rmi.agent.port=3024
  7. Add -javaagent:../../../extlib/jmx-rmi-firewall/newagent.jar below Enable RemoteDebugging options under <jvm.args>
  8. In the JMX client, the URL should be as follows
  9. JMXServiceURL address = new JMXServiceURL("service:jmx:rmi://"+serverIP+":"+rmiPort+"/jndi/rmi://"+serverIP+":"+rmiPort+"/jmxrmi");
References: http://blogs.sun.com/jmxetc/entry/connecting_through_firewall_using_jmx
Knowledge feedback
Please tell us, did you find the answer to your question?
    
ESB | JMS | SOA | MQ | Enterprise Service Bus | Java Message Service | Service Oriented Architecture |
Messaging Queue | Enterprise Messaging | SAP integration | SAP solutions | JMS performance | JMS server |
SOA platform
© Fiorano Software Technologies P Ltd. All Rights Reserved. Privacy Statement |Terms of Use
  Site Developed & Maintained by Fiorano Webteam.

 World Wide Support
 USA
:
+1-408-354-3210
 INDIA
:
+91 80 4017-0000
 UK
:
+44(0) 19328 95005