0 Replies Latest reply on Mar 16, 2018 4:55 AM by valsaraj viswanathan

    How to configure JMS Bridge

    valsaraj viswanathan Master

      I am trying to send message from one queue to another queue on separate wildfly domain server. There are two domain wildfly 8.2 servers. Need to send from one queue to another queue on another machine.

       

      Set the following bridge for testing in local:

      <jms-bridge name="lychee-jms-bridge">

          <source>

      <connection-factory name="ConnectionFactory"/>

      <destination name="queue/source"/>

          </source>

          <target>

      <connection-factory name="jms/RemoteConnectionFactory"/>

      <destination name="jms/queue/destination"/>

      <user>jmsuser</user>

      <password>****</password>

      <context>

          <property key="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/>

          <property key="java.naming.provider.url" value="http-remoting://127.0.0.1:8080"/>

          <property key="java.naming.security.principal" value="jmsuser"/>

          <property key="java.naming.security.credentials" value="******"/>

      </context>

          </target>

          <quality-of-service>AT_MOST_ONCE</quality-of-service>

          <failure-retry-interval>10000</failure-retry-interval>

          <max-retries>-1</max-retries>

          <max-batch-size>10</max-batch-size>

          <max-batch-time>100</max-batch-time>

      </jms-bridge>

       

      I got following exception:

      2018-03-16 13:31:21,537 WARN  [org.hornetq.jms.server] (pool-4-thread-1) HQ122010: Failed to connect JMS Bridge: javax.naming.AuthenticationException: Failed to connect to any server. Servers tried: [http-remoting://127.0.0.1:8080 (Authentication failed: all available authentication mechanisms failed:)] [Root exception is javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:]

      at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:238) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at org.jboss.naming.remote.client.HaRemoteNamingStore.namingStore(HaRemoteNamingStore.java:149) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:130) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:87) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:129) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]

      at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_51]

      at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_51]

      at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:56) [hornetq-jms-server-2.4.5.Final.jar:]

      at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:38) [hornetq-jms-server-2.4.5.Final.jar:]

      at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1233) [hornetq-jms-server-2.4.5.Final.jar:]

      at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1471) [hornetq-jms-server-2.4.5.Final.jar:]

      at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2200(JMSBridgeImpl.java:76) [hornetq-jms-server-2.4.5.Final.jar:]

      at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2079) [hornetq-jms-server-2.4.5.Final.jar:]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]

      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

      Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:

       

      I have added jms user in ApplicationRealm as in sample and added in guest group.

       

      My remoting connector is using a custom realm:

      <subsystem xmlns="urn:jboss:domain:remoting:2.0">

      <endpoint worker="default"/>               

      <http-connector name="http-remoting-connector" connector-ref="default" security-realm="SSLRealm"/>

      </subsystem>

       

      Is there anything wrong?