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)

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_0009_01C3E98F.4C122AC0
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=917201602-02022004><FONT face=Arial color=#0000ff size=2>Did
you open up port 3030 and&nbsp;3035&nbsp;in your firewall?</FONT></SPAN></DIV>
<DIV><SPAN class=917201602-02022004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=917201602-02022004><FONT face=Arial color=#0000ff
size=2>-Tim</FONT></SPAN></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> Monday, 2 February 2004 10:47 AM<BR><B>To:</B>
openjms-***@lists.sourceforge.net<BR><B>Subject:</B> RE:
[openjms-developer] rmi port and firewall problems-- proposedsolution still
not working<BR><BR></FONT></DIV>Tim, <BR>Thank you for the new configuration.
This seems llike a good solution, and external ip and <BR>internal ip.&nbsp;
But, I tried this, and still <BR>"host refused" from sender <BR><BR>If I place
the receiver machine, outside of a firewall, at ip=<FONT color=#0000ff><FONT
size=2><I>216.195.1.39</FONT></FONT></I> <BR><FONT size=2>and sender is on
same cpu at Ip= </FONT><FONT color=#0000ff><FONT size=2><I>216.195.1.39.&nbsp;
</FONT></FONT></I><BR><FONT size=2>then sender and receiver code work as
expected.</FONT> <BR><FONT size=2>ip=localhost will work as well (as
expected).&nbsp; I have not been able to test when sender is a distinct public
IP, becasue</FONT> <BR><FONT size=2>I need access to one, furthermore my
webserver requires firewall configuration in order to work, which is how
another</FONT> <BR><FONT size=2>sender ( /= </FONT><FONT color=#0000ff><FONT
size=2><I>216.195.1.39) </FONT></FONT></I><BR><FONT size=2>can access sender
code (via java webstart).</FONT> <BR><FONT size=2></FONT><BR><FONT size=2>So,
what are my options? Run jms outside a firewall?&nbsp; </FONT><BR><FONT
size=2>Thanks for your time. Any help would be appreciated.
</FONT><BR><BR><BR>On Thu, 2004-01-29 at 21:04, Tim Anderson wrote:
<BLOCKQUOTE><FONT color=#737373><FONT size=3><I></FONT></FONT></I>
<BR><FONT color=#0000ff><FONT size=2><I>This should have been sent to the
openjms-user list.</FONT></FONT></I> <BR><FONT color=#737373><FONT
size=3><I>&nbsp;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>You need to use the tcp connector rather than rmi,
and</FONT></FONT></I> <BR><FONT color=#0000ff><FONT size=2><I>configure the
&lt;TcpConfiguration/&gt; element in openjms.xml.</FONT></FONT></I>
<BR><FONT color=#737373><FONT size=3><I>&nbsp;</FONT></FONT></I> <BR><FONT
color=#0000ff><FONT size=2><I>E.g</FONT></FONT></I> <BR><FONT
color=#0000ff><FONT size=2><I>&nbsp; &lt;Connectors&gt;</FONT></FONT></I>
<BR><FONT color=#0000ff><FONT size=2><I>&nbsp;&nbsp;&nbsp; &lt;Connector
scheme="tcp"&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;ConnectionFactories&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;QueueConnectionFactory name="QueueConnectionFactory"
/&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;TopicConnectionFactory name="TopicConnectionFactory"
/&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/ConnectionFactories&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&nbsp; &lt;/Connector&gt;</FONT></FONT></I> <BR><FONT
color=#0000ff><FONT size=2><I>&nbsp; &lt;/Connectors&gt;</FONT></FONT></I>
<BR><FONT color=#0000ff><FONT size=2><I>&nbsp;&nbsp; ...</FONT></FONT></I>
<BR><FONT color=#0000ff><FONT size=2><I>&nbsp; &lt;ServerConfiguration
host="216.195.1.39"/&gt;</FONT></FONT></I> <BR><FONT color=#0000ff><FONT
size=2><I>&nbsp;&nbsp;&lt;TcpConfiguration
internalHost="192.168.0.2"/&gt;</FONT></FONT></I> <BR><FONT
color=#737373><FONT size=3><I>&nbsp;</FONT></FONT></I> <BR><FONT
color=#0000ff><FONT size=2><I>See </FONT></FONT></I><A
href="http://openjms.sourceforge.net/config/reference.html#TcpConfiguration"><FONT
size=2><I>http://openjms.sourceforge.net/config/reference.html#TcpConfiguration</FONT></I></A>
<BR><FONT color=#0000ff><FONT size=2><I>for more details.</FONT></FONT></I>
<BR><FONT color=#737373><FONT size=3><I>&nbsp;</FONT></FONT></I> <BR><FONT
color=#0000ff><FONT size=2><I>-Tim</FONT></FONT></I> <BR><FONT
color=#737373><FONT size=3><I>&nbsp;</FONT></FONT></I>
<BLOCKQUOTE><FONT color=#737373><FONT size=2><I>-----Original
Message-----</FONT></FONT></I> <BR><FONT color=#737373><FONT
size=2><B><I>From:</FONT></FONT></B></I><FONT color=#737373><FONT
size=2><I> openjms-developer-***@lists.sourceforge.net
[mailto:openjms-developer-***@lists.sourceforge.net]</FONT></FONT></I><FONT
color=#737373><FONT size=2><B><I>On Behalf Of </FONT></FONT></B></I><FONT
color=#737373><FONT size=2><I>Luke P Immes</FONT></FONT></I> <BR><FONT
color=#737373><FONT size=2><B><I>Sent:</FONT></FONT></B></I><FONT
color=#737373><FONT size=2><I> Wednesday, 28 January 2004 8:57
AM</FONT></FONT></I> <BR><FONT color=#737373><FONT
size=2><B><I>To:</FONT></FONT></B></I><FONT color=#737373><FONT size=2><I>
openjms-***@lists.sourceforge.net</FONT></FONT></I> <BR><FONT
color=#737373><FONT size=2><B><I>Subject:</FONT></FONT></B></I><FONT
color=#737373><FONT size=2><I> [openjms-developer] rmi port and firewall
problems-- inside firewall is OK send/receive</FONT></FONT></I> <BR><FONT
color=#737373><FONT size=2><I></FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I></FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>I am having difficulty connecting to jms
server from OUTSIDE of firewall. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>I have 2 computers behind a firewall,
192.168.0.2&nbsp; acting as receiver and has jms server.
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>192.168.0.3&nbsp; acts sender, for test. (Yes, I double checked
these IP numbers-- they are correct) </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>Note that these IPs are not public to the
internet at large, nor should they be. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I></FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>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 </FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>216.195.1.39&nbsp; is a public ip (mine), and web server works
just fine, to verify ip is valid. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>The mapping mechanism works just fine,
because a web server (/= jms) runs on 192.168.0.2, works
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>as expected. The
web server host is listening on 192.168.0.2:8080.
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>openjms.xml&nbsp; file </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>rmi configuration&nbsp;&nbsp;
192.168.0.3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port 1099
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>From
command line, jms server starts up properly. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>Invoke and receiver program which employs
the code: </FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>Hashtable env = new Hashtable(); </FONT></FONT></I><BR><FONT
color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.INITIAL_CONTEXT_FACTORY, </FONT></FONT></I><BR><FONT
color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
org.exolab.jms.jndi.InitialContextFactory.class.getName()&nbsp; );
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.PROVIDER_URL, "rmi://192.168.0.2:1099");
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>Invoke
a sender program, outside of firewall (some computer other than the 2
behind my firewall)&nbsp; which employs the code:
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>Hashtable env = new Hashtable(); </FONT></FONT></I><BR><FONT
color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.INITIAL_CONTEXT_FACTORY, </FONT></FONT></I><BR><FONT
color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
org.exolab.jms.jndi.InitialContextFactory.class.getName()&nbsp; );
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
env.put(Context.PROVIDER_URL, "rmi://216.195.1.39:1099");
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>connection
refused from rmi host </FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>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.
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>Also note, that
when firewall mapping is disabled, then receiver does not respond to
sender-- as </FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>expected. </FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>And clearly when the jms server is down, then the receiver
program gives and exception-- as </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>expected. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I></FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>So it is a firewall issue of some sort. Any
help would be appreciated. Mr. Mathews had a similar
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>problem. Thanks.
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR></TR>
<TR></TR>
<TR>
<TD><FONT color=#737373><FONT size=3><I>Sincerely,
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I>Multisegment, Inc. </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>C/O Luke P. Immes, President
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>20
Williamsburg Court, suite 14 </FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>Shrewsbury, MA&nbsp; 01545
</FONT></FONT></I><BR><FONT color=#737373><FONT
size=3><I></FONT></FONT></I><BR><A
href="http://www.multisegment.com"><FONT
size=3><I>http://www.multisegment.com</FONT></I></A> <BR><A
href="mailto:***@multisegment.com"><FONT
size=3><I>***@multisegment.com</FONT></I></A> <BR><FONT
color=#737373><FONT size=3><I></FONT></FONT></I><BR><FONT
color=#737373><FONT size=3><I>508 579 2683 (cell)
</FONT></FONT></I><BR><FONT color=#737373><FONT size=3><I>508 845
5960 (voice)
</FONT></FONT></I></TD></TR></TBODY></TABLE></BLOCKQUOTE></BLOCKQUOTE>
<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_0009_01C3E98F.4C122AC0--

Loading...