4 Replies Latest reply on Feb 27, 2009 10:15 AM by dwschulze

    Run JBoss 4.2.2 and JBoss 5.0.1 at the same time

    dwschulze

      I need to run JBoss 4.2.2 and JBoss 5.0.1 at the same time. When I start 4.2.2 first and then start 5.0.1 I get an Exception about port 8083 already in use. I actually thought that there would be more port conflicts.

      What configuration changes do I have to make to run JBoss 4.2.2 and JBoss 5.0.1 at the same time?

      Thanks.

        • 1. Re: Run JBoss 4.2.2 and JBoss 5.0.1 at the same time
          peterj

          I would leave 4.2.2 as is and change the ports on 5.0. To do that, look at the server/xxx/conf/bootstrap/bindings.xml file. All of the ports are configured from this file in 5.0. In fact, you could start 5.0 like this:

          run -Djboss.service.binding.set=Ports01Bindings

          and it will run with port numbers increased by 100 (example: using port 8180 instead of 8080)

          If you want to change the ports on 4.2.x, see the file docs/examples/binding-manager/sample-bindings.xml, which provides a similar mechanism.

          • 2. Re: Run JBoss 4.2.2 and JBoss 5.0.1 at the same time
            dwschulze

            When I add -Djboss.service.binding.set=Ports01Bindings I get this error:

            12:48:11,119 ERROR [AbstractKernelController] Error installing to Instantiated:
            name=SystemPropertyBinder#1 state=Described
            org.jboss.services.binding.NoSuchBindingException: No binding null found for ser
            vice jboss.messaging:service=Connector,transport=bisocket in set Ports01Bindings

            Is there something else I need to do?

            I've gotten JBoss 5 to run at the same time as JBoss 4 by changing all JBoss 5 port settings in bootstrap/bindings.xml to start with a 9, but your approach is cleaner.

            I also changed two port settings in deploy/jbossweb.sar/server.xml, but maybe that isn't necessary.

            • 3. Re: Run JBoss 4.2.2 and JBoss 5.0.1 at the same time
              peterj

              Changing the ports in server.xml is not necessary - the bindings.xml file includes those ports. But note that the settings in server.xml take precedent if you change them due to the way that the port numbers in binding.xml are applied to server.xml.


              And I gave you the wrong port binding name, it should be (sorry):

              run -Djboss.service.binding.set=ports-01

              • 4. Re: Run JBoss 4.2.2 and JBoss 5.0.1 at the same time
                dwschulze

                Peter,

                The last one works.

                I asked the same question on stackoverflow.com and got two different, creative answers so I'm going to cross-reference the two threads:

                http://stackoverflow.com/questions/592091/running-jboss-5-and-jboss-4-at-the-same-time

                The ability to specify port numbers or an entire set of port bindings with a JVM -D argument will make it easy to do from Ant too.