Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
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
***@multisegment.com

508 579 2683 (cell)
508 845 5960 (voice)

------=_NextPart_000_0120_01C3E731.919CC510
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; CHARSET=UTF-8">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff size=2>This
should have been sent to the openjms-user list.</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff size=2>You
need to use the tcp connector rather than rmi, and</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2>configure the &lt;TcpConfiguration/&gt; element in
openjms.xml.</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2>E.g</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff size=2>&nbsp;
&lt;Connectors&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;Connector
scheme="tcp"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;ConnectionFactories&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;QueueConnectionFactory name="QueueConnectionFactory"
/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TopicConnectionFactory
name="TopicConnectionFactory" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/ConnectionFactories&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/Connector&gt;<BR>&nbsp;
&lt;/Connectors&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2>&nbsp;&nbsp; ...</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial><FONT color=#0000ff
size=2>&nbsp; &lt;ServerConfiguration
host="216.195.1.39"/&gt;</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2>&nbsp;&nbsp;&lt;TcpConfiguration
internalHost="192.168.0.2"/&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff size=2>See <A
href="http://openjms.sourceforge.net/config/reference.html#TcpConfiguration">http://openjms.sourceforge.net/config/reference.html#TcpConfiguration</A></FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff size=2>for
more details.</FONT></SPAN></DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2>-Tim</DIV>
<DIV></FONT></SPAN><SPAN class=729375301-30012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
openjms-developer-***@lists.sourceforge.net
[mailto:openjms-developer-***@lists.sourceforge.net]<B>On Behalf Of </B>Luke
P Immes<BR><B>Sent:</B> Wednesday, 28 January 2004 8:57 AM<BR><B>To:</B>
openjms-***@lists.sourceforge.net<BR><B>Subject:</B> [openjms-developer]
rmi port and firewall problems-- inside firewall is OK
send/receive<BR><BR></FONT></DIV>I am having difficulty connecting to jms
server from OUTSIDE of firewall. <BR>I have 2 computers behind a firewall,
192.168.0.2&nbsp; acting as receiver and has jms server. <BR>192.168.0.3&nbsp;
acts sender, for test. (Yes, I double checked these IP numbers-- they are
correct) <BR>Note that these IPs are not public to the internet at large, nor
should they be. <BR><BR>Netgear firewall, 192.168.0.1,&nbsp;&nbsp; maps:
incoming request on at 216.195.1.39&nbsp; on port 1099&nbsp; to 192.168.0.2
<BR>216.195.1.39&nbsp; is a public ip (mine), and web server works just fine,
to verify ip is valid. <BR>The mapping mechanism works just fine, because a
web server (/= jms) runs on 192.168.0.2, works <BR>as expected. The web server
host is listening on 192.168.0.2:8080. <BR><BR><BR>openjms.xml&nbsp; file
<BR>rmi configuration&nbsp;&nbsp;
192.168.0.3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port 1099 <BR><BR>From
command line, jms server starts up properly. <BR>Invoke and receiver program
which employs the code: <BR><BR>Hashtable env = new Hashtable();
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.INITIAL_CONTEXT_FACTORY,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
org.exolab.jms.jndi.InitialContextFactory.class.getName()&nbsp; );
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.PROVIDER_URL, "rmi://192.168.0.2:1099");
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR><BR>Invoke a sender program, outside of firewall (some computer other than
the 2 behind my firewall)&nbsp; which employs the code: <BR><BR>Hashtable env
= new Hashtable();
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.INITIAL_CONTEXT_FACTORY,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
org.exolab.jms.jndi.InitialContextFactory.class.getName()&nbsp; );
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.PROVIDER_URL, "rmi://216.195.1.39:1099");
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>connection refused from rmi host <BR><BR><BR>But note that, when sender
program is invoked on 192.168.0.2&nbsp; (within the firewall), receiver
responds to messages from the sender-- as expected. <BR>Also note, that when
firewall mapping is disabled, then receiver does not respond to sender-- as
<BR>expected. <BR>And clearly when the jms server is down, then the receiver
program gives and exception-- as <BR>expected. <BR><BR>So it is a firewall
issue of some sort. Any help would be appreciated. Mr. Mathews had a similar
<BR>problem. Thanks. <BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>Sincerely, <BR><BR>Multisegment, Inc. <BR>C/O Luke P. Immes,
President <BR>20 Williamsburg Court, suite 14 <BR>Shrewsbury, MA&nbsp;
01545 <BR><BR><A
href="http://www.multisegment.com">http://www.multisegment.com</A>
<BR><A href="mailto:***@multisegment.com">***@multisegment.com</A>
<BR><BR>508 579 2683 (cell) <BR>508 845 5960 (voice)
</TD></TR></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0120_01C3E731.919CC510--

Loading...