5 Replies Latest reply on Jul 14, 2003 11:04 PM by mikefinn

    Multiple JBoss/Jetty Instances

    jhbarnes7

      I'm new to JBoss, could someone help guide me in how to setup multiple instances of JBoss on one Solaris machine (using Jetty) and have each instance listen on unique ports?

      I saw one post (regarding Jboss 3.0 beta) that indicated that auth.conf, jboss-service.xml and standardjboss.xml needed to be changed.

      So I copied my working installation to a new directory and set about changing those 3 files.

      However only jboss-service.xml looked applicable. I did change it (the ports for each section) however I don't know how to get my changes to take effect.

      I could not find a jetty.xml file on my server. I did find the jboss-service.xml file in the deploy directory in the .sar directories, but changing it there did not seem to help.

      Any ideas?

      Thanks,

      John

        • 1. Re: Multiple JBoss/Jetty Instances
          cronos

          Hi:

          We have a server with 1 Apache + 2 JBoss 3.0.4 (Jetty) + AJP13 & Load Balancing (same machine).

          In order to avoid conflicts between 2 jboss you must change the ports defined in {JBOSS_2_DIR}/server/default/conf/jboss-service.xml &
          {JBOOS_2_DIR}/server/default/deploy/jbossweb.sar/META-INF/jboss-service.xml
          (at least).

          (Small and quick, not best) Method to solve conflicts with ports :

          Once you made that changes in jboss-service.xml, start Jboss 1 (without changes in configuration).
          Then, try to start Jboss 2. If you get an error such .....' address already in use..... port XXXX .....' (bind port error) , that means you still need to change that port in JBoss 2. Only look for that port definition in configuration files and change it.

          Finally you will have 2 JBoss working in the same machine.

          Tell me if you have problems.

          Hope this can help someone and sorry for my english ;) .

          • 2. Re: Multiple JBoss/Jetty Instances
            mikefinn

            As of 3.0.5+, you can use the ServiceBinding manager to maintain your bind ports & interfaces. It centralizes all listener configs into single config (XML so far) file that can be located anywhere accessible by URL. It's in varia module.

            mike

            • 3. Re: Multiple JBoss/Jetty Instances
              mike.walker

              This is what I have found out today to be able to run multiple instances of 3.0.4 on the same machine.
              Old New
              8080 8050
              8083 8053
              1099 1199
              4444 5555
              8009 9009
              8090 9090
              8091 9091
              1476 1576
              $JBOSS_HOME/server/default/conf/jboss-service.xml
              $JBOSS_HOME/server/default/deploy/jbossweb.sar/META-INF/jboss-service.xml
              $JBOSS_HOME/server/default/deploy/jbossmq-service.xml
              $JBOSS_HOME/server/default/deploy/hsqldb-service.xml

              • 4. Re: Multiple JBoss/Jetty Instances
                sunitashukla

                Hi ,
                Can you please tell me if the same binding service manager is available with the jboss 3.2.1 version.

                I want to write a single config file which will create multiple instances of jboss.Is it possible with 3.2.1 version.

                Please help!

                Thanks.

                • 5. Re: Multiple JBoss/Jetty Instances
                  mikefinn

                  You'll need to build it from source with 3.2.1. See docs for info. I think it is going to be part of 3.2.2 distro. Post here if you have any questions.

                  mike