RE: rmi port and firewall problems-- inside firewall is OK send/receive

"Tim Anderson" <tandersn-bzGI/[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
This should have been sent to the openjms-user list.

You need to use the tcp connector rather than rmi, and
configure the <TcpConfiguration/> element in openjms.xml.

E.g
  <Connectors>
    <Connector scheme="tcp">
      <ConnectionFactories>
        <QueueConnectionFactory name="QueueConnectionFactory" />
        <TopicConnectionFactory name="TopicConnectionFactory" />
      </ConnectionFactories>
    </Connector>
  </Connectors>
   ...
  <ServerConfiguration host="216.195.1.39"/>
  <TcpConfiguration internalHost="192.168.0.2"/>

See http://openjms.sourceforge.net/config/reference.html#TcpConfiguration
for more details.

-Tim

  -----Original Message-----
  From: openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of Luke P Immes
  Sent: Wednesday, 28 January 2004 8:57 AM
  To: openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
  Subject: [openjms-developer] rmi port and firewall problems-- inside firewall is OK send/receive


  I am having difficulty connecting to jms server from OUTSIDE of firewall. 
  I have 2 computers behind a firewall, 192.168.0.2  acting as receiver and has jms server. 
  192.168.0.3  acts sender, for test. (Yes, I double checked these IP numbers-- they are correct) 
  Note that these IPs are not public to the internet at large, nor should they be. 

  Netgear firewall, 192.168.0.1,   maps: incoming request on at 216.195.1.39  on port 1099  to 192.168.0.2 
  216.195.1.39  is a public ip (mine), and web server works just fine, to verify ip is valid. 
  The mapping mechanism works just fine, because a web server (/= jms) runs on 192.168.0.2, works 
  as expected. The web server host is listening on 192.168.0.2:8080. 


  openjms.xml  file 
  rmi configuration   192.168.0.3        port 1099 

  From command line, jms server starts up properly. 
  Invoke and receiver program which employs the code: 

  Hashtable env = new Hashtable(); 
              env.put(Context.INITIAL_CONTEXT_FACTORY, 
              org.exolab.jms.jndi.InitialContextFactory.class.getName()  ); 
              env.put(Context.PROVIDER_URL, "rmi://192.168.0.2:1099"); 
             

  Invoke a sender program, outside of firewall (some computer other than the 2 behind my firewall)  which employs the code: 

  Hashtable env = new Hashtable(); 
              env.put(Context.INITIAL_CONTEXT_FACTORY, 
              org.exolab.jms.jndi.InitialContextFactory.class.getName()  ); 
              env.put(Context.PROVIDER_URL, "rmi://216.195.1.39:1099"); 
             
  connection refused from rmi host 


  But note that, when sender program is invoked on 192.168.0.2  (within the firewall), receiver responds to messages from the sender-- as expected. 
  Also note, that when firewall mapping is disabled, then receiver does not respond to sender-- as 
  expected. 
  And clearly when the jms server is down, then the receiver program gives and exception-- as 
  expected. 

  So it is a firewall issue of some sort. Any help would be appreciated. Mr. Mathews had a similar 
  problem. Thanks. 


        Sincerely, 

        Multisegment, Inc. 
        C/O Luke P. Immes, President 
        20 Williamsburg Court, suite 14 
        Shrewsbury, MA  01545 

        http://www.multisegment.com 
        [email protected] 

        508 579 2683 (cell) 
        508 845 5960 (voice)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.