Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-25508

(8.0.z) UNDERTOW-2305 Messaging clients are not load-balanced using Undertow loadbalancer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 8.0.0.GA-CR2, 8.0.0.GA
    • 8.0.0.GA-CR1
    • JMS, Undertow
    • None
    • False
    • None
    • False
    • Regression
    • Hide
      git clone -b master git@gitlab.mw.lab.eng.bos.redhat.com:mnovak/messaging-testsuite.git messaging-testsuite
      cd messaging-testsuite/scripts/
      
      groovy -DEAP_ZIP_URL=https://jenkins.eapqe.psi.redhat.com/job/eap-8.x-messaging-testing-prepare/1906/artifact/jboss-eap.zip PrepareServers7.groovy
      export WORKSPACE=$PWD
      export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap
      export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap
      export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap
      export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap
      
      cd ../jboss-hornetq-testsuite/
      mvn clean install -B -Dartemis.version=2.26.0 -Deap7.org.jboss.qa.hornetq.apps.clients.version=8.1692999002-SNAPSHOT -DreuseForks=false -Dmaven.test.failure.ignore=true -Deap7.clients.version=8.1692999002-SNAPSHOT -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dtest=ClusterFrontEndLoadBalancingTestCase#basicSendReceiveUndertowStaticBalancerJmsClient | tee log
      
      Show
      git clone -b master git@gitlab.mw.lab.eng.bos.redhat.com:mnovak/messaging-testsuite.git messaging-testsuite cd messaging-testsuite/scripts/ groovy -DEAP_ZIP_URL=https: //jenkins.eapqe.psi.redhat.com/job/eap-8.x-messaging-testing-prepare/1906/artifact/jboss-eap.zip PrepareServers7.groovy export WORKSPACE=$PWD export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap cd ../jboss-hornetq-testsuite/ mvn clean install -B -Dartemis.version=2.26.0 -Deap7.org.jboss.qa.hornetq.apps.clients.version=8.1692999002-SNAPSHOT -DreuseForks= false -Dmaven.test.failure.ignore= true -Deap7.clients.version=8.1692999002-SNAPSHOT -Dsurefire.failIfNoSpecifiedTests= false -Dmaven.wagon.http.ssl.insecure= true -Dmaven.wagon.http.ssl.allowall= true -Dtest=ClusterFrontEndLoadBalancingTestCase#basicSendReceiveUndertowStaticBalancerJmsClient | tee log

      There was hit a regression (against 8.0.0.Beta) in one of the messaging scenarios with Undertow loadbalancer:

      • Start EAP configured as a static load balancer using reverse proxy
      • Start 2 EAP backend servers with messaging
      • Producer starts to send messages, it uses connection factory pointing to loadbalancer, not knowing about backed workers
      • Producer repeats sending with creating of new connection - connections should be balanced between workers
      • Receiver receives messages, it uses connection factory pointing to loadbalancer, not knowing about backed workers
      • Receiver repeats receive with creating of new connection - connections should be balanced between workers and receive messages from all of them

      Expected result: Receiver gets the same amount of messages as was sent
      Actual result: None of the clients is connected

      By bisecting the commits it seems that regression is caused by:
      https://github.com/undertow-io/undertow/commit/ffccfee47114828d9516afbd44fb99565d3d0f78

      There is error on server with load-balancer:

      09:44:52,993 ERROR [org.xnio.listener] (default I/O-5) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http2.Http2ClearClientProvider.createSettingsFrame(Http2ClearClientProvider.java:173)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler.copyHeaders(ProxyHandler.java:291)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyAction.run(ProxyHandler.java:461)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:35)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.HttpServerExchange.dispatch(HttpServerExchange.java:844)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:348)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:322)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.LoadBalancingProxyClient$3.completed(LoadBalancingProxyClient.java:320)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.LoadBalancingProxyClient$3.completed(LoadBalancingProxyClient.java:298)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool.connectionReady(ProxyConnectionPool.java:353)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool$2.completed(ProxyConnectionPool.java:287)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool$2.completed(ProxyConnectionPool.java:274)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider.handleConnected(HttpClientProvider.java:181)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider$3.handleEvent(HttpClientProvider.java:152)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider$3.handleEvent(HttpClientProvider.java:149)
      	at org.jboss.xnio@3.8.9.Final//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.jboss.xnio.nio@3.8.9.Final//org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:333)
      	at org.jboss.xnio.nio@3.8.9.Final//org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      

      On the client there is exception:

      javax.naming.CommunicationException [Root exception is java.nio.channels.ClosedChannelException]
      	at org.wildfly.httpclient.naming.HttpRootContext.performOperation(HttpRootContext.java:361)
      	at org.wildfly.httpclient.naming.HttpRootContext.lambda$processInvocation$1(HttpRootContext.java:280)
      	at org.wildfly.httpclient.naming.HttpRootContext.performWithRetry(HttpRootContext.java:202)
      	at org.wildfly.httpclient.naming.HttpRootContext.processInvocation(HttpRootContext.java:259)
      	at org.wildfly.httpclient.naming.HttpRootContext.lookupNative(HttpRootContext.java:133)
      	at org.wildfly.naming.client.AbstractContext.lookup(AbstractContext.java:84)
      	at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
      	at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
      	at org.jboss.qa.hornetq.apps.clients.ConnectionBalancingProducerTransAck.run(ConnectionBalancingProducerTransAck.java:60)
      Caused by: java.nio.channels.ClosedChannelException
      	at io.undertow.client.http2.Http2ClientConnection.close(Http2ClientConnection.java:308)
      	at io.undertow.client.http2.Http2ClientConnection$Http2ReceiveListener.handleEvent(Http2ClientConnection.java:503)
      	at io.undertow.client.http2.Http2ClientConnection$Http2ReceiveListener.handleEvent(Http2ClientConnection.java:389)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:974)
      	at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:954)
      	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:591)
      09:46:23,043 ERROR [org.xnio.listener] (default I/O-5) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http2.Http2ClearClientProvider.createSettingsFrame(Http2ClearClientProvider.java:173)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler.copyHeaders(ProxyHandler.java:291)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyAction.run(ProxyHandler.java:461)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:35)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.HttpServerExchange.dispatch(HttpServerExchange.java:844)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:348)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:322)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.LoadBalancingProxyClient$3.completed(LoadBalancingProxyClient.java:320)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.LoadBalancingProxyClient$3.completed(LoadBalancingProxyClient.java:298)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool.connectionReady(ProxyConnectionPool.java:353)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool$2.completed(ProxyConnectionPool.java:287)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.server.handlers.proxy.ProxyConnectionPool$2.completed(ProxyConnectionPool.java:274)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider.handleConnected(HttpClientProvider.java:181)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider$3.handleEvent(HttpClientProvider.java:152)
      	at io.undertow.core@2.3.test-SNAPSHOT//io.undertow.client.http.HttpClientProvider$3.handleEvent(HttpClientProvider.java:149)
      	at org.jboss.xnio@3.8.9.Final//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.jboss.xnio.nio@3.8.9.Final//org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:333)
      	at org.jboss.xnio.nio@3.8.9.Final//org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      

              thofman Tomas Hofman
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: