0

at jboss start up we are providing option -b 0.0.0.0 like below

run.sh -c web -b 0.0.0.0

can any body explain why do we need to provide this?

with out this (-b) option my application deployment is failling.

I have googled this not able find proper explanation.

EDIT In the run script instead of 0.0.0.0 i have send {MyPcIp}.

Deplyment Error

2013-03-28 05:21:32,263 INFO  [org.jboss.web.WebService] (main) Using RMI server codebase: http://{MyPcIp}:8083/
2013-03-28 05:21:32,266 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
java.lang.Exception: Port 8083 already in use.
        at org.jboss.web.WebServer.start(WebServer.java:233)
        at org.jboss.web.WebService.startService(WebService.java:322)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
2013-03-28 05:21:32,277 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfsfile:/home/bnw/jboss-eap-5.0/jboss-as/server/web/conf/jboss-service.xml state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying: jboss:service=WebService
        at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
NPKR
  • 5,368
  • 4
  • 31
  • 48

2 Answers2

1

That argument tells the server to listen on all interfaces instead of just the default (probably 127.0.0.1). But that isn't the problem here.

It seems like your configured port is already in use, so it allows you to listen on 0.0.0.0 instead of the default interface. However, this is not the right way to fix things, because connections to port 8083 may be accepted by different servers depending on the specific interface used. You should figure out why your application is attempting to listen on 8083 twice, or why there is a server already bound to that port.

Andrew Mao
  • 35,740
  • 23
  • 143
  • 224
0

-b 0.0.0.0 is specifying that you'd like you JBoss to bind into the network interface 0.0.0.0 (aka "all available interface"), as opposed of using whatever default configured

The fact that JBoss fails to start unless you use this indicates the default points to some network interface which is nonexistent / already being bound by something else

Or your app expects JBoss to binds to all network interfaces -- but since it's no longer the case hence it fails

gerrytan
  • 40,313
  • 9
  • 84
  • 99