4 Replies Latest reply on May 12, 2003 10:46 AM by pjaromin

    Multiple Intances on the same physical machine bound to diff

    pjaromin

      I need to run multiple instances of JBoss on the same physical hardware. I've been doing this for a couple months now by managing a new set of ports for each instance as suggested in the forums.

      I'm wondering, however, if it's possible to bind each instance to a different IP address, using the same ports? (as I do with our current web servers)

      It would be *much* easier for us to manage (and remember) virtual IPs (with friendly DNS names) than a long list of ports for each server.

      Is there some technical reason why this won't work or is it simply that the application was written to bind to any/all available IPs?

      - Patrick

        • 1. Re: Multiple Intances on the same physical machine bound to

          The binding service available from cvs.
          It will be included in the 3.2.2 release.

          The default config overrides ports rather
          than address, so you will need to find the
          corresponding "BindAddress" or "Host" for each
          MBean.

          Regards,
          Adrian

          • 2. Re: Multiple Intances on the same physical machine bound to
            dsilcox69

            You may also want to look at using Apache to do the same thing. We use the mod_jk connector and the jboss/tomcat bundle. Its really easy (once you have jk working :-) ) to point a context and/or virtual host at the target jboss instance. Its my understanding you can also link up with jetty although I have not been there and done that.

            I use this technique in our prod environment to upgrade to newer versions of jboss - makes rolling back very quick and easy.

            • 3. Re: Multiple Intances on the same physical machine bound to
              pjaromin

              I do use mod_jk, but I don't think I understand how that would do what I want ??

              What I want to accomplish is to have all instances use the same port for at least 3 of the main services...

              1 - Naming service. I want to be able to shutdown any instance by simply saying: shutdown.sh -c instance.hostname instead of remembering the individual ports and using shutdown localhost:x1099. I've actually got this working now (thanks to Adrian for the input).

              2 - AJP: I would like to make entries in my "workers.properties" files with a standard port, mapped to a unique hostname. Again, basically so I don't have to remember that "instance #4 = clientC" when configuring/maintaining.

              3 - WebServer: For convenience so developers can "hit" JBoss directly on a known port -- again, so they don't have to memorize which port a specific client is mapped to. Much easier to remember a name.

              As I said, I've figured out how to do #1 since it's pretty straightforward, but #2 and #3 require some knowlege of Jetty configuration and specifically how to transform the binding service configuration section into the required xml schema. I'm going to spend some time on this, but if anyone has an example of the appropriate transformation (the delegate-config CDATA section of jboss-bindings.xml), I'd very much appreciate the assistance! :)

              Thanks!

              - Patrick

              • 4. Re: Multiple Intances on the same physical machine bound to
                pjaromin

                OK...was far simpler than I thought at first blush. Still need to create the XSL to do this with the binding service, but for now I can live with the settings directly in the jbossweb-jetty.sar's jboss-service.xml file.