1 Reply Latest reply on Nov 16, 2014 9:22 PM by Justin Bertram

    How to enable security for JMS on HornetQ 2.3.1?

    james viet Newbie

      Hi all,

       

      I met some errors when I tried to enable <security-enabled> to "true" on HornetQ server.

       

      At the present, I used JBoss 7.2.0 Final and HornetQ 2.3.1

       

      My issue is:

       

      I'm trying to enable security for JMS by HornetQ. So I configured on standalone-full-ha.xml

       

      <subsystem xmlns="urn:jboss:domain:messaging:1.3">

                  <hornetq-server>

                      <security-enabled>true</security-enabled>

                      <security-domain>others</security-domain>

      ....

      But when starting JBoss server, i saw the error

       

      2014-11-15 11:36:21,044 ERROR [Old I/O server worker (parentId: 871631101, [id: 0x33f408fd, /192.168.95.23:5445])]-[org.hornetq.core.server] HQ224018: Failed to create session: HornetQException[errorType=SECURITY_EXCEPTION message=HQ119031: Unable to validate user: null]

          at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:144)

          at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:969)

          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:151)

          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket(HornetQPacketHandler.java:78)

          at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:631)

          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:547)

          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:523)

          at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:564)

          at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:72)

          at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)

          at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:281)

          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169)

          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134)

          at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)

          at org.jboss.netty.channel.socket.oio.OioWorker.process(OioWorker.java:71)

          at org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:73)

          at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:51)

          at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

          at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)

          at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:175)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

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

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

       

      The issue will be gone if I'm back <security-enabled> to <security-enabled>false</security-enabled>

       

      If you have some experience on this issue, could you please help me on this?