6 Replies Latest reply on Mar 31, 2014 6:24 AM by Donovan De Beuckelaer

    JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP

    Luiz Almeida Newbie

      Hi! I'm trying to configurate a domain with two instances at the same machine, but i don't want offset de port numbers (socket-bindings port-offset=150), instead i would like to bind each instance to a virtual IP. I tried this:

       

      domail.xml

      ----------------

      ...

          <interfaces>

              <interface name="management"/>

              <interface name="public"/>

              <interface name="unsecure"/>

              <interface name="server1"/> <!-- to VIP 192.168.50.1 -->

              <interface name="server2"/> <!-- to VIP 192.168.50.2 -->

          </interfaces>

      ...

          <server-groups>

              <server-group name="server1-group" profile="server1-full">

                  <jvm name="default">

                      <heap size="64m" max-size="256m"/>

                  </jvm>

                  <socket-binding-group ref="full-sockets"/>

              </server-group>

              <server-group name="server2-group" profile="server2-full">

                  <jvm name="default">

                      <heap size="64m" max-size="256m"/>

                  </jvm>

                  <socket-binding-group ref="full-sockets"/>

              </server-group>

       

          </server-groups>

      ...

       

      host.xml

      ...

          <servers>

              <server name="server1" group="server1-group" auto-start="true">

                  <jvm name="default">

                      <heap size="64m" max-size="256m"/>

                  </jvm>

                  <interfaces>

                      <interface name="server1">

                         <inet-address value="192.168.50.1"/>

                      </interface>

                  </interfaces>

              </server>

              <server name="server2" group="server2-group" auto-start="true">

                  <jvm name="default">

                      <heap size="64m" max-size="256m"/>

                  </jvm>

                  <interfaces>

                      <interface name="server2">

                         <inet-address value="192.168.50.2"/>

                      </interface>

                  </interfaces>

              </server>

          </servers>

      ...

       

      But when o startup the domain ($> $JBOSS_HOME/bin/domain.sh) the servers initiation fail with de messages:

       

      [Server:server1] 15:32:09,048 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) Operation ("add") failed - address: ([("interface" => "server2")]) - failure description: "JBAS014763: any-address is required"

      [Server:server1] 15:32:09,070 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

      [Host Controller] 15:32:09,582 INFO  [org.jboss.as.domain.controller.mgmt] (proxy-threads - 1) JBAS010920: Server [Server:server1] registered using connection [Channel ID 1015276e (inbound) of Remoting connection 679e3bdd to /127.0.0.1:56888]

      [Host Controller] 15:32:09,678 INFO  [org.jboss.as.host.controller] (Remoting "host-1:MANAGEMENT" task-1) JBAS010926: Unregistering server server1

      [Server:server1] 15:32:09,730 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 560ms

      [Server:server2] 15:32:09,914 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) Operation ("add") failed - address: ([("interface" => "server1")]) - failure description: "JBAS014763: any-address is required"

      [Server:cupommania-server2] 15:32:09,927 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

      15:32:10,084 INFO  [org.jboss.as.process.Server:server1.status] (reaper for Server:server1) JBAS012010: Process 'Server:server1' finished with an exit status of 1

       

      That's i'am trying is it possible?

       

      Thanx,

      Luiz

        • 1. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
          Peter Johnson Master

          Basic question: have you configured your computer's network adaptor to use the two IP addresses?

          • 2. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
            Luiz Almeida Newbie

            Sorry, i forgot to mention that.

            ----------------------------

            [lalmeida@notehp-mjv-lalmeida bin]$ ifconfig

            lo        Link encap:Local Loopback 

                      inet addr:127.0.0.1  Mask:255.0.0.0

                      UP LOOPBACK RUNNING  MTU:16436  Metric:1

                      RX packets:63186 errors:0 dropped:0 overruns:0 frame:0

                      TX packets:63186 errors:0 dropped:0 overruns:0 carrier:0

                      collisions:0 txqueuelen:0

                      RX bytes:206781027 (197.2 MiB)  TX bytes:206781027 (197.2 MiB)

             

             

            p3p1      Link encap:Ethernet  HWaddr 00:23:5A:B1:7F:5C 

                      inet addr:172.21.1.15  Bcast:172.21.1.255  Mask:255.255.254.0

                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                      RX packets:1099085 errors:0 dropped:0 overruns:0 frame:0

                      TX packets:90370 errors:0 dropped:0 overruns:0 carrier:0

                      collisions:0 txqueuelen:1000

                      RX bytes:147211869 (140.3 MiB)  TX bytes:17922365 (17.0 MiB)

             

             

            p3p1:0    Link encap:Ethernet  HWaddr 00:23:5A:B1:7F:5C 

                      inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0

                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

             

             

            p3p1:1    Link encap:Ethernet  HWaddr 00:23:5A:B1:7F:5C 

                      inet addr:192.168.50.2  Bcast:192.168.50.255  Mask:255.255.255.0

                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

             

            Thanks

            • 3. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
              Wolf-Dieter Fink Master

              If I understand your issue correct, the configuration is wrong.

               

              interfaces in domain.xml declare that you must have a interface named "public" in each configuration.

              What you need to do is to overwrite the interface "public" to bound against different IPs.

              In your case remove the interfaces server* and change the host.xml server element from "server1" and "server2" to public.

              Than server1 should use *50.1 and server2 *50.2 for binding

              • 4. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
                Luiz Almeida Newbie

                Wolf-Dieter Fink, thank you for reply. I've tried what you suggested with no success.

                 

                host.xml

                ---------

                ...

                    <interfaces>

                        <interface name="management">

                            <any-address/>

                        </interface>

                        <interface name="unsecure">

                            <any-address/>

                        </interface>

                    </interfaces>

                ...

                    <servers>

                        <server name="server1" group="group1" auto-start="true">

                            <jvm name="default">

                                <heap size="64m" max-size="256m"/>

                            </jvm>

                            <interfaces>

                               <interface name="public">

                                   <inet-address value="192.168.50.1"/>

                               </interface>

                            </interfaces>

                        </server>

                        <server name="server2" group="group2" auto-start="true">

                            <jvm name="default">

                                <heap size="64m" max-size="256m"/>

                            </jvm>

                            <interfaces>

                               <interface name="public">

                                   <inet-address value="192.168.50.2"/>

                               </interface>

                            </interfaces>

                        </server>

                    </servers>

                ...

                 

                $JBOSS_HOME/domain/log/host-controller.log

                -------------------

                14:28:09,451 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

                14:28:10,210 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA

                14:28:10,457 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

                14:28:13,102 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([

                    ("host" => "host-1"),

                    ("server-config" => "server2"),

                    ("interface" => "public")

                ]): org.jboss.msc.service.DuplicateServiceException: Service jboss.network.public is already registered

                    at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                    at org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:955) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.server.services.net.SpecifiedInterfaceAddHandler.performRuntime(SpecifiedInterfaceAddHandler.java:56)

                    at org.jboss.as.controller.operations.common.InterfaceAddHandler.performRuntime(InterfaceAddHandler.java:110) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.common.JVMHandlers$JVMOptionAddHandler.execute(JVMHandlers.java:143) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.modelChanged(WriteAttributeHandlers.java:119) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.WriteAttributeHandlers$WriteAttributeOperationHandler.execute(WriteAttributeHandlers.java:86) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:501) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.operations.common.ProcessEnvironment$ProcessNameWriteAttributeHandler.execute(ProcessEnvironment.java:161) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:149) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:190) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:315)

                    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]

                 

                14:28:13,383 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010933: Host Controller boot has failed in an unrecoverable manner; exiting. See previous messages for details.

                14:28:13,431 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 20ms

                -------------------

                 

                I've attached the complete domain.xml e host.xml configurations.

                • 5. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
                  Luiz Almeida Newbie

                  Maybe if I explain what i intend with this kind of configuration, someone can help me another way.

                  My enviroment has only one physical machine, but I would like to run several instances of JVMs (JBoss 7) simulating several servers, so that each instance o JBoss should have a specific IP and does not have to change the port numbers of sockets.

                  I know that it is possible have several installations of JBoss 7 at the same machine and startup them binding each instance to a different IP (i.e. ./standalone.sh -b 192.168.0.1 and another, ./standalone.sh -b 192.168.0.2), but I would like to have one single point of control like domain mode offers.

                   

                  Thanks

                  • 6. Re: JBoss 7 - Domain configuration: bind each server in a server group to a virtual IP
                    Donovan De Beuckelaer Novice

                    I like to have the same setup, does anyone have a configuration guide.