无法读取挑战文件 [由 java.io.FileNotFoundException 引起:/jboss/standalone/tmp/auth/local4123__.challenge(没有这样的文件或目录)
Failed to read challenge file [Caused by java.io.FileNotFoundException: /jboss/standalone/tmp/auth/local4123__.challenge (No such file or directory)
我正在尝试使用 JMS 桥连接两台机器 运行 JBoss EAP 7.1.0。机器 1 充当 Web 服务器,并部署了一个可访问的 WAR 文件,机器 2 充当应用程序服务器,并部署了所有必要的组件。
这是我收到的错误:
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[=13=](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.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)
正在建立与目标机器(应用程序服务器)的连接,因为到 JBoss 的路径是机器上的路径,我通过 Windows 应用程序服务器测试验证了这一点环境和路径是挑战文件所在目录的正确 Windows 路径,因此很明显,在访问目录时正在建立连接。但是,.challenge 文件并非每次都存在,这可以理解地导致错误消息。
我已经搜索了 SO 和 JBoss 论坛好几天了,但没有解决我的问题。
我看到了这个post:
这与我面临的问题相同,但标记为正确的答案对我帮助不大。在这种情况下,解决方案是用 JAAS 领域替换默认的 ApplicationRealm,但我不知道这是否是我需要的,而且我目前肯定没有。我确实研究过它,但它似乎不适用于我的设置,但我可能是错的。
我也试过这个解决方案:https://access.redhat.com/solutions/3209281(仅限订阅访问)
此解决方案是从此处删除 default-user="$local":
<security-realm name="ApplicationRealm">
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
我对两台机器上的两个独立 full.xml 文件都执行了此操作,它似乎没有任何区别。
我在两台机器上都创建了应用程序用户,并通过 JBoss 控制台授予他们超级用户权限,因为我认为在尝试写入文件时可能是权限问题,但这也无济于事。我还验证了两个用户凭据都是正确的。
根据 Justin 在评论中的建议,解决方法是改用核心桥而不是 JMS 桥。
我正在尝试使用 JMS 桥连接两台机器 运行 JBoss EAP 7.1.0。机器 1 充当 Web 服务器,并部署了一个可访问的 WAR 文件,机器 2 充当应用程序服务器,并部署了所有必要的组件。
这是我收到的错误:
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[=13=](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.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)
正在建立与目标机器(应用程序服务器)的连接,因为到 JBoss 的路径是机器上的路径,我通过 Windows 应用程序服务器测试验证了这一点环境和路径是挑战文件所在目录的正确 Windows 路径,因此很明显,在访问目录时正在建立连接。但是,.challenge 文件并非每次都存在,这可以理解地导致错误消息。
我已经搜索了 SO 和 JBoss 论坛好几天了,但没有解决我的问题。
我看到了这个post:
这与我面临的问题相同,但标记为正确的答案对我帮助不大。在这种情况下,解决方案是用 JAAS 领域替换默认的 ApplicationRealm,但我不知道这是否是我需要的,而且我目前肯定没有。我确实研究过它,但它似乎不适用于我的设置,但我可能是错的。
我也试过这个解决方案:https://access.redhat.com/solutions/3209281(仅限订阅访问)
此解决方案是从此处删除 default-user="$local":
<security-realm name="ApplicationRealm">
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
我对两台机器上的两个独立 full.xml 文件都执行了此操作,它似乎没有任何区别。
我在两台机器上都创建了应用程序用户,并通过 JBoss 控制台授予他们超级用户权限,因为我认为在尝试写入文件时可能是权限问题,但这也无济于事。我还验证了两个用户凭据都是正确的。
根据 Justin 在评论中的建议,解决方法是改用核心桥而不是 JMS 桥。