6 Replies Latest reply on Feb 26, 2010 5:26 AM by Romy Baba

    ServiceBindingManager in Jboss5

    venu gopal Newbie

      Hi ,

      I would like to setup 2 instances of Jboss5 on the same machine which does not have multiple IP addresses.

      My bindings.xml is like this:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
      
       <classloader><inject bean="bindings-classloader:0.0.0"/></classloader>
      
       <classloader name="bindings-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
       <root>${jboss.common.lib.url}jboss-bindingservice.jar</root>
       </classloader>
      
       <bean name="ServiceBindingManager" class="org.jboss.services.binding.ServiceBindingManager">
      
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.system:service=ServiceBindingManager", exposedInterface=org.jboss.services.binding.ServiceBindingManagerMBean.class, registerDirectly=true)</annotation>
      
       <constructor>
       <!-- The name of the set of bindings to use for this server -->
       <parameter>${jboss.service.binding.set:ports-default}</parameter>
      
       <!-- The named sets of bindings -->
       <parameter>
       <bean name="ServiceBindingStore" class="org.jboss.services.binding.impl.PojoServiceBindingStore">
      
       <!-- Base bindings that are used to create bindings for each set -->
       <property name="standardBindings"><inject bean="StandardBindings"/></property>
      
       <!-- The sets of bindings -->
       <property name="serviceBindingSets">
       <set>
       <inject bean="PortsDefaultBindings"/>
       <inject bean="Ports01Bindings"/>
       <inject bean="Ports02Bindings"/>
       <inject bean="Ports03Bindings"/>
       </set>
       </property>
       </bean>
       </parameter>
       </constructor>
      
       </bean>
      
       <!-- The ports-default bindings are obtained by taking the base bindings and adding 0 to each port value -->
       <bean name="PortsDefaultBindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
       <constructor>
       <!-- The name of the set -->
       <parameter>ports-default</parameter>
       <!-- Default host name -->
       <parameter>${jboss.bind.address}</parameter>
       <!-- The port offset -->
       <parameter>0</parameter>
       <!-- Set of bindings to which the "offset by X" approach can't be applied -->
       <parameter><null/></parameter>
       </constructor>
       </bean>
      
       <!-- The ports-01 bindings are obtained by taking the base bindings and adding 100 to each port value -->
       <bean name="Ports01Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
       <constructor>
       <!-- The name of the set -->
       <parameter>ports-01</parameter>
       <!-- Default host name -->
       <parameter>${jboss.bind.address}</parameter>
       <!-- The port offset -->
       <parameter>100</parameter>
       <!-- Set of bindings to which the "offset by X" approach can't be applied -->
       <parameter><null/></parameter>
       </constructor>
       </bean>
      
       <!-- The ports-02 bindings are obtained by taking ports-default and adding 200 to each port value -->
       <bean name="Ports02Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
       <constructor>
       <!-- The name of the set -->
       <parameter>ports-02</parameter>
       <!-- Default host name -->
       <parameter>${jboss.bind.address}</parameter>
       <!-- The port offset -->
       <parameter>200</parameter>
       <!-- Set of bindings to which the "offset by X" approach can't be applied -->
       <parameter><null/></parameter>
       </constructor>
       </bean>
      
       <!-- The ports-03 bindings are obtained by taking ports-default and adding 300 to each port value -->
       <bean name="Ports03Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
       <constructor>
       <!-- The name of the set -->
       <parameter>ports-03</parameter>
       <!-- Default host name -->
       <parameter>${jboss.bind.address}</parameter>
       <!-- The port offset -->
       <parameter>300</parameter>
       <!-- Set of bindings to which the "offset by X" approach can't be applied -->
       <parameter><null/></parameter>
       </constructor>
       </bean>
      
       <!-- Base binding metadata that ServiceBindingStore uses to create bindings for each set -->
       <bean name="StandardBindings" class="java.util.HashSet"
       elementClass="org.jboss.services.binding.ServiceBindingMetadata">
       <constructor>
       <parameter>
       <set>
       <!-- ********************* conf/jboss-service.xml ****************** -->
      
       <!-- Naming Service -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=Naming</property>
       <property name="bindingName">Port</property>
       <property name="port">1099</property>
       </bean>
      
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=Naming</property>
       <property name="bindingName">RmiPort</property>
       <property name="port">1098</property>
       </bean>
      
       <!-- Remote classloading service -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=WebService</property>
       <property name="port">8083</property>
       </bean>
      
       <!-- Remoting Connector -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">UnifiedInvokerConnector</property>
       <property name="port">4446</property>
       </bean>
      
       <!-- Used to create a multihome Remoting server. See -->
       <!-- deploy/remoting-jboss-beans.xml for more details. -->
       <!--bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">UnifiedInvokerConnector:bindingHome1</property>
       <parameter>192.168.2.2</property>
       <property name="port">7777</property>
       </bean-->
      
       <!-- Used to create a multihome Remoting server. See -->
       <!-- deploy/remoting-jboss-beans.xml for more details. -->
       <!--bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">UnifiedInvokerConnector:bindingHome2</property>
       <parameter>10.11.12.238</property>
       <property name="port">8888</property>
       </bean-->
      
       <!-- ********************* deploy/legacy-invokers-service.xml ****************** -->
      
       <!-- RMI/JRMP invoker -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=invoker,type=jrmp</property>
       <property name="port">4444</property>
       </bean>
      
       <!-- Pooled invoker -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=invoker,type=pooled</property>
       <property name="port">4445</property>
       </bean>
      
       <!-- ********************* deploy/cluster/hajndi-service.xml ****************** -->
      
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=HAJNDI</property>
       <property name="bindingName">Port</property>
       <property name="port">1100</property>
       </bean>
      
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=HAJNDI</property>
       <property name="bindingName">RmiPort</property>
       <property name="port">1101</property>
       </bean>
      
       <!-- ********************* deploy/cluster/ha-legacy-service.xml ****************** -->
      
       <!-- HA RMI/JRMP invoker -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=invoker,type=jrmpha</property>
       <property name="port">4447</property>
       </bean>
      
       <!-- HA Pooled invoker -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=invoker,type=pooledha</property>
       <property name="port">4448</property>
       </bean>
      
       <!-- ********************* deploy/iiop-service.xml ****************** -->
      
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=CorbaORB</property>
       <property name="port">3528</property>
       </bean>
      
       <!-- ********************* deploy/snmp-adaptor.sar **************** -->
      
       <!-- Trap receiver that acts as an SNMP Manager -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.jmx:name=SnmpAgent,service=trapd,type=logger</property>
       <property name="port">1162</property>
       </bean>
      
       <!-- The SNMP adaptor MBean -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor</property>
       <property name="port">1161</property>
       </bean>
      
       <!-- ********************* deploy/jmx-remoting.sar **************** -->
      
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.remoting:service=JMXConnectorServer,protocol=rmi</property>
       <property name="port">1090</property>
       </bean>
      
       <!-- ********************* deploy/ejb3-connectors-service.xml **************** -->
      
       <!-- EJB3 wants to have the service create its own ServiceBinding object
       dynamically. See the value-factory usage in deploy/ejb3-connectors-service.xml -->
      
      
       <!-- ********************* deploy/jbossweb.sar **************** -->
       <!-- ********************* deploy/httpha-invoker.sar **************** -->
      
       <!--
       JBoss Web server.xml configuration.
      
       Same binding config can be used by the following services, or really
       anything else that needs to point to the JBoss Web HTTP connector
       but doesn't need an XSL Transform
      
       jboss:service=invoker,type=http
       jboss:service=invoker,type=http,target=Naming
       jboss:service=invoker,type=http,target=Naming,readonly=true
       jboss:service=invoker,type=httpHA
       jboss:service=invoker,type=http,target=HAJNDI
       jboss.ws:service=ServiceEndpointManager
       -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.web:service=WebServer</property>
       <property name="port">80</property>
      
       <!--
       Inject a XSLT transform configuration (see below) that describes
       how to transform server.xml
       If the binding value request doesn't require an XSL Transform, this config
       will be ignored.
       -->
       <property name="serviceBindingValueSourceConfig"><inject bean="JBossWebConnectorXSLTConfig"/></property>
       </bean>
      
       <!-- For services like those listed above that need to know the
       port of the HTTPS connector -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.web:service=WebServer</property>
       <property name="bindingName">HttpsConnector</property>
       <property name="port">8443</property>
       </bean>
      
       <!-- ********************* deploy/messaging/remoting-bisocket-service.xml ********************** -->
      
       <!-- Standard JBM bisocket connector -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.messaging:service=Connector,transport=bisocket</property>
       <property name="port">4457</property>
       </bean>
      
       <!-- ********************* deploy/transaction-jboss-beans.xml ********************** -->
      
       <!-- JBossTS Recovery Manager -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">TransactionManager</property>
       <property name="bindingName">recoveryManager</property>
       <property name="port">4712</property>
       </bean>
      
       <!-- JBossTS Transaction Status Manager -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">TransactionManager</property>
       <property name="bindingName">transactionStatusManager</property>
       <property name="port">4713</property>
       </bean>
      
       <!-- JBossTS SocketProcessId. The address part is ignored,
       it will always use localhost/127.0.0.1. -->
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">TransactionManager</property>
       <property name="bindingName">socketProcessId</property>
       <property name="port">4714</property>
       </bean>
      
      
       <!-- ********************* deploy/hsqldb-ds.xml **************** -->
      
       <!-- Commented out as tcp/ip access to Hypersonic is not enabled by default -->
       <!--
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss:service=Hypersonic</property>
       <property name="port">1701</property>
       </bean>
       -->
      
       <!-- ********************* JBoss MQ **************** -->
      
       <!-- Commented out as JBoss MQ is not installed by default
       If you uncomment this and also use jboss.mq:service=InvocationLayer,type=HTTP,
       configure the http invocation layer using the jboss.web:service=WebServer binding above
       -->
       <!--
       <bean class="org.jboss.services.binding.ServiceBindingMetadata">
       <property name="serviceName">jboss.mq:service=InvocationLayer,type=UIL2</property>
       <property name="port">8093</property>
       </bean>
       -->
       </set>
       </parameter>
       </constructor>
       </bean>
      
       <!-- Conversion of selected bindings into system properties -->
       <bean name="SystemPropertyBinder" class="org.jboss.services.binding.SystemPropertyBinder">
      
       <constructor>
       <parameter>
       <set>
       <!-- JBM's remoting connector -->
       <bean class="org.jboss.services.binding.SystemPropertyBinding">
       <constructor>
       <parameter>jboss.messaging.connector.bisocket.port</parameter>
       <parameter class="int">
       <value-factory bean="ServiceBindingManager" method="getIntBinding"
       parameter="jboss.messaging:service=Connector,transport=bisocket"/>
       </parameter>
       </constructor>
       </bean>
       </set>
       </parameter>
       </constructor>
      
       </bean>
      
       <!-- XSL Transform to apply to server.xml -->
       <bean name="JBossWebConnectorXSLTConfig"
       class="org.jboss.services.binding.impl.XSLTServiceBindingValueSourceConfig">
      
       <constructor>
       <parameter><![CDATA[
       <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <xsl:when test="(name() = 'port' and . = '80')">
       <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'port' and . = '8009')">
       <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'redirectPort')">
       <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'port' and . = '8443')">
       <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
       </xsl:when>
       <xsl:otherwise>
       <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
       </xsl:otherwise>
       </xsl:choose>
       </xsl:for-each>
       <xsl:apply-templates/>
       </Connector>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
       </xsl:stylesheet>
       ]]>
       </parameter>
       </constructor>
       </bean>
      
      </deployment>
      
      


      I tried to change the port configuration from
      <parameter>${jboss.service.binding.set:ports-default}</parameter>
      to
      <parameter>${jboss.service.binding.set:ports-01}</parameter>


      By definition it has to add 100 to all the ports and start the service. But Jboss reports an error on startup.

      05:31:43,265 INFO [WebService] Using RMI server codebase: http://10.53.194.4:8183/
      05:31:43,270 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
      java.lang.Exception: Port 8183 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)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
       at $Proxy36.start(Unknown Source)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
       at org.jboss.system.ServiceController.start(ServiceController.java:460)
       at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:274)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:547)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.BindException: Cannot assign requested address
       at java.net.PlainSocketImpl.socketBind(Native Method)
       at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
       at java.net.ServerSocket.bind(ServerSocket.java:319)
       at java.net.ServerSocket.<init>(ServerSocket.java:185)
       at org.jboss.web.WebServer.start(WebServer.java:226)
       ... 54 more
      05:31:43,284 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/mnt/opt/testjb5/Jboss5/jboss-5.0.0.GA/server/default/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:123)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:274)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:547)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.Exception: Port 8183 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)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
       at $Proxy36.start(Unknown Source)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
       at org.jboss.system.ServiceController.start(ServiceController.java:460)
       at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
       ... 23 more
      Caused by: java.net.BindException: Cannot assign requested address
       at java.net.PlainSocketImpl.socketBind(Native Method)
       at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
       at java.net.ServerSocket.bind(ServerSocket.java:319)
       at java.net.ServerSocket.<init>(ServerSocket.java:185)
       at org.jboss.web.WebServer.start(WebServer.java:226)
       ... 54 more
      05:31:43,811 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      vfsfile:/mnt/opt/testjb5/Jboss5/jboss-5.0.0.GA/server/default/conf/jboss-service.xml -> java.net.BindException: Cannot assign requested address
      


      Even if i change the increment value to 150 or whatever, it fails.

      Any idea why ?