[jboss-jira] [JBoss JIRA] (WFLY-11489) SFSB not sticky on a single cluster node when clustering of the bean is disabled

Richard Achmatowicz (Jira) issues at jboss.org
Wed Jan 16 13:11:03 EST 2019


    [ https://issues.jboss.org/browse/WFLY-11489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683150#comment-13683150 ] 

Richard Achmatowicz commented on WFLY-11489:
--------------------------------------------

Here is a trace of the fixed version which shows the new adjustments to affinity for the case of passivationEnabled=false. The affinity is being set as described above, and stickiness now holds: 
{code}
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ testclient ---
18:56:01,571 INFO  (main) [org.wildfly.naming] WildFly Naming version 1.0.9.Final-redhat-1
18:56:01,693 INFO  (main) [org.wildfly.security] ELY00001: WildFly Elytron version 1.1.10.Final-redhat-1
18:56:01,720 INFO  (main) [org.xnio] XNIO version 3.5.5.Final-redhat-1
18:56:01,727 INFO  (main) [org.xnio.nio] XNIO NIO Implementation Version 3.5.5.Final-redhat-1
18:56:01,800 INFO  (main) [org.jboss.remoting] JBoss Remoting version 5.0.8.Final-redhat-1
18:56:01,837 TRACE (main) [org.jboss.ejb.client.invocation] lookupNative: createSessionProxy, locator = StatelessEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, baseFaffinity = None
18:56:01,839 INFO  (main) [org.jboss.ejb.client] JBoss EJB Client version 4.0.11.Final
18:56:01,873 TRACE (main) [org.jboss.ejb.client.invocation] Calling createSession(locator = StatelessEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None)
18:56:01,876 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): calling interceptor: org.jboss.ejb.client.TransactionInterceptor at 3439f68d
18:56:01,877 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): calling interceptor: org.jboss.ejb.client.NamingEJBClientInterceptor at dbd940d
18:56:01,878 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): calling interceptor: org.jboss.ejb.client.DiscoveryEJBClientInterceptor at de3a06f
18:56:01,878 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): calling interceptor: org.jboss.ejb.client.TransactionPostDiscoveryInterceptor at 76b10754
18:56:01,878 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): calling interceptor: org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor at 3d8314f0
18:56:01,878 DEBUG (main) [org.jboss.ejb.client.invocation] session creation proceed(): setting receiver, remote destination is: remote+http://localhost:8380
18:56:02,231 DEBUG (XNIO-1 task-10) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node2, registering cluster ejb to node node2
18:56:02,233 DEBUG (XNIO-1 task-10) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node2, registering block ::/0 to address /127.0.0.1:8380
18:56:02,234 DEBUG (XNIO-1 task-10) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node2, registering cluster ejb to node node1
18:56:02,234 DEBUG (XNIO-1 task-10) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node2, registering block ::/0 to address /127.0.0.1:8080
18:56:02,235 DEBUG (XNIO-1 task-11) [org.jboss.ejb.client.invocation] Received MODULE_AVAILABLE(8) message from node2 for module test/test_ejb
18:56:02,241 TRACE (main) [org.jboss.ejb.client.invocation] EJBClientChannel.SessionOpenInvocation.getResult(): updating Locator (sessionID), new = StatefulEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, session ID is UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569]; weakAffinity = Node "node2"
18:56:02,242 TRACE (main) [org.jboss.ejb.client.invocation] Session created: session id: UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569] , affinity: None
18:56:02,243 TRACE (main) [org.jboss.ejb.client.invocation] EJBInvocationHandler: setting weak affinity = None
18:56:02,244 DEBUG (main) [org.jboss.ejb.client.invocation] Calling invoke(module = test/test_ejb/TestSessionEJB, strong affinity = None, weak affinity = Node "node2"): 
18:56:02,248 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.TransactionInterceptor at 3439f68d
18:56:02,248 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.NamingEJBClientInterceptor at dbd940d
18:56:02,249 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.DiscoveryEJBClientInterceptor at de3a06f
18:56:02,249 TRACE (main) [org.jboss.ejb.client.invocation] Calling executeDiscovery(locator = StatefulEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, session ID is UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569], weak affinity = Node "node2")
18:56:02,251 TRACE (main) [org.jboss.ejb.client.invocation] Performing first-match discovery(locator = StatefulEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, session ID is UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569], weak affinity = Node "node2", filter spec = (node=node2))
18:56:02,258 TRACE (main) [org.jboss.ejb.client.invocation] EJB discovery provider: attempting to connect to cluster ejb connection remote+http://127.0.0.1:8380
18:56:02,259 TRACE (main) [org.jboss.ejb.client.invocation] EJB discovery provider: attempting to connect to cluster ejb connection remote+http://127.0.0.1:8080
18:56:02,273 DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node2, registering cluster ejb to node node2
18:56:02,273 DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node2, registering block ::/0 to address /127.0.0.1:8380
18:56:02,273 DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node2, registering cluster ejb to node node1
18:56:02,274 DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node2, registering block ::/0 to address /127.0.0.1:8080
18:56:02,274 DEBUG (XNIO-1 task-2) [org.jboss.ejb.client.invocation] Received MODULE_AVAILABLE(8) message from node2 for module test/test_ejb
18:56:02,274 DEBUG (XNIO-1 task-3) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node1, registering cluster ejb to node node2
18:56:02,275 DEBUG (XNIO-1 task-3) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node1, registering block ::/0 to address /127.0.0.1:8380
18:56:02,275 DEBUG (XNIO-1 task-3) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message from node1, registering cluster ejb to node node1
18:56:02,275 DEBUG (XNIO-1 task-3) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY(15) message block from node1, registering block ::/0 to address /127.0.0.1:8080
18:56:02,276 DEBUG (XNIO-1 task-3) [org.jboss.ejb.client.invocation] Received MODULE_AVAILABLE(8) message from node1 for module test/test_ejb
18:56:02,278 TRACE (main) [org.jboss.ejb.client.invocation] Performed first-match discovery(target affinity = Node "node2", destination = remote+http://127.0.0.1:8380)
18:56:02,279 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.TransactionPostDiscoveryInterceptor at 76b10754
18:56:02,279 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor at 3d8314f0
18:56:02,279 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: setting receiver, remote destination is: remote+http://127.0.0.1:8380
18:56:02,279 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: strong affinity = None, weak affinity = Node "node2"
18:56:02,279 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 1e802ef9 from SENDING to SENT (org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:481))
18:56:02,280 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 1e802ef9 from SENT to WAITING (org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:364))
18:56:02,319 TRACE (XNIO-1 task-6) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 1e802ef9 from WAITING to READY (org.jboss.ejb.client.EJBClientInvocationContext.resultReady(EJBClientInvocationContext.java:683))
18:56:02,320 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 1e802ef9 from READY to CONSUMING (org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:580))
18:56:02,333 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 1e802ef9 from CONSUMING to DONE (org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:607))
18:56:02,334 TRACE (main) [org.jboss.ejb.client.invocation] getResult(): invocation returned, relocating EJB: strong affinity = None, weak affinity = Node "node2"
18:56:02,334 INFO  (main) [TestRedHat] method1 called
18:56:02,334 DEBUG (main) [org.jboss.ejb.client.invocation] Calling invoke(module = test/test_ejb/TestSessionEJB, strong affinity = None, weak affinity = Node "node2"): 
18:56:02,334 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.TransactionInterceptor at 3439f68d
18:56:02,334 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.NamingEJBClientInterceptor at dbd940d
18:56:02,334 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.DiscoveryEJBClientInterceptor at de3a06f
18:56:02,335 TRACE (main) [org.jboss.ejb.client.invocation] Calling executeDiscovery(locator = StatefulEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, session ID is UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569], weak affinity = Node "node2")
18:56:02,335 TRACE (main) [org.jboss.ejb.client.invocation] Performing first-match discovery(locator = StatefulEJBLocator for "test/test_ejb/TestSessionEJB", view is interface test.ITestSession, affinity is None, session ID is UUIDSessionID [00657b55-238a-4924-80c6-c710d6417569], weak affinity = Node "node2", filter spec = (node=node2))
18:56:02,335 TRACE (main) [org.jboss.ejb.client.invocation] EJB discovery provider: attempting to connect to cluster ejb connection remote+http://127.0.0.1:8380
18:56:02,336 TRACE (main) [org.jboss.ejb.client.invocation] EJB discovery provider: attempting to connect to cluster ejb connection remote+http://127.0.0.1:8080
18:56:02,336 TRACE (main) [org.jboss.ejb.client.invocation] Performed first-match discovery(target affinity = Node "node2", destination = remote+http://127.0.0.1:8380)
18:56:02,336 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.client.TransactionPostDiscoveryInterceptor at 76b10754
18:56:02,336 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: calling interceptor: org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor at 3d8314f0
18:56:02,336 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: setting receiver, remote destination is: remote+http://127.0.0.1:8380
18:56:02,337 DEBUG (main) [org.jboss.ejb.client.invocation] sendRequest: strong affinity = None, weak affinity = Node "node2"
18:56:02,337 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 79b06cab from SENDING to SENT (org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:481))
18:56:02,337 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 79b06cab from SENT to WAITING (org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:364))
18:56:02,341 TRACE (XNIO-1 task-12) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 79b06cab from WAITING to READY (org.jboss.ejb.client.EJBClientInvocationContext.resultReady(EJBClientInvocationContext.java:683))
18:56:02,342 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 79b06cab from READY to CONSUMING (org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:580))
18:56:02,342 TRACE (main) [org.jboss.ejb.client] Transitioning org.jboss.ejb.client.EJBClientInvocationContext at 79b06cab from CONSUMING to DONE (org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:607))
18:56:02,342 TRACE (main) [org.jboss.ejb.client.invocation] getResult(): invocation returned, relocating EJB: strong affinity = None, weak affinity = Node "node2"
18:56:02,342 INFO  (main) [TestRedHat] method2 called
{code}
 
Aside from running the Widfly testsuite, i'll have to check this over with a fine-toothed comb tomorrow to verify that I haven't changed overall affinity processing in a regressive way.

> SFSB not sticky on a single cluster node when clustering of the bean is disabled
> --------------------------------------------------------------------------------
>
>                 Key: WFLY-11489
>                 URL: https://issues.jboss.org/browse/WFLY-11489
>             Project: WildFly
>          Issue Type: Bug
>          Components: Clustering, Remoting
>    Affects Versions: 15.0.0.Final
>         Environment: A clustered environment with 2 nodes. Both nodes started with an unmodified {{standalone-ha.xml}} configuration (see _Steps to Reproduce_)
> This issue happens on 15.0.0.Final and was tested as well as on current head (sha: 372697282dccefd0b9df48e6aa4dcb69e1c4b40f).
>            Reporter: Jörg Bäsner
>            Assignee: Richard Achmatowicz
>            Priority: Major
>         Attachments: reproducer.zip
>
>
> In case a stateful session bean is annotated with:
> {{@Stateful(passivationCapable=false)}}
> then the serialization is *disabled* and thus the bean is only available on a single cluster node.
> When a client now calls two different methods on this stateful bean it intermittently ends up on different cluster nodes, resulting in the following Exception:
> {code}
> ERROR [org.jboss.as.ejb3.invocation] (default task-2) WFLYEJB0034: EJB Invocation failed on component TestSessionEJB for method public abstract void test.ITestSession.method2(java.lang.String,java.lang.String) throws javax.ejb.EJBException,java.rmi.RemoteException: javax.ejb.NoSuchEJBException: WFLYEJB0168: Could not find EJB with id UUIDSessionID [4b0f4a27-40ba-411b-8852-0108a5ec64f4]
> 	at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:55)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
> 	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)
> 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
> 	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:618)
> 	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:406)
> 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:565)
> 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:546)
> 	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:197)
> 	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> 	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
> 	at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list