How to JMS Bridge two wildfly instances
asnhrttc Feb 19, 2018 1:15 AMI want jms bridge between two wildfly intances from serverA to ServerB but I can't set up because of following error on ServerA.
I googled lots of times but nothing works for me and I spend this problem almost 2 days.. Im so grad if someone help me.
Could you advise me on this problem?
I set up ServerA and ServerB based on this url.
http://www.mastertheboss.com/howto/jboss-jms6/configuring-jms-bridge-with-wildfly-10
version:wildfly-10.1.0.Final
ServerA:errors
17:41:38,875 WARN [org.apache.activemq.artemis.jms.bridge] (ServerService Thread Pool -- 70) AMQ342010: Failed to connect JMS Bridge: javax.naming.AuthenticationException: Failed to connect to any server. Servers tried: [http-remoting://serverB:8080 (Authentication failed: all available authentication mechanisms failed: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /home/wildfly/wildfly-10.1.0.Final/standalone/tmp/auth/local697715415286722332.challenge (そのようなファイルやディレクトリはありません)] DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Cannot perform callback to acquire realm, authentication ID or password [Caused by javax.security.auth.callback.UnsupportedCallbackException])] [Root exception is javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /home/wildfly/wildfly-10.1.0.Final/standalone/tmp/auth/local697715415286722332.challenge (そのようなファイルやディレクトリはありません)] DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Cannot perform callback to acquire realm, authentication ID or password [Caused by javax.security.auth.callback.UnsupportedCallbackException]] at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:238) at org.jboss.naming.remote.client.HaRemoteNamingStore.namingStore(HaRemoteNamingStore.java:149) at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:130) at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272) at org.jboss.naming.remote.client.RemoteContext.lookupInternal(RemoteContext.java:104) at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:93) at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:146) at javax.naming.InitialContext.lookup(InitialContext.java:417) at javax.naming.InitialContext.lookup(InitialContext.java:417) at org.apache.activemq.artemis.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:48) at org.apache.activemq.artemis.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:32) at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1020) at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:383) at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:105) at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /home/wildfly/wildfly-10.1.0.Final/standalone/tmp/auth/local697715415286722332.challenge (そのようなファイルやディレクトリはありません)] DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Cannot perform callback to acquire realm, authentication ID or password [Caused by javax.security.auth.callback.UnsupportedCallbackException] at org.jboss.remoting3.remote.ClientConnectionOpenListener.allMechanismsFailed(ClientConnectionOpenListener.java:114) at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:389) at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:241) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:198) at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:112) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) at ...asynchronous invocation...(Unknown Source) at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:294) at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:276) at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:393) at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:377) at org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.connect(EndpointCache.java:111) at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:197) ... 18 more 17:41:38,880 WARN [org.apache.activemq.artemis.jms.bridge] (ServerService Thread Pool -- 70) AMQ342001: Failed to start JMS Bridge 17:41:38,881 INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 70) WFLYMSGAMQ0011: Started JMS Bridge simple-jm
Server A: standalone-full.xml
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"> <server name="default"> <security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting> <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/> <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor" /> <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput"> <param name="batch-delay" value="50"/> </http-connector> <http-connector name="bridge-connector" endpoint="bridge-acceptor" socket-binding="messaging-remote" /> <in-vm-connector name="in-vm" server-id="0"/> <http-acceptor name="http-acceptor" http-listener="default"/> <http-acceptor name="http-acceptor-throughput" http-listener="default"> <param name="batch-delay" value="50"/> <param name="direct-deliver" value="false"/> </http-acceptor> <in-vm-acceptor name="in-vm" server-id="0"/> <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/> <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/> <jms-queue name="JMSBridgeSourceQueue" entries="queue/JMSBridgeSourceQueue java:jboss/exported/jms/queues/JMSBridgeSourceQueue"/> <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/> <connection-factory name="RemoteConnectionFactory" connectors="http-connector" entries="java:jboss/exported/jms/RemoteConnectionFactory"/> <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/> </server> <jms-bridge name="simple-jms-bridge" max-batch-time="100" max-batch-size="10" max-retries="1" failure-retry-interval="10000" quality-of-service="AT_MOST_ONCE"> <source destination="queue/JMSBridgeSourceQueue" connection-factory="ConnectionFactory"/> <target password="guest" user="guest" destination="jms/queues/JMSBridgeTargetQueue" connection-factory="jms/RemoteConnectionFactory"> <target-context> <property name="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/> <property name="java.naming.provider.url" value="http-remoting://serverA:8080"/> </target-context> </target> </jms-bridge> </subsystem> *** <outbound-socket-binding name="messaging-remote"> <remote-destination host="serverA" port="8080"/> </outbound-socket-binding>
ServerB:standalone-full.xml
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"> <server name="default"> <security-setting name="#"> <role name="guest" send="true" consume="true" create-durable-queue="true" delete-durable-queue="true" create-non-durable-queue="true" delete-non-durable-queue="true" manage="true"/> </security-setting> <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/> <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/> <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput"> <param name="batch-delay" value="50"/> </http-connector> <in-vm-connector name="in-vm" server-id="0"/> <http-acceptor name="http-acceptor" http-listener="default"/> <http-acceptor name="http-acceptor-throughput" http-listener="default"> <param name="batch-delay" value="50"/> <param name="direct-deliver" value="false"/> </http-acceptor> <in-vm-acceptor name="in-vm" server-id="0"/> <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/> <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/> <jms-queue name="JMSBridgeTargetQueue" entries="queue/JMSBridgeTargetQueue java:jboss/exported/jms/queues/JMSBridgeTargetQueue"/> <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/> <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/> <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/> </server> </subsystem>
And I added user 'guest' who has 'guest' role on ServerB.
If SeverA and ServerB are on same host, it works.
Do I need additional security settings?
Thank you.