7 Replies Latest reply on Nov 23, 2012 4:29 AM by rhusar

    How to setup a domain  cluster using multiple jboss installations on the same machine

    sunilgiri

      Can some one suggest a good link which explains how to set up a cluster of as7.1.1 installations in the same machine using domain mode?

       

       

      One server installation as a domain controller.

      Second installation (host1) with two server instances

      Third installation(host2)  with two server instances  

      both part of the same domain,

       

       

      I want to install an EAR with SLSB's to this cluster

        • 1. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
          rhusar

          Take a look at docs on domain here:

          https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-ManagedDomain

           

          Otherwise your question is too vague. In general, you will start domain mode, configure nodes with HA profile, setup security, configure other node to connect  to that single domain controller, implement your app using @Clustered annotatioin and deploy it in cluster. Done!

           

          Rado

          1 of 1 people found this helpful
          • 2. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
            sunilgiri

            It was not a specific question, apologise for that.

            Now thanks for the link, I have done the setup as follows.

            Made three copies of  jboss-as-7.1.1.Final, Configured one as domain controller others namely server1, server2 connect to the domain controller.

            Have following entries in both server1,server2 ( host.xml )


            <domain-controller>
               <remote host="10.6.0.195" port="9999"/>
               <!-- Alternative remote domain controller configuration with a host and port -->
               </domain-controller>

             

            Server1 has the following entry ( host.xml )

            <servers>
                <server name="server-one" group="main-server-group">
                      <socket-bindings port-offset="200"/>
                </server>
            </servers>

            Server2 has the following entry ( in host.xml )

            <servers>
                <server name="server-two" group="main-server-group">
                      <socket-bindings port-offset="250"/>
                </server>
            </servers>

            It works, but only if I put the port offset.  Is there anything else, to be taken care of?

            I want to start the two hosts server1,server2 using some loopback ip, not sure on how to do it.

            • 3. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
              rhusar

              It works, but only if I put the port offset.  Is there anything else, to be taken care of?

              You cannot bind to the same port on the same IP address. That cannot work.

               

              What you need to do is either

              • use port offset and bind to different addresses
              • use different IP addresses e.g. by creating a new virtual network interface with different IP address
              1 of 1 people found this helpful
              • 4. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
                sunilgiri

                Thanks Radoslav, for your help. I tried by creating loop back addresses.

                 

                But then endup having following error on node start up

                 

                On Domain controller console it shows the following message

                14:37:25,701 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

                14:37:25,853 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'

                [Host Controller] 14:37:28,225 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

                [Host Controller] 14:37:28,344 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA

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

                [Host Controller] 14:37:29,250 INFO  [org.xnio] (MSC service thread 1-4) XNIO Version 3.0.3.GA

                [Host Controller] 14:37:29,271 INFO  [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.0.3.GA

                [Host Controller] 14:37:29,306 INFO  [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.2.3.GA

                [Host Controller] 14:37:31,471 INFO  [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)

                [Host Controller] 14:37:31,486 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on /10.6.0.42:9999

                [Host Controller] 14:37:31,855 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://10.6.0.42:9990

                [Host Controller] 14:37:31,857 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" (Host Controller) started in 4295ms - Started 11 of 11 services (0 services are passive or on-demand)

                [Host Controller] 14:38:25,035 INFO  [org.jboss.as.domain] (domain-mgmt-handler-thread - 1) JBAS010918: Registered remote slave host "Node1", JBoss AS 7.1.1.Final "Brontes"

                 

                Node1 shows the following error on startup

                 

                [Server:server-one] 16:08:55,535 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.host.controller.client: org.jboss.msc.service.StartException in service jboss.host.controller.client: java.net.ConnectException: JBAS012174: Could not connect to remote://sunil-PC:9999. The connection failed

                [Server:server-one]     at org.jboss.as.server.mgmt.domain.HostControllerServerClient.start(HostControllerServerClient.java:161) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                [Server:server-one]     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                [Server:server-one]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

                [Server:server-one]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

                [Server:server-one]     at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

                [Server:server-one] Caused by: java.net.ConnectException: JBAS012174: Could not connect to remote://sunil-PC:9999. The connection failed

                [Server:server-one]     at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:153) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     at org.jboss.as.server.mgmt.domain.HostControllerServerConnection.openChannel(HostControllerServerConnection.java:158) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     at org.jboss.as.server.mgmt.domain.HostControllerServerConnection.connect(HostControllerServerConnection.java:86) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     at org.jboss.as.server.mgmt.domain.HostControllerServerClient.start(HostControllerServerClient.java:135) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     ... 5 more

                [Server:server-one] Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

                [Server:server-one]     at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:315) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at  org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at  org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:180) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.3.GA.jar:3.0.3.GA]

                [Server:server-one]     at org.xnio.nio.NioHandle.run(NioHandle.java:90)

                [Server:server-one]     at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)

                [Server:server-one]     at ...asynchronous invocation...(Unknown Source)

                [Server:server-one]     at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:337) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]

                [Server:server-one]     at org.jboss.as.protocol.ProtocolChannelClient.connect(ProtocolChannelClient.java:114) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:123) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]

                [Server:server-one]     ... 8 more

                [Server:server-one]

                [Server:server-one] 16:08:55,569 INFO  [org.jboss.jaxr] (MSC service thread 1-7) JBAS014000: Started JAXR subsystem, binding JAXR connection factory into JNDI as: java:jboss/jaxr/ConnectionFactory

                 

                Follows the entry in Host.xml for Node1

                 

                  <management-interfaces>

                            <native-interface security-realm="ManagementRealm">

                                <socket interface="management" port="${jboss.management.native.port:9999}"/>

                            </native-interface>

                            <http-interface security-realm="ManagementRealm">

                                <socket interface="management" port="${jboss.management.http.port:9990}"/>

                            </http-interface>

                        </management-interfaces>

                    </management>

                 

                Looks like it fails looping back to connect  9999

                • 5. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
                  rhusar

                  Uh, sorry, I am not fluent in debugging domain problems, but I suspect from

                   

                  [Server:server-one] Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

                   

                  that you haven't created and specified the user to connect to domain with?

                   

                  Also double check that not only you changed the public IP to connect to, but also the management IP. (In standalone mode these are switched with -b <IP> -bmanagement <IP>).

                  • 6. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
                    sunilgiri

                    I spent some time on this and found out 

                     

                    https://community.jboss.org/thread/201916

                     

                    It seems slave node registers succesfully to the domain controller ( as shown in the above logs), but the actual problem is the server instance running on the slave node cannot connect to its *host* controller .

                    I tried starting host with following  switch ,meaning I have given localhost instead of IP and it worked    -bmanagement=localhost

                     

                    Really appreciate your support.

                    • 7. Re: How to setup a domain  cluster using multiple jboss installations on the same machine
                      rhusar

                      Fantastic, glad it worked!