7 Replies Latest reply on Jul 21, 2011 11:29 AM by Massimo Romano

    Clustering JBoss 5.1 on Windows XP

    Massimo Romano Newbie

      Hi all.

      I'm trying to stur JBoss 5.1 on Windows XP in a single pc, so I have copied the all directory in two directories named node1 and node2 and the I have used the the following scripts to lanch the two instance:

       

      - run.bat -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01 -c node1 -g cluster_avic -u 238.255.100.101 -b localhost

       

      - run.bat -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-02 -c node2 -g cluster_avic -u 238.255.100.101 -b localhost

       

      When I start the first node all is ok, but when I do the same on the second node I receive the following error reported below.

       

      For more help I have attached the server.log file of the two instance.

       

      Thanks in advance for any help,

      Massimo.

       

      ---------------------------------------------------------

      GMS: address is 127.0.0.1:2881 (cluster=cluster_avic-HAPartitionCache)

      ---------------------------------------------------------

      2011-07-19 11:37:11,718 INFO  [org.jboss.cache.RPCManagerImpl] (main) Received new cluster view: [127.0.0.1:2881|0] [127.0.0.1:2881]

      2011-07-19 11:37:11,718 INFO  [org.jboss.cache.RPCManagerImpl] (main) Cache local address is 127.0.0.1:2881

      2011-07-19 11:37:11,781 INFO  [org.jboss.cache.RPCManagerImpl] (main) state was retrieved successfully (in 2,03 seconds)

      2011-07-19 11:37:11,828 INFO  [org.jboss.cache.factories.ComponentRegistry] (main) JBoss Cache version: JBossCache 'Cascabel' 3.1.0.GA

      2011-07-19 11:37:11,828 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=HAPartition state=Create

      org.jgroups.ChannelException: failed to start protocol stack

          at org.jgroups.JChannel.startStack(JChannel.java:1620)

          at org.jgroups.JChannel.connect(JChannel.java:366)

          at org.jboss.ha.framework.server.ClusterPartition$ChannelConnectTask.run(ClusterPartition.java:185)

          at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:147)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

          at java.lang.Thread.run(Thread.java:595)

      Caused by: java.lang.Exception: problem creating sockets (bind_addr=localhost/127.0.0.1, mcast_addr=null)

          at org.jgroups.protocols.UDP.start(UDP.java:389)

          at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:121)

          at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:410)

          at org.jgroups.JChannel.startStack(JChannel.java:1617)

          ... 6 more

      Caused by: java.net.BindException: Address already in use: Cannot bind

          at java.net.PlainDatagramSocketImpl.bind0(Native Method)

          at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)

          at java.net.DatagramSocket.bind(DatagramSocket.java:368)

          at java.net.MulticastSocket.<init>(MulticastSocket.java:147)

          at java.net.MulticastSocket.<init>(MulticastSocket.java:112)

          at org.jgroups.protocols.UDP.createSockets(UDP.java:503)

          at org.jgroups.protocols.UDP.start(UDP.java:385)

          ... 9 more

      2011-07-19 11:37:11,843 INFO  [org.jboss.ha.framework.interfaces.HAPartition.cluster_avic] (main) Partition cluster_avic destroyed.

        • 1. Re: Clustering JBoss 5.1 on Windows XP
          Bela Ban Master

          You're starting the 2 instances on the same bind address, I suggest use -b 127.0.0.2 for the second host. "localhost" probably resolves to 127.0.0.1

          1 of 1 people found this helpful
          • 2. Re: Clustering JBoss 5.1 on Windows XP
            Massimo Romano Newbie

            Thanks but I traied using two different Ip also one for each NIC i have in my pc.

            Unfortunatelly I have the same issue.

            • 3. Re: Clustering JBoss 5.1 on Windows XP
              Bela Ban Master

              On windows you can create aliases for your NIC. I suggest create 2, then run the first instance on alias1, the second on alias2. Forget the binding service.

              • 4. Re: Clustering JBoss 5.1 on Windows XP
                Massimo Romano Newbie

                Thank Bela ... I tried your solution but I still have the same issue, exception in changing the ip on the log.

                Consider the first node has 192.168.2.81.

                 

                 

                2011-07-19 14:22:25,609 INFO  [STDOUT] (main)

                ---------------------------------------------------------

                GMS: address is 192.168.2.162:4807 (cluster=cluster_avic-HAPartitionCache)

                ---------------------------------------------------------

                2011-07-19 14:22:27,671 INFO  [org.jboss.cache.RPCManagerImpl] (main) Received new cluster view: [192.168.2.162:4807|0] [192.168.2.162:4807]

                2011-07-19 14:22:27,687 INFO  [org.jboss.cache.RPCManagerImpl] (main) Cache local address is 192.168.2.162:4807

                2011-07-19 14:22:27,718 INFO  [org.jboss.cache.RPCManagerImpl] (main) state was retrieved successfully (in 2,11 seconds)

                2011-07-19 14:22:27,750 INFO  [org.jboss.cache.factories.ComponentRegistry] (main) JBoss Cache version: JBossCache 'Cascabel' 3.1.0.GA

                2011-07-19 14:22:27,750 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=HAPartition state=Create

                org.jgroups.ChannelException: failed to start protocol stack

                    at org.jgroups.JChannel.startStack(JChannel.java:1620)

                    at org.jgroups.JChannel.connect(JChannel.java:366)

                    at org.jboss.ha.framework.server.ClusterPartition$ChannelConnectTask.run(ClusterPartition.java:185)

                    at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:147)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

                    at java.lang.Thread.run(Thread.java:595)

                Caused by: java.lang.Exception: problem creating sockets (bind_addr=/192.168.2.162, mcast_addr=null)

                    at org.jgroups.protocols.UDP.start(UDP.java:389)

                    at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:121)

                    at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:410)

                    at org.jgroups.JChannel.startStack(JChannel.java:1617)

                    ... 6 more

                Caused by: java.net.BindException: Address already in use: Cannot bind

                    at java.net.PlainDatagramSocketImpl.bind0(Native Method)

                    at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)

                    at java.net.DatagramSocket.bind(DatagramSocket.java:368)

                    at java.net.MulticastSocket.<init>(MulticastSocket.java:147)

                    at java.net.MulticastSocket.<init>(MulticastSocket.java:112)

                    at org.jgroups.protocols.UDP.createSockets(UDP.java:503)

                    at org.jgroups.protocols.UDP.start(UDP.java:385)

                    ... 9 more

                2011-07-19 14:22:28,046 INFO  [org.jboss.ha.framework.interfaces.HAPartition.cluster_avic] (main) Partition cluster_avic destroyed.

                • 5. Re: Clustering JBoss 5.1 on Windows XP
                  Bela Ban Master

                  Have you removed the use of the binding service manager ?

                   

                  It seems that the HAPartition cluster cannot be created because it uses the same port as an existing service on your box. Have you changed the config ? I suggest check what port the HAPartition cluster is listening on, then check if - before you start the second node - there is already someone listening on that port, e.g. netstat -na |grep PORT, or use lsof -i tcp:PORT

                  • 6. Re: Clustering JBoss 5.1 on Windows XP
                    Massimo Romano Newbie

                    Sorry ... how I can remove the binding service manager?

                    • 7. Re: Clustering JBoss 5.1 on Windows XP
                      Massimo Romano Newbie

                      Maybe I understood and I have removed the option -Djboss.service.binding.set anyway I have the same error.

                      I checked the used port 4807 ...

                       

                      ---------------------------------------------------------

                      GMS: address is 192.168.2.162:4807 (cluster=cluster_avic-HAPartitionCache)

                      ---------------------------------------------------------

                       

                      and it is free even if there are som port listening on the second node (192.168.2.161)...

                       

                      Proto  Indirizzo locale   Indirizzo esterno   Stato
                        TCP0.0.0.0:25         0.0.0.0:0          LISTENING
                        TCP0.0.0.0:80         0.0.0.0:0          LISTENING
                        TCP0.0.0.0:135        0.0.0.0:0          LISTENING
                        TCP0.0.0.0:443        0.0.0.0:0          LISTENING
                        TCP0.0.0.0:445        0.0.0.0:0          LISTENING
                        TCP0.0.0.0:1028       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:1768       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:3306       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:9009       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:9080       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:9092       0.0.0.0:0          LISTENING
                        TCP0.0.0.0:56936      0.0.0.0:0          LISTENING
                        TCP127.0.0.1:1031     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:1041     127.0.0.1:27015    ESTABLISHED
                        TCP127.0.0.1:1777     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:1789     127.0.0.1:3306     ESTABLISHED
                        TCP127.0.0.1:3306     127.0.0.1:1789     ESTABLISHED
                        TCP127.0.0.1:3864     127.0.0.1:3865     ESTABLISHED
                        TCP127.0.0.1:3865     127.0.0.1:3864     ESTABLISHED
                        TCP127.0.0.1:3866     127.0.0.1:3867     ESTABLISHED
                        TCP127.0.0.1:3867     127.0.0.1:3866     ESTABLISHED
                        TCP127.0.0.1:4664     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:5152     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:5354     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:9005     0.0.0.0:0          LISTENING
                        TCP127.0.0.1:27015    0.0.0.0:0          LISTENING
                        TCP127.0.0.1:27015    127.0.0.1:1041     ESTABLISHED
                        TCP192.168.2.81:139   0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1090  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1098  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1099  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1100  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1101  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1441  213.146.189.201:12350  ESTABLISHED
                        TCP192.168.2.81:1589  66.220.151.77:80   ESTABLISHED
                        TCP192.168.2.81:1610  64.4.34.225:80     ESTABLISHED
                        TCP192.168.2.81:1774  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1776  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1779  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1780  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1800  69.63.189.39:80    ESTABLISHED
                        TCP192.168.2.81:1805  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:1807  74.125.232.118:443 TIME_WAIT
                        TCP192.168.2.81:1808  69.171.242.40:80   TIME_WAIT
                        TCP192.168.2.81:1810  195.22.202.80:80   TIME_WAIT
                        TCP192.168.2.81:2852  46.4.68.98:37521   ESTABLISHED
                        TCP192.168.2.81:3528  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:3554  209.85.146.113:80  CLOSE_WAIT
                        TCP192.168.2.81:3873  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4444  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4445  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4446  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4447  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4448  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4457  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4489  209.85.146.147:443 CLOSE_WAIT
                        TCP192.168.2.81:4712  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:4713  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:7900  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:8009  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:8080  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:8083  0.0.0.0:0          LISTENING
                        TCP192.168.2.81:35974 0.0.0.0:0          LISTENING
                        UDP0.0.0.0:443        *:*
                        UDP0.0.0.0:445        *:*
                        UDP0.0.0.0:1027       *:*
                        UDP0.0.0.0:1102       *:*
                        UDP0.0.0.0:3456       *:*
                        UDP0.0.0.0:7500       *:*
                        UDP0.0.0.0:45688      *:*
                        UDP0.0.0.0:45710      *:*
                        UDP0.0.0.0:56936      *:*
                        UDP127.0.0.1:123      *:*
                        UDP127.0.0.1:1025     *:*
                        UDP127.0.0.1:1026     *:*
                        UDP127.0.0.1:1042     *:*
                        UDP127.0.0.1:1043     *:*
                        UDP127.0.0.1:1213     *:*
                        UDP127.0.0.1:1900     *:*
                        UDP127.0.0.1:2035     *:*
                        UDP127.0.0.1:2146     *:*
                        UDP127.0.0.1:3976     *:*
                        UDP127.0.0.1:4004     *:*
                        UDP192.168.2.81:123   *:*
                        UDP192.168.2.81:137   *:*
                        UDP192.168.2.81:138   *:*
                        UDP192.168.2.81:1161  *:*
                        UDP192.168.2.81:1162  *:*
                        UDP192.168.2.81:1772  *:*
                        UDP192.168.2.81:1775  *:*
                        UDP192.168.2.81:5353  *:*
                        UDP192.168.2.162:123  *:*
                        UDP192.168.2.162:1900 *:*
                        UDP192.168.2.162:5353 *:*

                       

                      Is it possible that te error is on the null multicast address?

                       

                      Caused by: java.lang.Exception: problem creating sockets (bind_addr=/192.168.2.162, mcast_addr=null)

                       

                      Max.