In this week's exciting new episode: Jonathan breaks the AS cluster tests...
The clustering test mechanism does not use SBM, but rather uses the same default port set
but with each server bound to a different IP using the '-b' option. This is fine
for the JBossTS ports that bind to the same IP as the server.
The socketProcessId listener binds to localhost/127.0.0.1 regardless of the address used
by the server. That's intentional - all instances on the same machine must use the
same address to guarantee that the port number is uniq, which is what the service is
trying to achieve.
When using the SBM with a fixed port value (4714) for the socketProccessId, the SBM
offsets the value (4814, 4914, etc) for additional instances and you don't get a port
conflict. When using the '-b' instead the same port number is used and things
break.
Options:
- Use a value of '0', which tells the socketProcessId to use a random free port.
Upside: probably the easiest fix, since it's a one line change in bindings.xml
Downside: odd semantic change when 0 is offset (100, 200, etc) by the SBM - it's now
fixed no longer random. The offset would also need to be greater that 1024 or you wind up
trying to bind low numbered ports.
- Use the retry mechanism that tells socketProcessId to try consecutive ports counting up
from the specified one until it finds a free one. This is disabled by default as I
don't particularly like it. IMO if something is using the specified port that's an
error that should be brought to the user's attention, not silently worked around.
Upside: a relatively minor config change. Downside: the AS now uses an unpredictable set
of ports, which some users won't like.
- Use an alternative implementation to get a uniq number. We have a file lock based one
too for example. Getting the process ID for the JVM would also work, if there was some
clean way to do it without resorting to native code.
- Change clustering tests to use the SBM. Of course this ignores the fact that customers
may also want to run multiple servers using '-'b'. How common is that and will
they tolerate having to make a config file change to do it?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179745#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...