[jboss-user] [Messaging, JMS & JBossMQ] - Problem with JMS behind firewall

NickDeGraeve do-not-reply at jboss.com
Tue May 8 06:03:11 EDT 2007


When our client application tries to create a topic connection it times out.

We have a JBoss server on a machine on the local LAN and it is separated from the Internet by a router/firewall. On the router following ports are forwarded to the local IP address of the JBoss server: 1098, 1099, 4444, 8080 & 8093.

I started the server with -Djava.rmi.server.hostname=mail.fpc.be -Djava.rmi.server.useLocalHostname=false

However, in the JBoss MQ logging on the client I see "Connecting with addr=192.168.254.6, port=8093, localAddr=null", and that's the local LAN IP address.

Any idea on what is configured incorrectly?

Stacktrace :
com.fpc.nokeos.core.common.exceptions.NokeosRuntimeException: Er is een systeem fout opgetreden.<br>Gelieve de NoKeossysteemadministrator te contacteren. 
  |     at com.fpc.nokeos.core.common.jms.ConnectionFactory.<clinit>(ConnectionFactory.java:34)
  |     ... 14 more
  | Caused by: org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.Con
  | nectException : Connection timed out: connect)
  |     at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:78)
  |     at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:63)
  |     at org.jboss.mq.Connection.authenticate (Connection.java:1069)
  |     at org.jboss.mq.Connection.<init>(Connection.java:252)
  |     at org.jboss.mq.Connection.<init>(Connection.java:323)
  |     at org.jboss.mq.SpyConnection.<init>(SpyConnection.java :116)
  |     at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
  |     at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:118)
  |     at com.fpc.nokeos.core.common.jms.ConnectionFactory .<clinit>(ConnectionFactory.java:31)
  |     ... 14 more
  | Caused by: java.net.ConnectException: Connection timed out: connect
  |     at java.net.PlainSocketImpl.socketConnect(Native Method)
  |     at java.net.PlainSocketImpl.doConnect (Unknown Source)
  |     at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
  |     at java.net.PlainSocketImpl.connect(Unknown Source)
  |     at java.net.SocksSocketImpl.connect(Unknown Source)
  |     at java.net.Socket.connect (Unknown Source)
  |     at java.net.Socket.connect(Unknown Source)
  |     at java.net.Socket.<init>(Unknown Source)
  |     at java.net.Socket.<init>(Unknown Source)
  |     at javax.net.DefaultSocketFactory.createSocket (Unknown Source)
  |     at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:670)
  |     at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:558)
  |     at org.jboss.mq.il.uil2.UILServerIL.authenticate (UILServerIL.java:360)
  |     at org.jboss.mq.Connection.authenticate(Connection.java:1065)
  |     ... 20 more
Additional logging on JBoss MQ:2007-05-08 11:25:15,859 - DEBUG: [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference
  | 2007-05-08 11:25:15,953 - DEBUG: [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory[server=org.jboss.mq.il.uil2.UILServerIL at 1343ed0 connectionProperties={ClientILService=org.jboss.mq.il.uil2.UILClientILService, UIL_TCPNODELAY_KEY=yes, UIL_CHUNKSIZE_KEY=1000000, UIL_CONNECTADDRESS_KEY=null, UIL_CONNECTPORT_KEY=0, UIL_SOTIMEOUT_KEY=120000, UIL_RECEIVE_REPLIES_KEY=No, UIL_ADDRESS_KEY=192.168.254.6, UIL_PORT_KEY=8093, PingPeriod=60000, UIL_BUFFERSIZE_KEY=2048}]
  | 2007-05-08 11:25:15,984 - DEBUG: [org.jboss.mq.Connection] Setting the clockDaemon's thread factory
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Connection Initializing userName=null Connection at 9492714[clientID=null rcvstate=STOPPED]
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Getting the serverIL Connection at 9492714[clientID=null rcvstate=STOPPED]
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] serverIL=org.jboss.mq.il.uil2.UILServerIL at 19113f8 Connection at 9492714[clientID=null rcvstate=STOPPED]
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.Connection] Authenticating user null Connection at 9492714[clientID=null rcvstate=STOPPED]
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Begin connect loop, maxRetries=10, delay=0
  | 2007-05-08 11:25:16,000 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory at 542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
  | 2007-05-08 11:25:37,062 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Begin connect loop, maxRetries=10, delay=0
  | 2007-05-08 11:25:37,062 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory at 542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
  | 2007-05-08 11:25:58,187 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Failed to connect, retries=1
  | java.net.ConnectException: Connection timed out: connect
  | 	at java.net.PlainSocketImpl.socketConnect(Native Method)
  | 	at java.net.PlainSocketImpl.doConnect(Unknown Source)
  | 	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
  | 	at java.net.PlainSocketImpl.connect(Unknown Source)
  | 	at java.net.SocksSocketImpl.connect(Unknown Source)
  | 	at java.net.Socket.connect(Unknown Source)
  | 	at java.net.Socket.connect(Unknown Source)
  | 	at java.net.Socket.<init>(Unknown Source)
  | 	at java.net.Socket.<init>(Unknown Source)
  | 	at javax.net.DefaultSocketFactory.createSocket(Unknown Source)
  | 	at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:670)
  | 	at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:558)
  | 	at org.jboss.mq.il.uil2.UILServerIL.connectionClosing(UILServerIL.java:403)
  | 	at org.jboss.mq.Connection.<init>(Connection.java:264)
  | 	at org.jboss.mq.Connection.<init>(Connection.java:323)
  | 	at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
  | 	at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
  | 	at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:118)
  | 	at com.fpc.nokeos.core.common.jms.ConnectionFactory.<clinit>(ConnectionFactory.java:31)
  | 	at com.fpc.nokeos.core.client.launch.Launcher$Licensor.<init>(Launcher.java:491)
  | 	at com.fpc.nokeos.core.client.launch.Launcher.doLogin(Launcher.java:145)
  | 	at com.fpc.nokeos.core.client.launch.Launcher.main(Launcher.java:134)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
  | 	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
  | 	at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
  | 	at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
  | 	at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
  | 	at com.sun.javaws.Launcher.run(Unknown Source)
  | 	at java.lang.Thread.run(Unknown Source)
  | 2007-05-08 11:25:58,187 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Connecting with addr=192.168.254.6, port=8093, localAddr=null, localPort=0, socketFactory=javax.net.DefaultSocketFactory at 542529, enableTcpNoDelay=true, bufferSize=2048, chunkSize=1000000
  | 2007-05-08 11:26:19,296 - TRACE: [org.jboss.mq.il.uil2.UILServerIL] Failed to connect, retries=2
  | java.net.ConnectException: Connection timed out: connect
  | [...]

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043873#4043873

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043873



More information about the jboss-user mailing list