Not binding to localhost by default in jboss-head was: Re: [jboss-dev] Clustering bootstrap still taking a long time

Adrian abrock at redhat.com
Thu Nov 8 11:24:53 EST 2007


I've fixed this in head.
http://jira.jboss.com/jira/browse/JBAS-4954

But I think the code in jboss-4.2 for the defaults for other
bind address is wrong.

It currently says:


      // JBAS-4119, set the java.rmi.server.hostname if not set
      if (System.getProperty("java.rmi.server.hostname") == null)
      {
         System.setProperty("java.rmi.server.hostname", "127.0.0.1");
      }

This has two problems:
1) It doesn't set the other bind addresses
2) It doesn't necessarily agree with what the real bind address is.

In fact, it doesn't resolve the problem I'm seeing because
it doesn't set the jgroups.bind.addr property.

In jboss-head I've made the code:

      // Fix up other bind addresses
      String bindAddress =
System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
      if (System.getProperty("java.rmi.server.hostname") == null)
         System.setProperty("java.rmi.server.hostname", bindAddress);
      if (System.getProperty("bind.address") == null)
         System.setProperty("bind.address", bindAddress);
      if (System.getProperty("jgroups.bind_addr") == null)
         System.setProperty("jgroups.bind_addr", bindAddress);

Dimitris, is there a reason why you didn't fixup all
the bind addresses (see the -b handling code) in 4.2?

On Thu, 2007-11-08 at 16:35 +0100, Adrian wrote:
> On Thu, 2007-11-08 at 09:22 -0600, Brian Stansberry wrote:
> > Is your server bound to your VPN interface?
> > 
> >  > GMS: address is 10.11.14.31:32796
> 
> Ok, then that reveals a different problem.
> If I add "-b localhost", I see:
> 
> 16:28:10,188 INFO  [STDOUT] 
> -------------------------------------------------------
> GMS: address is 127.0.0.1:32805
> -------------------------------------------------------
> 16:28:12,523 INFO  [STDOUT] 
> -------------------------------------------------------
> GMS: address is 127.0.0.1:32807
> -------------------------------------------------------
> 
> ...
> 
> 16:28:37,115 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.Beta3
> (build: SVNTag=JBoss_5_0_0_Beta3 date=200711081439)] Started in
> 1m:42s:463ms
> 
> Not great, but better! :-)
> 
> 
> However, "-b localhost" should be the default!
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list