3 Replies Latest reply on Dec 10, 2001 2:42 PM by Sebastien Boving

    multiple JBOSS instances on one machine?

    Sebastien Boving Newbie


      I'm trying to get several instances of JBoss running at the same time by different users, on one server. This would then become the 'development' server. I would prefer such a situation over one where each developer (and any machine he works on) runs jboss.

      The server is reachable through several virtual ip addresses (ip aliases), one for each developer. A firewall script on the server redirects (ip : port) to the correct port.

      For instance, developer 'C' has ip address If from the network you try to reach port 1099 of, iptables (linux kernel fw) forwards the packet to A JBoss instance runs as user 'C' on the server, which is specifically configured to use port 1399 (iso default port 1099)for JNDI.

      Theoretically i think this could work, but it has to be possible to change ALL the ports of services JBoss runs (at least the ones i need). I've been trying for a while and don't seem to get this working. Some ports you just can't change unless your recompile the service (EmbeddedCatalinaSX f.i). For others it's obscure (RMI,OIL,UIL: ServerBindPort doesn't seem to work, services don't find each other anymore, JBoss only boots up halfly, ...). Not sure this is not working, but it's definately a mess.

      Did anyone put any work in this yet? Is there any other way you can setup different JBoss'es on one machine? Can you for instance tell him to have the server listen on "TCP: eth1.1:1099" instead of "TCP: *:1099"?

      The only other possibility i see is running VMWare on the server :(.

      Any ideas would be welcome.

        • 1. Re: multiple JBOSS instances on one machine?
          marc fleury Master

          I don't think we have been through the server looking for that explicitely, I am not surprised you get barfing everywhere. I guess we could ship an MBean that lists all the ports in the system and you could change them there but again I would have to look behind the scenes, too much other stuff going on right now (at least for me) put a 'feature request' if you want someone to pick it up, someone probably will be interested in this, at least the ISP community will.

          • 2. Re: multiple JBOSS instances on one machine?
            Sebastien Boving Newbie

            I put a request in, like you told me.

            I also bought the documentation now (great btw!), and found out the possible parameters for the different MBeans. 'BindAdress' seems to be provided to do exactly what i need, for most TCP-listening services (except HyperSonic, which i don't need).

            If these work (and the services really only bind to the specified address, not even localhost), i actually don't need the destination NAT trick, and all ports could be the default ports.

            I'm going to try this out in the next few days and will get back here.


            • 3. Re: multiple JBOSS instances on one machine?
              Sebastien Boving Newbie

              It seems that services which provide 'BindAddress' work properly in a 'multiple JBoss config'. Take for instance the JNDI service, specifying in one jboss.jcml BindAddress 10.0.0.x and in another 10.0.0.y will let you run both JBoss instances each listening on port 1099 of that host (you would use ip aliasing to make the host using both ip addresses on the same network).

              Services this is not working with (at least not through jboss.jcml configuration changes):
              - HtmlAdaptorServer on port 8082 (just change this port)
              - EmbeddedCatalinaSx (need to change source code i'm afraid)
              - RMI port for exporting bean code (make it dynamic or change the ports per jboss instance [does this have to happen in the bean jboss DD, or can this been done jboss-instance-wide?])
              - Hypersonic DB (change the port, if you need it at all)

              Both the EmbeddedCatalinaSx and RMI port are crucial to me. For the first one i'll try to change the src code so it reads a BindAddress attribute in jboss.jcml

              For the second i'll have to find out what exactly is the implication (on the client-side) to export objects on dynamic RMI ports. I also wonder if this can be achieved in a jboss-instance wide configuration, or will each bean deployed to that instance need to explicitly tell to use port 0 (RmiPort).