JMS client behind a firewall reporting internal IP
s2jcpete Jul 8, 2004 7:42 PMHello all,
I'm having an issue getting a client, which is behind a firewall, to connect to a server which isn't. The connection is made okay, but JBoss (3.2.1) is reporting the clients internal IP address and is timing out when trying to establish the "ConnectionReciever/Server"
2004-07-08 19:19:43,554 ERROR [org.jboss.mq.il.oil.OILClientIL] Cannot connect to the ConnectionReceiver/Server java.net.NoRouteToHostException: No route to host at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at java.net.Socket.<init>(Socket.java:291) at java.net.Socket.<init>(Socket.java:147) at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:175) at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java:156) at org.jboss.mq.il.oil.OILClientIL.close(OILClientIL.java:72) at org.jboss.mq.server.JMSDestinationManager.connectionClosing(JMSDestinationManager.java:578) at org.jboss.mq.server.JMSServerInterceptorSupport.connectionClosing(JMSServerInterceptorSupport.java:112) at org.jboss.mq.security.ServerSecurityInterceptor.connectionClosing(ServerSecurityInterceptor.java:61) at org.jboss.mq.server.TracingInterceptor.connectionClosing(TracingInterceptor.java:158) at org.jboss.mq.server.JMSServerInvoker.connectionClosing(JMSServerInvoker.java:114) at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:263) at java.lang.Thread.run(Thread.java:536)
I'm a little at a loss as what to do here. Here is the sample code I'm trying to establish a connection with:
InitialContext iniCtx = this.getContext(); Object tmp = iniCtx.lookup("ConnectionFactory"); TopicConnectionFactory tcf = (TopicConnectionFactory) tmp; conn = tcf.createTopicConnection(); topic = (Topic) iniCtx.lookup("topic/Logs"); session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE); conn.start();
and getting the context is:
public InitialContext getContext() throws NamingException{ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.setProperty("java.naming.provider.url", "xxx.xxx.xxx.xxx:1099"); env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming"); return new InitialContext(env); }
This is just a sample that I am trying to get to run. The server throws its exception after
session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
Any help would be greatly appreciated
Thanks in advance,
-Jay