3 Replies Latest reply on Jul 28, 2004 5:58 PM by anil.saldhana

    Port assignments -- necessary ?  And if so then how to confi

    monocongo

      Do you need to modify or specify any port numbers for the multiple servers/VMs in a cluster ? I am assuming that each VM (node) in the cluster will need to listen to different ports, and this might not be taken care of magically by JBoss, as witnessed below by my second instance (node) in a cluster not being able to start the WebService since another node is already listening to to the port. I run one instance of JBoss via "run-c all" and when I run another instance of JBoss (which will make it the second node in the cluster, right ?) I get the following exception:


      13:57:57,278 ERROR [WebService] Starting failed jboss:service=WebService
      java.net.BindException: Address already in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      at java.net.ServerSocket.bind(ServerSocket.java:318)
      at java.net.ServerSocket.(ServerSocket.java:185)
      at org.jboss.web.WebServer.start(WebServer.java:178)
      at org.jboss.web.WebService.startService(WebService.java:286)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)



      Any insights or suggestions will be appreciated, thanks in advance.


      -James

        • 1. Re: Port assignments -- necessary ?  And if so then how to c
          budworth

          Generally your nodes are on different hosts, in which case you would not get port conflicts.

          Possibly, you could have multiple IP addresses and pass in the -b option to the run script specifying a different ip for each host, but depending on the actual network setup, the two instances may not see each other.

          I would assume you are doing this as a test? As having 2 cluster nodes on one host kind of defeats the purpose of a highly available cluster.

          That or maybe you are just trying to handle the extreme edge case of the JVM crashing.

          • 2. Re: Port assignments -- necessary ?  And if so then how to c
            monocongo

            Yes you make very good points. When I started to try clustering my servers I thought running a cluster on one machine would be easier for testing/learning, but now I know otherwise. Now that I am trying the clustering with two machines there are no more port issues (though unfortunately there are others). Basic clustering appears to be dead simple to configure with JBoss 3.2.5 (nice work), but getting something like singletons to work with a cluster is another story -- at least I am still stumped (see other posts in this forum).

            Thanks for your reply.


            --James

            • 3. Re: Port assignments -- necessary ?  And if so then how to c
              anil.saldhana

              You can run two instances of JBoss with the "all" configuration on a single machine with minimal config changes. JBoss provides the ServiceBindingManager facility to run multiple instances on the same box.

              http://www.jboss.org/wiki/Wiki.jsp?page=JBossHA
              lists many different articles on Clustering

              http://www.jboss.org/wiki/Wiki.jsp?page=HttpSessionReplicationonMacOS
              describes setting up multiple instances on the same box.

              Please try to look at the wiki. All your answers are usually answered there. Also if you have something new to tell the world, you are free to place it on the wiki.