[jboss-dev-forums] [Design of JBoss Transaction Services] - Re: Listen address of JBossTS ports not configurable

phufnag do-not-reply at jboss.com
Thu Apr 3 15:04:34 EDT 2008


anonymous wrote : JBossTS opens a bunch of network ports (three, I think, but debug output only mentions two) it listens on, but JBossTS does not give me the option to specify at which address it listens for connections.
  | 
  | As such, this is not a bug or error. However, standard practice in practically every single network listening software is to give the option for the administrator to specify at which address the software listens on. JBoss AS also gives this option, it even has a global system property jboss.bind.address, and every single service except JBossTS can be separately configured to listen on a particular address, and by default the services usually are configured to listen on ${jboss.bind.address}. 

I have to echo this sentiment, as far as configurability.  At present, we run WebSphere6 (on the machine base address), and jboss4.0/4.2 on secondary IP's on our systems (with the plan of migrating everything to jboss eventually).  While setting up 4.2 for migrating (4.0->4.2) for our apps, I'm also moving away from "IP per jvm" which we were doing for 4.0 (ugly, having to plumb a new IP for every jvm) to "port range per jvm" - every jboss 4.2 instance running on eth0:1, with a port range where 42009 would be AJP/JK, 42099/42098 for jnp/jndi, etc (420xx for that particular jvm - range of 100 ports 00-99 for each jvm, trying to keep the last 2 digits from the 'default' ports, and room for any new features that may creep in with future jboss releases).

The sticking point here is JbossTS/Arjuna, which doesn't allow a unique port to be assigned for a particular instance.   I've already had (just today) one new jvm we couldn't start, because TS on another instance "happened" to randomly grab port 44209 (which would be the AJP port for the new instance).  Had to bounce another app to get it to use a different port for TS, so I could start the new one.  Luckily still in our "QA" environment, because that would be *unacceptable* in a live production environment (to bounce a "live" running prod app, because its "random" port is preventing another from starting).

For now, I've set (linux):  net.ipv4.ip_local_port_range="49000 65000"
... to keep the "random" ports out of the way of other applications, however it would be far preferable to be able to specify the ports and keep them within the specified range for the particular jvm. 

(side note here, jboss portal had hardcoded 1100/1098/1099 ports in one of the XML files that had to change too - the assumption that every jvm will run on a unique IP with fixed ports based on ${jboss.bind.address} is really a bad one, yet seems to be a 'presumption' in most of the jboss packages - while an easy fix (one XML - where I replaced them with -D cmd line variables so we can map for each instance), the idea of being able to control port mappings at the least for *every* service can be very important, especially from a security/firewalling perspective.





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

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



More information about the jboss-dev-forums mailing list