0

I am trying to connect two machines both running JBoss EAP 7.1.0 using a JMS bridge. Machine 1 is to act as a web server and has a WAR file deployed which is accessible, and Machine 2 is to act as the app server and has all the necessary components deployed just fine.

This is the error I am receiving:

WARN [org.apache.activemq.artemis.jms.bridge] (ServerService Thread Pool -- 72) AMQ342010: Failed to connect JMS Bridge N/A: javax.naming.CommunicationException: WFNAM00018: Failed to connect to remote host [Root exception is javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: ELY05128: [JBOSS-LOCAL-USER] Failed to read challenge file [Caused by java.io.FileNotFoundException: /.../.../jboss/standalone/tmp/auth/local3093626581916142639.challenge (No such file or directory)]] at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:110) at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:53) at org.wildfly.naming.client.NamingProvider.getPeerIdentityForNamingUsingRetry(NamingProvider.java:105) at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNamingUsingRetry(RemoteNamingProvider.java:91) at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:189) at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222) at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100) at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188) at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74) at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60) at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144) 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:46) 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:1072) at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:398) at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:114) at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:84) 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)

The connection to the target machine (application server) is being made as the path to JBoss is that of the path on the machine, which I verified by testing with a Windows application server environment and the path was the correct Windows path to the directory where the challenge file should be, so clearly the connection is being made as the directories are being accessed. However, the .challenge file isn't present each time which understandably causes the error message.

I have scoured SO and JBoss forums for days now and nothing is resolving my issue.

I saw this post: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge

This is the same issue that I am facing, but the answer which was marked as correct doesn't help me very much. The solution, in this case, was to replace the default ApplicationRealm with a JAAS realm, but I do not know if this is what I need, and I certainly do not currently have one. I did research it, but it seemed to not be applicable to my setup, but I could be wrong.

I also tried this solution: https://access.redhat.com/solutions/3209281 (Subscription only access)

This solution was to remove default-user="$local" from here:

<security-realm name="ApplicationRealm">
            <authentication>
                <local default-user="$local" allowed-users="*" skip-group-loading="true"/>

I did this to both standalone-full.xml files on both machines, and it appeared to make no difference at all.

I have created application users on both machines and given them superuser privileges through the JBoss console as I figured it was probably an issue with permissions when trying to write the file but this too was to no avail. I have also verified that both user credentials are correct.

  • The failure here doesn't really involve JMS. The issue is JNDI (which the JMS bridge is using to initialize). Is there a specific reason you're using a JMS bridge rather than a core bridge? Typically the JMS bridge is only used when integrating the embedded ActiveMQ Artemis instance with a different JMS implementation (e.g. Tibco, WebSphereMQ, etc.). If both JMS implementations are ActiveMQ Artemis (which they are since they're both from JBoss EAP 7.1) then a core bridge is generally preferred. – Justin Bertram Oct 25 '18 at 20:01
  • Thanks for your reply. I did read that somewhere earlier, I believe in the JBoss docs, that core bridges are preferable. I have tried with a core bridge and the setup seems much simpler, however, I was having an issue with the queues: 'No queue found with name MyQueue bridge MyBridge will not be deployed'. With the JMS bridge, however, the queues are found just fine, just file error stopped it from succeeding. – Aidan Pasquale Oct 26 '18 at 08:49
  • I found the fix to the queue error, I hadn't created core queues. However the connection is not being made, there is no error message now, but when I try and sign in to the application it times out with no output on either server console. – Aidan Pasquale Oct 26 '18 at 09:31
  • So it seems you've solved the problem this question was about. Therefore, you should mark this question as answered, and if you have additional doubts you should create new questions. – Justin Bertram Oct 26 '18 at 14:37

1 Answers1

0

The workaround was to switch to using a core bridge instead of a JMS bridge, as per the recommendation from Justin in the comments.