Thursday, May 14, 2009

Problem with ports-03 binding in JBoss 4.2

If you're setting up multiple instances of JBoss 4.2.x, you might run into this problem with the 3rd alternate configuration (ports-03).

There's a good writeup here for guidance on setting up multiple instances; I won't go into the motivation for doing it, let alone any details around how to do it here. I'll just assume you're reading this because you already know what I'm talking about - the topic at hand is already esoteric enough to require some prior knowledge, and I'd like to keep this post short.

When I set up a process to use the ports-03 binding, error messages appeared on deployment stating "Address already in use" for port 4446. Examining the binding-manager.xml file, I found that the service-config section that should override that default port was missing - and since my process using the default bindings was already running, the port conflict happened. Fix this by adding a copy of the "remoting connector" service-config section to the ports-03 configuration, changing the port to (e.g.) 7446, restart...and now you'll find that port 3873 has the same problem. Fix this by adding a copy of the "EJB3 Remoting Connector" section, changing the port to (e.g.) 4173, restart and you should be good to go.

3 comments:

  1. Thanks a million Gary!! We were facing this issue for a long period of time .

    YD

    ReplyDelete
  2. If this is a Windows server and you're running jboss as a service, you might want to edit the service.bat for each instance too so that the servers all have different names in the services control panel.

    ReplyDelete