9 Replies Latest reply on May 3, 2010 11:53 AM by Leos Bitto

    clustered queue example

    Ravi Gupta Newbie

      Getting a queue on JBoss Messaging (Using  ClusteredConnectionFactory) worked great with JBoss Messaging, but  cannot get a clustered queue (even tried example) to work with  HornetQ

       

      I have two Jboss instances running with embedded hornetq, node1 and node2
      Clustering seems to work fine

      I define a queue on both instances (hornetq queue's)

      I send messages (100) to queue (defined on both) servers, all messages  to go node1 (and the journal), and zero on node2
      I just cant figure  it out?
      Any help or example? - The example provided with HornetQ is not sufficient

        • 1. Re: clustered queue example
          Clebert Suconic Master

          You should read the documentation... in special Message Redistribution, chapter 38:

           

          http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html_single/index.html#clusters

           

           

          There's no such thing as clustered/not-clustered queue on HornetQ. You just cluster the server. Look at the docs for more details.

          • 2. Re: clustered queue example
            Ravi Gupta Newbie

            Thanks, I would expect to see messages load balanced on both nodes, when I remove consumers (and have forward when no consumers, I still see all messages to go node 1), perhaps this is the correct behavior?

            • 3. Re: clustered queue example
              Tim Fox Master

              You really should search for other posts like this on the forum. It has been discussed many times.

               

              Probably either UDP isn't enabled on your network or you haven't configured your servers with a real hostname/ip address so they're not forming a cluster.

              • 4. Re: clustered queue example
                Roklee LLC Newbie

                Would you like to share your configuration so I can help you?

                • 5. Re: clustered queue example
                  Ravi Gupta Newbie

                  Actually, do you have a real example of Specifying Members of a Cluster Explicitly?

                   

                  Say two nodes?

                  • 6. Re: clustered queue example
                    Clebert Suconic Master

                    examples/jms/symmetric-cluster

                    • 7. Re: clustered queue example
                      Ravi Gupta Newbie

                      Well, I tried the symmetric cluster examples, I really cant get it to work. I do not need to be told to look at the docs anymore, perhaps you could help with this error

                       

                      Still using udp it seems

                       

                      20:59:22,915 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8283/
                      20:59:22,915  INFO  [Log4jService$

                      URLWatchTimerTask] Configuring from URL:  resource:jboss-log4j.xml
                      20:59:24,958 INFO  [TransactionManagerService] JBossTS Transaction  Service (JTA version) - JBoss Inc.
                      20:59:24,958 INFO   [TransactionManagerService] Setting up property manager MBean and JMX  layer
                      20:59:25,567 INFO  [TransactionManagerService] Starting  recovery manager
                      20:59:25,770 INFO  [TransactionManagerService] Recovery manager started
                      20:59:25,770  INFO  [TransactionManagerService] Binding TransactionManager JNDI  Reference
                      20:59:37,329 INFO  [EJB3Deployer] Starting java:comp  multiplexer
                      20:59:39,248 ERROR [STDERR] May 2, 2010 8:59:39 PM  org.hornetq.core.logging.impl.JULLogDelegate info
                      INFO: live  server is starting..
                      20:59:39,388 WARN  [JournalStorageManager] AIO  wasn't located on this platform, it will fall back to using pure Java  NIO. If
                      your platform is Linux, install LibAIO to enable the AIO journal
                      20:59:39,388  INFO  [JournalStorageManager] Using NIO Journal
                      20:59:39,435 ERROR  [STDERR] May 2, 2010 8:59:39 PM org.hornetq.core.logging.impl.JULLogDelegate  warn
                      WARNING: Security risk! It has been detected that the cluster admin user  and password have not been changed from the installa
                      tion default.  Please see the HornetQ user guide, cluster chapter, for instructions on  how to do this.
                      20:59:43,678 INFO  [NettyAcceptor] Started Netty Acceptor version  3.1.5.GA-r1772
                      20:59:43,678 ERROR [STDERR] May 2, 2010 8:59:43 PM  org.hornetq.core.logging.impl.JULLogDelegate info
                      INFO: HornetQ  Server version 2.0.0.GA (Hornet Queen, 113) started
                      20:59:46,206 WARN  [UDP] failed to join /224.0.75.75:7500 on  eth3: java.net.SocketException: Unrecognized Windows Sockets err
                      or:  0: no Inet4Address associated with interface
                      20:59:46,206 WARN  [UDP]  failed to join /224.0.75.75:7500 on eth4: java.net.SocketException: Unrecognized Windows Sockets err
                      or: 0: no Inet4Address associated with interface
                      20:59:46,221 WARN   [UDP] failed to join /224.0.75.75:7500 on net6: java.net.SocketException: Unrecognized Windows Sockets err
                      or:  0: no Inet4Address associated with interface
                      20:59:46,237 INFO  [STDOUT]
                      -------------------------------------------------------
                      GMS:  address is fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715
                      -------------------------------------------------------
                      20:59:48,343  INFO  [TreeCache] viewAccepted(): [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715|0]  [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715
                      ]
                      20:59:48,436 INFO  [TreeCache] TreeCache local address is  fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715
                      20:59:48,436 INFO   [TreeCache] State could not be retrieved (we are the first member in  group)
                      20:59:48,436 INFO  [TreeCache] parseConfig(): PojoCacheConfig  is empty
                      20:59:48,674 WARN  [NAKACK] fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715]  discarded message from non-member 192.168.1.6:2363, my view
                      is  [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715|0]  [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715]
                      20:59:49,161 WARN  [NAKACK] fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715]  discarded message from non-member 192.168.1.6:2363, my view
                      is  [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715|0]  [fe80:0:0:0:c8cd:3d5c:2f9b:8a0c:59715]
                      20:59:52,959 ERROR [UDP] exception sending msg: java.lang.Exception:  dest=/192.168.1.6:2363 (144 bytes)
                      java.net.SocketException: Socket closed
                              at  java.net.PlainDatagramSocketImpl.send(Native Method)
                               at java.net.DatagramSocket.send(DatagramSocket.java:612)
                               at org.jgroups.protocols.UDP._send(UDP.java:338)
                              at  org.jgroups.protocols.UDP.sendToSingleMember(UDP.java:299)
                               at org.jgroups.protocols.TP.doSend(TP.java:939)
                               at org.jgroups.protocols.TP.access$2200(TP.java:47)
                               at org.jgroups.protocols.TP$Bundler.bundleAndSend(TP.java:1651)
                               at org.jgroups.protocols.TP$Bundler.access$2500(TP.java:1569)
                               at org.jgroups.protocols.TP$Bundler$BundlingTimer.run(TP.java:1681)
                               at java.util.TimerThread.mainLoop(Timer.java:512)
                              at  java.util.TimerThread.run(Timer.java:462)
                      20:59:53,191 INFO  [NativeServerConfig] JBoss Web Services - Native
                      20:59:53,194  INFO  [NativeServerConfig] jbossws-native-2.0.1.SP2_CP04  (build=200810080754)
                      20:59:53,985 ERROR [UDP] exception sending msg:  java.lang.Exception: dest=/192.168.1.6:2363 (144 bytes)
                      java.net.SocketException: Socket closed
                              at java.net.PlainDatagramSocketImpl.send(Native  Method)
                              at java.net.DatagramSocket.send(DatagramSocket.java:612)
                               at org.jgroups.protocols.UDP._send(UDP.java:338)
                               at org.jgroups.protocols.UDP.sendToSingleMember(UDP.java:299)
                               at org.jgroups.protocols.TP.doSend(TP.java:939)
                              at  org.jgroups.protocols.TP.access$2200(TP.java:47)
                              at org.jgroups.protocols.TP$Bundler.bundleAndSend(TP.java:1651)
                               at org.jgroups.protocols.TP$Bundler.access$2500(TP.java:1569)
                               at org.jgroups.protocols.TP$Bundler$BundlingTimer.run(TP.java:1681)
                               at java.util.TimerThread.mainLoop(Timer.java:512)
                               at java.util.TimerThread.run(Timer.java:462)
                      20:59:54,908 INFO   [SnmpAgentService] SNMP agent going active
                      20:59:56,463 INFO   [DefaultPartition] Initializing
                      20:59:56,559 WARN  [UDP] failed to join /224.0.75.75:7500 on  eth3: java.net.SocketException: Unrecognized Windows Sockets err
                      or:  0: no Inet4Address associated with interface
                      20:59:56,565 WARN  [UDP]  failed to join /224.0.75.75:7500 on eth4: java.net.SocketException: Unrecognized Windows Sockets err
                      or: 0: no Inet4Address associated with interface
                      20:59:56,570 WARN   [UDP] failed to join /224.0.75.75:7500 on net6: java.net.SocketException: Unrecognized Windows Sockets err
                      or:  0: no Inet4Address associated with interface
                      20:59:56,583 INFO  [STDOUT]
                      -------------------------------------------------------
                      • 8. Re: clustered queue example
                        Tim Fox Master

                        I don't use Windows but the following:

                         

                        20:59:46,206 WARN  [UDP] failed to join /224.0.75.75:7500 on  eth3: java.net.SocketException: Unrecognized Windows Sockets err
                        or:  0: no Inet4Address associated with interface

                         

                        Implies you have configured the system for IPv6

                         

                        Try disabling it

                         

                        http://www.home-network-help.com/disable-ipv6.html

                        • 9. Re: clustered queue example
                          Leos Bitto Novice

                          Tim Fox wrote:

                           

                          I don't use Windows but the following:

                           

                          20:59:46,206 WARN  [UDP] failed to join /224.0.75.75:7500 on  eth3: java.net.SocketException: Unrecognized Windows Sockets err
                          or:  0: no Inet4Address associated with interface

                           

                          Implies you have configured the system for IPv6

                           

                          Try disabling it

                           

                          http://www.home-network-help.com/disable-ipv6.html

                           

                          Maybe there is no IPv6 either. It seems that there simply are many network interfaces, some of them without proper IPv4 setup. As long as there is at least one interface with IPv4, that should be a perfectly valid setup, shouldn't it?