-
15. Re: Invoking remote EJB deployed on Wildfly11 server from another client application also deployed on Wildfly11
azepeda Mar 14, 2018 10:21 AM (in response to andey)Hi,
I had the same problem with a setup running Wildfly 11 and then again running Wildfly 12.
I used three machines: my desktop pc for the standalone client (sandbox), one for the client server (tmp0) with Wildfly 12 and another for the destination server (tmp1) with Wildfly 12.
The users ejb and probe were added using add-user.sh at both servers. The calls were done using only one of them for all the process, which failed, and then using probe for the first call and ejb for the second call, which failed too.
Independent requests from sandbox to tmp0 and to tmp1 worked perfectly. However, a request from sandbox to tmp0, which triggered another request to tmp1, failed showing this log:
2018/03/12 09:44:15,391 ERROR k-4 com.geoaire.probe.ejb.ProbeBean(getProbeRemoteImpl1:168): org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available
org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:567) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:108) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:78) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:569) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:503) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:913) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at com.sun.proxy.$Proxy93.ping(Unknown Source) ~[?:?]
at com.geoaire.probe.ejb.ProbeBean.getProbeRemoteImpl1(ProbeBean.java:159) ~[probe2-ejb.jar:?]
at com.geoaire.probe.ejb.ProbeBean.getProbeRemote(ProbeBean.java:73) ~[probe2-ejb.jar:?]
at com.geoaire.probe.ejb.ProbeBean.ping(ProbeBean.java:61) ~[probe2-ejb.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90) ~[?:?]
at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101) ~[?:?]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) ~[wildfly-ee-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:330) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) ~[?:?]
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81) ~[weld-ejb-3.0.3.Final.jar!/:3.0.3.Final]
at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438) ~[?:?]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) ~[?:?]
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198) ~[?:?]
at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:541) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:536) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:194) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Suppressed: org.jboss.ejb.client.RequestSendFailedException
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:101) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:74) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:215) ~[?:?]
at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720) ~[?:?]
at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926) ~[?:?]
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:
JBOSS-LOCAL-USER: javax.security.sasl.SaslException: ELY05128: Failed to read challenge file [Caused by java.io.FileNotFoundException: /opt/wildfly/wildfly-12.0.0.Final/standalone/tmp/auth/local4427632982853385589.challenge (No such file or directory)]
at org.jboss.remoting3.remote.ClientConnectionOpenListener.allMechanismsFailed(ClientConnectionOpenListener.java:109) ~[?:?]
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:446) ~[?:?]
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242) ~[?:?]
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[xnio-api-3.6.2.Final.jar!/:3.6.2.Final]
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) ~[xnio-api-3.6.2.Final.jar!/:3.6.2.Final]
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) ~[xnio-nio-3.6.2.Final.jar!/:3.6.2.Final]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591) ~[xnio-nio-3.6.2.Final.jar!/:3.6.2.Final]
at ...asynchronous invocation...(Unknown Source) ~[?:?]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:570) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:536) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:82) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:55) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:487) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122) ~[jboss-remoting-5.0.5.Final.jar!/:5.0.5.Final]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$2(RemoteEJBReceiver.java:185) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:185) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.processInvocation(RemoteEJBReceiver.java:128) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:454) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocation(RemotingEJBClientInterceptor.java:51) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocation(TransactionPostDiscoveryInterceptor.java:67) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:89) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:66) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:165) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203) ~[wildfly-common-1.3.0.Final.jar!/:1.3.0.Final]
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:302) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:173) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112) ~[jboss-ejb-client-4.0.9.Final.jar!/:4.0.9.Final]
at com.sun.proxy.$Proxy93.ping(Unknown Source) ~[?:?]
at com.geoaire.probe.ejb.ProbeBean.getProbeRemoteImpl1(ProbeBean.java:159) ~[probe2-ejb.jar:?]
at com.geoaire.probe.ejb.ProbeBean.getProbeRemote(ProbeBean.java:73) ~[probe2-ejb.jar:?]
at com.geoaire.probe.ejb.ProbeBean.ping(ProbeBean.java:61) ~[probe2-ejb.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90) ~[?:?]
at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101) ~[?:?]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) ~[wildfly-ee-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:330) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) ~[?:?]
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81) ~[weld-ejb-3.0.3.Final.jar!/:3.0.3.Final]
at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[jboss-invocation-1.5.0.Final.jar!/:1.5.0.Final]
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438) ~[?:?]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57) ~[?:?]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) ~[?:?]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) ~[?:?]
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198) ~[?:?]
at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:541) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:536) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:194) ~[wildfly-ejb3-12.0.0.Final.jar!/:12.0.0.Final]
... 5 more
Suppressed: javax.security.sasl.SaslException: ELY05128: Failed to read challenge file
at org.wildfly.security.sasl.localuser.LocalUserClient.evaluateMessage(LocalUserClient.java:108) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.wildfly.security.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:199) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.wildfly.security.sasl.util.AbstractSaslClient.evaluateChallenge(AbstractSaslClient.java:79) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClient.evaluateChallenge(AbstractDelegatingSaslClient.java:54) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.wildfly.security.sasl.util.PrivilegedSaslClient.lambda$evaluateChallenge$0(PrivilegedSaslClient.java:55) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144]
at org.wildfly.security.sasl.util.PrivilegedSaslClient.evaluateChallenge(PrivilegedSaslClient.java:55) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication.lambda$handleEvent$0(ClientConnectionOpenListener.java:650) ~[?:?]
at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926) ~[?:?]
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) [jboss-threads-2.3.1.Final.jar!/:2.3.1.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: java.io.FileNotFoundException: /opt/wildfly/wildfly-12.0.0.Final/standalone/tmp/auth/local4427632982853385589.challenge (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_144]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_144]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_144]
at org.wildfly.security.sasl.localuser.LocalUserClient.evaluateMessage(LocalUserClient.java:94) ~[wildfly-elytron-1.2.2.Final.jar!/:1.2.2.Final]
... 13 more
Following the guide "Getting started with EJBs and Elytron Part 1: Securing EJBs and invoking them from remote clients" tells, the standalone client in sandbox called client server tmp0 without issues:
private ProbeRemote2 getProbeRemote2() throws Exception
{
Properties jndiProperties = new Properties();
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
jndiProperties.put(Context.PROVIDER_URL, "remote+http://tmp0:8080");
// jndiProperties.put(Context.SECURITY_PRINCIPAL, username);
// jndiProperties.put(Context.SECURITY_CREDENTIALS, password);
jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
jndiProperties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", true);
jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", false);
jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", false);
Context context = new InitialContext(jndiProperties);
return (ProbeRemote2) context.lookup("probe2/probe2-ejb//ProbeBean!" + ProbeRemote2.class.getName());
}
<configuration>
<authentication-client xmlns="urn:elytron:1.0">
<authentication-rules>
<rule use-configuration="default" />
</authentication-rules>
<authentication-configurations>
<configuration name="default">
<set-user-name name="ejb" />
<credentials>
<clear-password password="ejb2017" />
</credentials>
</configuration>
</authentication-configurations>
</authentication-client>
<jboss-ejb-client xmlns="urn:jboss:wildfly-client-ejb:3.0">
<connections>
<connection uri="remote+http://tmp0:8080" />
</connections>
</jboss-ejb-client>
</configuration>
In the client server tmp0, the setup was done as it is suggested in the guide "Getting started with EJBs and Elytron Part 2: EJB invocations from remote servers" (including the correction to a little typo),
/subsystem=elytron/authentication-configuration=ejb-auth-config:add(authentication-name=ejb, credential-reference={clear-text="ejb2017"})
/subsystem=elytron/authentication-context=ejb-auth-context:add(match-rules=[{authentication-configuration=ejb-auth-config}])
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-ejb:add(host=tmp1, port=8080)
/subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(authentication-context=ejb-auth-context, outbound-socket-binding-ref=remote-ejb)
Except adding the application users, nothing else was changed in the destination server tmp1.
Using a timer, which triggered the call from tmp0 to tmp1, all the calls failed with the same security exception.
Obvioulsy there is something I am missing... What should I do to allow the communication between two fresh wildfly servers?