*
The moose likes JBoss/WildFly and the fly likes Unable to connect to JMS Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to connect to JMS Server " Watch "Unable to connect to JMS Server " New topic
Author

Unable to connect to JMS Server

Larry Olson
Ranch Hand

Joined: Feb 03, 2009
Posts: 142
Hi,

I am using a jms client on one machine A to connect to the jboss based jms server running on another machine (both linux boxes). But I am getting the following exception/error when trying to do this. Please note that I am able to verify that I could connect to the same jms server from a jms client on a different machine B. So I hope nothing is wrong on the server side.

I could also verify that I am able to telnet from client A to the jms server on ports 443, 1099, 4457, 8083 etc. So at least this doesn't seem to be a port related issue. Googling the exception/error hasn't given me much clues. I would appreciate if any fellow ranchers have any ideas about what might be the root cause of the following error and the possible resolution. Thanks much.

Below is the exception (I replaced the real ip address by xxx.xxx.xxx.xx):



Also I am providing below some messages on the jboss server log. Not sure if these messages on the jboss server log and the above exception on the client side are directly related, but I am providing it just in case someone could make a connection:



Thanks a lot for your help.
Larry Olson
Ranch Hand

Joined: Feb 03, 2009
Posts: 142
Hmm, there hasn't been a response to this - but fortunately I have figured out the solution to this problem.

I had to openup the firewall for the client machine to be able to connect to port 54443 on the jms/jboss server. This I figured wen I saw the client hanging after a SYN_SENT trying to connect to port 54443 on the server (could also confirm that the jms server was listening on that port). Strangely enough this port 54443 requirement doesn't seem to have been documented anywhere (as far as I have Googled).

Hope this would be of help for someone who might be stuck with the same issue.
Larry Olson
Ranch Hand

Joined: Feb 03, 2009
Posts: 142
Hmm, I think I jumped to conclusion too quickly on that one. After another restart of jboss, I figured that the thrid port jboss/jms listens to (other than the two fixed ports which are 443 and 4457) changes everytime after a jboss restart and its value is unpredictable. For example once it listened on 54443. After restarting it listened to on 17926. After another restart it is listening on 14435. I am sure yet another restart means it would listen on yet another port. This means if the client is firewalled, its configuration needs to be changed (everytime after the jboss restart) to connect to a different thrid port everytime. This is a big pain.

Does anyone have any idea about why the jms/jboss process listens to a different (third) port everytime after the jboss restart and if there would be a way to configure/fix this? As I mentioned before the other two ports are fixed, namely 443 and 4457.

Thanks a lot.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

The initial JMS ports exist only to enable a JMS connection to be made. Once a JMS connection is made, it receives it own randomly-selected available port. All message traffic takes place on that port.

Which version of JBoss AS are you using?


JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to connect to JMS Server