-
1. Re: Setting bind_addr after using -b startup option
brian.stansberry May 29, 2006 4:35 PM (in response to annecotter)You'll need to upgrade your jgroups.jar to version 2.2.8 or later. Then, when you start JBoss, pass in system property ignore.bind.address, e.g.
./run.sh -b 192.168.1.10 -Dignore.bind.address=true
JGroups will check for the system property, and if "true" will ignore the -b switch and use whatever value you set the bind_addr attribute to in your TCP config. -
2. Re: Setting bind_addr after using -b startup option
annecotter May 29, 2006 4:47 PM (in response to annecotter)Thank you for the fast response!
Unfortunately, upgrading my version of JGroups is not as easy as it sounds. If you have any suggestions that would work with Jboss 4.0.2/JGroups 2.2.7, it would be much appreciated. (Possibly even another way to define the jboss.bind.address ... setting it using an environment variable or -D doesn't do the trick with 4.0.2)
Anne -
3. Re: Setting bind_addr after using -b startup option
brian.stansberry May 29, 2006 5:12 PM (in response to annecotter)What happens if you try:
org.jboss.Main.main(new String[] {"-b10.10.1.1", "-Dbind.address=192.168.2.1"});
Be sure the -D comes after the -b. This may not work if the code that processes the args puts the args in a predetermined order. Looking at org.jboss.Main it's not clear if it does or not.
This relies on the fact the for historical reasons JGroups actually uses property bind.address rather than jboss.bind.address. org.jboss.Main sets both properties based on the -b switch. But, if it processes -Dbind.address after it processes -b, then your -D config will override the -b one. -
4. Re: Setting bind_addr after using -b startup option
brian.stansberry May 29, 2006 6:32 PM (in response to annecotter)My laptop is bound to 2 networks, and I just tried
run -c all -b 172.31.90.207 -Dbind.address=192.168.90.164
and it worked :-)
run -c all -Dbind.address=192.168.90.164 -b 172.31.90.207
left JGroups bound to 172.31.90.207, so order is important. -
5. Re: Setting bind_addr after using -b startup option
annecotter May 30, 2006 10:49 AM (in response to annecotter)That seems to be exactly what I needed, thanks Brian!
Anne