7 Replies Latest reply on Nov 16, 2012 6:22 AM by dweil

    Issue sending messages to remote queue in AS 7

    sv_srinivaas

      Hhi,

       

      I'm using Hornetq 2.2.13 and Jboss As 7.1.0. When trying to send messages from a java client from a remote machine to the testQueue created by default in jms_node2 started using standalone-full-ha configuration in linux, I get the below exception continuously on server startup, following which i get "failed to create session factory" while sending messages from the java client.

       

      Have attacched the xml, sender code and log files.  Pls help, The same config and code works fine when tried in windows machine where the queue is local to the java client.

       

      16:46:57,751 ERROR [org.hornetq.core.protocol.core.impl.HornetQPacketHandler] (Old I/O server worker (parentId: 316050233, [id: 0x12d68b39, jms_node2/a.b.c.d:5445])) Failed to create session : HornetQException[errorCode=105 message=Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER]\par

              at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:126) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:807) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:187) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket(HornetQPacketHandler.java:85) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:533) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-2.2.13.Final.jar:]\par

              at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287) [netty-3.2.6.Final.jar:]\par

              at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-2.2.13.Final.jar:]\par

              at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-2.2.13.Final.jar:]\par

              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.6.Final.jar:]\par

              at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.6.Final.jar:]\par

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30]\par

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30]\par

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]\par

        • 1. Re: Issue sending messages to remote queue in AS 7
          clebert.suconic

          You need to configure security for the user you are connecting.

          • 2. Re: Issue sending messages to remote queue in AS 7
            jbertram

            This error:

             

              HornetQException[errorCode=105 message=Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER]

             

            occurs because two instances of HornetQ are attempting to cluster and you're using the default <cluster-user> and <cluster-password>.

             

            If your client is also receiving security exceptions then you should change it so that it passes the proper credentials on createConnection().

            • 3. Re: Issue sending messages to remote queue in AS 7
              dweil

              Justin,

               

              I'm having the same problem with JBoss 7.1.3, even though I configured the cluster-user and cluster-password properties. Does HornetQ authenticate the user against one of the realms? I tried both existing realms, i. e. add-user'd the user there, but the problem remains.

               

              Thanks for any hint, Dirk

              • 4. Re: Issue sending messages to remote queue in AS 7
                jbertram

                Does HornetQ authenticate the user against one of the realms? I tried both existing realms, i. e. add-user'd the user there, but the problem remains.

                It shouldn't get to the realm.  If the incoming credentials matche the locally configured <cluster-user> and <cluster-password> then it does a straight comparison.  See org.hornetq.core.security.impl.SecurityStoreImpl#authenticate.

                • 5. Re: Issue sending messages to remote queue in AS 7
                  dweil

                  It seems the HornetQ subsystem configuration does not honor the properties cluster-user and cluster-password. Although I have the following settings

                   

                          <subsystem xmlns="urn:jboss:domain:messaging:1.3">
                                <hornetq-server>
                                      <clustered>true</clustered>
                                      <cluster-user>hortnetqClusterUser</cluster-user>
                                      <cluster-password>hortnetqClusterUserPassword</cluster-password>
                                 

                      <persistence-enabled>true</persistence-enabled>

                   

                  HornetQ complains about the user HORNETQ.CLUSTER.ADMIN.USER:

                   

                  [Server:server-three] 11:39:12,240 ERROR [org.hornetq.core.server] (Old I/O server worker (parentId: 1536252779, [id: 0x5b915b6b, /192.168.178.20:5695])) HQ114032: Failed to create session: HornetQException[errorType=SECURITY_EXCEPTION message=HQ119061: Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER]

                  [Server:server-three]   at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:124) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:897) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:166) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket(HornetQPacketHandler.java:82) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:548) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:550) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:511) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:533) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:72) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:95) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:792) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:281) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-2.3.0.BETA1.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.socket.oio.OioWorker.process(OioWorker.java:72) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:73) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:52) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:176) [netty-3.4.5.Final.jar:]

                  [Server:server-three]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]

                  [Server:server-three]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]

                   

                  The problem appears with JBoss 7.1.3 and 7.2.0.

                  • 6. Re: Issue sending messages to remote queue in AS 7
                    jmesnil

                    have you updated the cluster-user and cluster-password on all the AS7 servers configurations?

                    • 7. Re: Issue sending messages to remote queue in AS 7
                      dweil

                      It was my very silly fault: The servers referred the wrong profile ...

                       

                      So the problem was in front of the keyboard and not in the software.

                       

                      Thank you for bothering!