title: JBoss 5.1 binds to host address while run in vserver with -b <guest address>
body: <p>while starting JBoss 5.1.0.GA in virtual server machine on Debian (linux-VServer technology) I get the following error:</p>
  
  <p><code>
  ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.remoting:protocol=rmi,service=JMXConnectorServer state=Create mode=Manual requiredState=Installed
  java.io.IOException: Cannot bind to URL [rmi://10.1.2.11:1090/jmxconnector]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
          java.rmi.AccessException: Registry.Registry.bind disallowed; origin /AA.BB.CC.DD is non-local host]
  </code></p>
  
  <p>where AA.BB.CC.DD is host machine name, 10.1.2.11 is vserver guest with JBoss and JBoss is started with -b 10.1.2.11 (I also tried -Djboss.bind.address=10.1.2.11 - the same result).</p>
  
  <p>10.1.2.11 is bound to dummy2 interface on host (serving 10.1.2.1 network).</p>
  
  <p>The root exception is strange - why JBoss wants to bind to host address AA.BB.CC.DD? There were no problems with 4.2.3.GA on the same machine, also started with -b 10.1.2.11.</p>
  
  <p>It starts correctly when no params present - binds to localhost and everything is ok, but it MUST be bound to 10.1.2.11 to be visible by Apache on another vserver guest, acting as proxy.</p>
  
  <p>I thought that it can be fixed by setting net.ipv4.conf.all.promote_secondaries=1 via sysctl (was 0) but it didn't help much.</p>
  
  <p>Has anyone had such problem?</p>
  
  <p>Regards,
  bart</p>