Firewall configuration between JMS client and JMS broker

My JMS client can not connect to JMS server if

there is a firewall between them. Anyone has

any idea? Do I need special configuration?

(Note: If there is no firewall between, everything is fine).

Here is my environment:

=================================

I installedMQ3.5 (Build 340-R) on Windows 2000 Server, and use the default port 7676.

There is a firewall configured between my JMS server

and JMS client ( client also run from a windows 2000

machine).

the firewall configuration as:

93 3944 ACCEPTtcp -- eth0*172.25.238.139172.17.2.36tcp dpt:7676

75 4800 ACCEPTtcp -- vlan01 *172.17.2.36 172.25.238.139tcp spt:7676

00 ACCEPTtcp -- eth0*172.25.238.139172.17.2.36tcp dpt:443

00 ACCEPTtcp -- vlan01 *172.17.2.36 172.2.238.139tcp spt:443

(note: 172.25.238.139 is my JMS client, and

172.27.2.36 is my JMS server).

My client did the following JMS initialization:

try

{

Hashtable objEnvironment = new Hashtable();

objEnvironment.put (Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");

objEnvironment.put (Context.PROVIDER_URL,objectStoreURL);

i_jndiContext = new InitialContext(objEnvironment);

i_topicConnectionFactory = (TopicConnectionFactory) i_jndiContext.lookup("TopicConnectionFactory");

i_topicConnection = i_topicConnectionFactory.createTopicConnection();

i_topicSession = i_topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

i_topicConnection.start();

}

.....

When I run my JMS client, I got the following error:

strURL: <file:///c:/JMS/object_store>

init(): JMS Exception occurred: javax.jms.JMSException: [C4003]: Error occurred

on connection creation. - caught java.net.ConnectException

[1884 byte] By [junkai_xie] at [2007-11-25 17:02:35]
# 1

When you make a connection to the MQ broker, you go

to two different ports (although this can be checked)

* first you go to the portmapper on the known port (7676)

* then you make a connection to the port which is

running the jms service (which comes up on a

system selected port by default)

To have this work through a firewall, you need to:

set up the jms service to come up on a known

port by setting the:

imq.jms.tcp.port

property. For details see the admin doc:

http://docs.sun.com/source/817-3727/imq_sys.html#wp997499

That port then needs to be opened in the firewall

You have the choice to either:

* open both the portmapper and the jms port in the

firewall

OR

* open only the jms port (and configure the system to

not use the portmapper)

If you want to do the second, see the client guide for a

discussion on the syntax to do this

http://docs.sun.com/source/817-3728/runtime.html#wp26987

lk_schneider at 2007-7-3 0:13:40 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...
# 2
Thanks, I now get it working after enabling theJMS service port.
junkai_xie at 2007-7-3 0:13:40 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...