]
Brian Stansberry updated JBAS-5581:
-----------------------------------
Workaround Description:
Good workaround: Use -Djgroups.bind_addr instead of the long ago deprecated
-Dbind.address
Less good workaround: Pass -Dbind.address in the command line rather than in run.conf
was:Pass -Dbind.address in the command line rather than in run.conf
Setting jgroups.bind_address or bind.address in run.conf will be
ignored if -b used
-----------------------------------------------------------------------------------
Key: JBAS-5581
URL:
https://jira.jboss.org/jira/browse/JBAS-5581
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: JBossAS-4.2.2.GA, JBossAS-5.0.0.Beta4
Reporter: Galder ZamarreƱo
Assignee: Galder ZamarreƱo
Priority: Minor
* Why it it useless specifying -Dbind.address=192.168.0.1 inside run.conf?
Why does it work only specifying it on command line?
For example:
If you set -Dbind.address=127.0.0.1 in run.conf and starting AS with:
./bin/run.sh -b 10.33.144.245
The value assigned to -Dbind.address will be ignored.
When you pass -Dbind.address in the command line, JBoss sets
both this system property and -Djgroups.bind_address to that value, which
means that if you pass -b after that, it won't override the given
-Dbind.address. Bottom line, if -Dbind.address set in command line before
-b, it's the winner. Example:
./bin/run.sh -Dbind.address=127.0.0.1 -b 1.2.3.4
-> JGroups will bind to 127.0.0.1
If you pass -b in the command line before -Dbind.address, -b will first
set -Dbind.address and -Djgroups.bind_address, but then, when
-Dbind.address is process, it will override the values of them two with
what was passed in -Dbind.address
./bin/run.sh -b 1.2.3.4 -Dbind.address=127.0.0.1
-> JGroups will bind to 127.0.0.1
Now, This does not happen when the -Dbind.address is set in run.conf
instead of command line. There's a bug here. When AS processes -b,
it checks whether -Dbind.address has been set, which it has, so leaves
it as it is. Now, when it checks -Djgroups.bind_address, it sees that it hasn't
been set, but *does not do a double check in case -Dbind.address has been set*,
so it ends up setting -Djgroups.bind_address to the value of -b, that way ignoring
the value you passed to -Dbind.address. Example:
run.conf with -Dbind.address=127.0.0.1
./bin/run.sh -b 1.2.3.4
-> JGroups will bind to 1.2.3.4
What's the fix? Add the double check in -b processing so that if -Dbind.address was
set by the user, AS does not take the value of -b and assign to -Djgroups.bind_addr
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: