5 Replies Latest reply on Sep 20, 2002 4:51 AM by cosmotic

    Installing 2 JBoss on the same machine

      Hi all,
      I'd like for testing-purposes to start 2 istances
      of jBoss clustered on the same machine. Is it possible?
      I have started the first instance and then changed
      all the Port settings for the second instance, before starting it. However I still get some JVM_ADDRESS IN USE....can anybody tell me which are the relevant Ports I have to change in order to avoid this conflict?
      I tried to change the JNDI port from 1099 to 1199
      and all the many "4444" (RMI) to 14444....but doesn't work....
      any help?
      Francsco

        • 1. Re: Installing 2 JBoss on the same machine
          ncoleman7

          are you using JBoss 2.4 or 3.0?

          If 3.0, are you using clustering?

          • 2. Re: Installing 2 JBoss on the same machine

            Hi. I'm using JBoss 3.0 and I launch it with
            ./run.sh -c all
            as a matter of fact the first instance starts as
            clustered....
            any help?
            Francesco

            • 3. Re: Installing 2 JBoss on the same machine
              joao.clemente

              Are you sure you changed ALL ports?
              I've tried it with 3.0 and I'm pretty sure I was sucessfull on my attempt. Have you changed the http port setting for jetty? (It's config file comes inside a package in the deployment directory, maybe you forgot about that one)

              • 4. Re: Installing 2 JBoss on the same machine
                ncoleman7

                You would first have to do 1 of 2 different things.

                First option) Copy the 'all' configuration to another configuration like 'all2'
                Execute jboss1 with -c all and jboss2 with -c all2

                Second option) Duplicate the jboss-3.0 directory to create a seperate instance of jboss.
                Execute jboss1 from first directory and jboss2 from second directory


                The following files in the appropriate server directory would have to be modified. The default port setting is given:

                File: conf/jboss-service.xml
                Description: WebServer Service Port: 8083
                Description: Naming Service Port: 1099
                Description: Invoker, Type=JRMP Port: 4444

                File: deploy/jbossmq-service.xml
                Description: OIL Port: 8090
                Description: UIL Port: 8091

                File: deploy/cluster-service.xml
                Description: HA-JNDI Service Port: 1100
                Note: uses 1102 for multi-cast IP discovery of other nodes (ok if both are same)

                *-- For Jetty --*
                File: deploy/jbossweb.sar/META-INF/jboss-service.xml
                Description: Jetty HTTP Listener Port: 8080
                Note: (I think port 8082 is used by a service some place, but I'm not entirely sure)

                *-- For Tomcat --*
                File: deploy/tomcat4-service.xml
                Description: Apache HTTP Adaptor Port: 8080


                Both instances should be able to stop and start independantly if configured correctly. Because of issues with RMI and optimization, it is better to individually change all the appropriate ports and not to try binding each process to a seperate IP address.

                • 5. Re: Installing 2 JBoss on the same machine

                  You should also change

                  - in conf/jboss-service.xml:
                  "invokerServletPath=http://localhost:8080/invoker/JMXInvokerServlet"

                  - the port of the AJP listener (default 8009) if you're using one (in Jetty/Tomcat configuration).