10 Replies Latest reply on Nov 9, 2011 5:08 AM by sprasadjha

    How does JBoss domain controller discover the slave host controllers in different physical machines

    sprasadjha

      0 down vote  favorite    share [fb]  

       

      I was trying to setup the domain controller feature. When the servers and the host controller are running from the same folder of JBoss then the domain controller starts up on running the domain.bat.But if I have some servers which need to run on some other physical machine, then how will the domain controller start those servers when the domain controller comes up. As host.xml knows the address to the controller but the domain does not know the different host controllers in different machines. Does it mean that the host controllers in different machines needs to be started before the domain controller? If yes how?

        • 1. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
          jaikiran

          See this chapter https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-Domainsetup

           

           

          Shankar Prasad Jha wrote:

           

           

          But if I have some servers which need to run on some other physical machine, then how will the domain controller start those servers when the domain controller comes up.

          That's the job of the host controller.

           

           

          Shankar Prasad Jha wrote:

           

           

          As host.xml knows the address to the controller but the domain does not know the different host controllers in different machines.

          The domain controller knows the accessible IPs of the host controllers and also knows that those host expose the management interface port through which the communication happens

           

           

          Shankar Prasad Jha wrote:

           

           

          Does it mean that the host controllers in different machines needs to be started before the domain controller? If yes how?

          No.

          • 2. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
            sprasadjha

            Thanks jaikiran for you response. I have already read the link provided by you. But I have following doubt

            Shankar Prasad Jha wrote:

             

            As host.xml knows the address to the controller but the domain does not know the different host controllers in different machines.

            The domain controller knows the accessible IPs of the host controllers and also knows that those host expose the management interface port through which the communication happens

             

            I do not know how to tell the domain controller the 'accessible IPs of all the host controllers'. The document talks about telling the host controller the ip of domain controllers but not vice versa. This is what I read. Can you please correct me and tell me how to specify the ip of host controllers in the domain.xml.

            • 3. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
              jaikiran

              From that doc:

              * The host controller needs to be addressable by the domain controller (interface binding)

              ...

               

              ...

               

              (See domain/configuration/host.xml)

               

              Tell the host to expose a native (i.e. non-HTTP) management interface on an address accessible to the host that is acting as the Domain Controller. Exposing an HTTP management interface is not required, and is only necessary if the user has developed some custom HTTP-based management clients and wishes to use them to administer the host:

               

              <management-interfaces>

                 <native-interface interface="management" port="9999" />

              </management-interfaces>

               

              Assign an addressable IP address to the host controller itself. The address must be reachable by the Domain Controller:

               

              <interfaces>

                 <interface name="management">

                  <inet-address value="192.168.0.101"/>

                 </interface>

              </interfaces>

               

              (See domain/configuration/host.xml)

              • 4. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                sprasadjha

                Hi Jaikiran, Thanks again. Sorry if I seem to be pertinent. But I am unable to resolve my problem. The host controller is exposing a management interface through the ip 192.168.0.101. But the host itself has to be started by the domain controller - am I right? If yes then in the domain.xml there should be entry like

                <hosts>

                     <host name = 'host1">

                          <inet-address value="192.168.0.101" />

                          ......

                     </host>

                   

                      <host name = 'host2">

                          <inet-address value="192.168.0.102" />

                          ......

                     </host>

                </host>

                My understanding is that even on remote machines the domain controller should be able to start the host controllers and subsequently the servers. Since there is no AS service up on these machines how will domain controller start these instances?

                • 5. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                  dlofthouse

                  No JBoss does not start the host controllers on the remote machines, the host controller needs to be started first to establish a connection to the domain controller - the domain controller can then start AS instances on the connected host controller.

                  • 6. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                    sprasadjha

                    Hi Darren, Thanks for your response. How can I start the host controller alone ? I mean I can run domain.bat in which case the host will start but the servers will also start. Otherwise I can do standalone.bat which will start the standalone server. Is ther any way by which I start the host controller alone?

                    • 7. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                      dlofthouse

                      To start the host controller without any server you should remove the server definitions from the host.xml descriptor of that host controller - that is where the definition of the servers that run on host reside.

                       

                      One thing to be aware of however is that once servers are added to that host controller they will be persisted in the host.xml for the next start unless you switch to a host.xml without the servers again before that start.

                      • 8. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                        sprasadjha

                        Which means I remove all the server declarations and then fire domain.bat. Am I right?

                        1. After that how do I add the servers to the host?
                        2. As soon as I add the server will they not get started by themselves? Should the auto-start attribute be set to  false?
                        3. This does not seem to be a neat solution?
                        • 9. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                          dlofthouse

                          At that point you could probably use the command line interface to manage the creation of the servers but for the moment it may be better to just connect to the admin console on the domain controller and use the interface there to manage the servers.

                           

                          This does not seem to be a neat solution?

                           

                          The problem that would always need to be solved is how does the domain controller know about the host controllers it is going to manage.

                           

                          In some of your initial comments you were viewing it from the perspective of adding entries to the domain.xml to identify the hosts, when managing an installation this would mean that you would first need to install the host controller process on the host that will be running AS instances and then you would need to tell the domain controller how to connect to that host controller.

                           

                          The current architecture means that after you have installed your domain controller you don't need to go to the domain controller to add new hosts instead you just install a host that registers against that domain controller.  The host can already have the set of AS instances it will run configured locally or you can make a choice to manage these through the central admin console.

                           

                          This then means that if you are in an environment where you want to be able to dynamically add additional capacity to your installation you just need to start additional machines with host controllers installed and pre-configured to connect to the domain controller - you don't need to start these instances and then configure the domain controller to find them as they will have registered themselves.

                          • 10. Re: How does JBoss domain controller discover the slave host controllers in different physical machines
                            sprasadjha

                            Hi Darran,

                             

                            I have written a blog on ManagedDomain, it will be nice if you can have a look and give your feedback.

                             

                            Thanks in advance. Shankar.http://xebee.xebia.in/2011/11/01/all-about-managed-domain-jboss-as7/