Uploaded image for project: 'WildFly EJB HTTP Client'
  1. WildFly EJB HTTP Client
  2. WEJBHTTP-136

Exception "UT001000: Connection closed" when sending a byte array in an EJB remote call using HTTPS to an NGINX reverse proxy for a Wildfly 30.0.0.Final server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.12.Final, 2.0.2.Final
    • None
    • Hide

      We take the ejb-remote project from wildfly quick-starts github site to make a test showcase. 
      We make two additions to these projects:
          1.- On the server side in CalculatorBean class we add a "send" method with a single byte array parameter
          2.- On the client side in RemoteEJBClient class we add 20 invocations to that method "send" stoping when an exception occurs 
      At last we create a .bat file to execute the client side of the quick start to reproduce the issue
      The test show case is packaged in client-side.zip.
      Inside logs.zip attachment you can find client.log, java0.log.0 and NGINX.json to see ours results. java0.log.0 is the client result of java logging with FINEST level. NGINX.json is the log of the 408 NGINX response code status.
      The sources are inside sources.zip: ejb-remote-client-sources.jar and ejb-remote-server-side-sources.jar
      The deployment of the beans are in server-side.zip

      Steps to reproduce:
          1.- Unzip the client-side.zip
          2.- set the JAVA_HOME environment variable 
          3.- run the script from the step 1, client/ejb-remote-client-test.bat to reproduce the issue

      The result of step 3 shows that the calls of quick starts to RemoteCalculator goes well but when the calls of the remote method "send" at the tenth try, after 60088 milliseconds, the issue occurs. This is the output:

      nov. 13, 2023 5:46:52 P.áM. org.wildfly.naming.client.Version <clinit>
      INFO: WildFly Naming version 2.0.1.Final
      nov. 13, 2023 5:46:52 P.áM. org.wildfly.security.Version <clinit>
      INFO: ELY00001: WildFly Elytron version 2.2.2.Final
      nov. 13, 2023 5:46:52 P.áM. org.jboss.ejb.client.EJBClient <clinit>
      INFO: JBoss EJB Client version 5.0.5.Final
      Obtained a remote stateless calculator for invocation
      Adding 204 and 340 via the remote stateless calculator deployed on the server
      nov. 13, 2023 5:46:53 P.áM. org.xnio.Xnio <clinit>
      INFO: XNIO version 3.8.11.Final
      nov. 13, 2023 5:46:53 P.áM. org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.8.11.Final
      nov. 13, 2023 5:46:53 P.áM. org.jboss.threads.Version <clinit>
      INFO: JBoss Threads version 2.4.0.Final
      nov. 13, 2023 5:46:53 P.áM. org.jboss.remoting3.EndpointImpl <clinit>
      INFO: JBoss Remoting version 5.0.27.Final
      Remote calculator returned sum = 544
      Subtracting 2332 from 3434 via the remote stateless calculator deployed on the server
      Remote calculator returned difference = 1102
      Obtained a remote stateful counter for invocation
      Counter will now be incremented 5 times
      Incrementing counter
      Count after increment is 1
      Incrementing counter
      Count after increment is 2
      Incrementing counter
      Count after increment is 3
      Incrementing counter
      Count after increment is 4
      Incrementing counter
      Count after increment is 5
      Counter will now be decremented 5 times
      Decrementing counter
      Count after decrement is 4
      Decrementing counter
      Count after decrement is 3
      Decrementing counter
      Count after decrement is 2
      Decrementing counter
      Count after decrement is 1
      Decrementing counter
      Count after decrement is 0
      sending 61564 bytes...OK
      sending 61664 bytes...OK
      sending 61764 bytes...OK
      sending 61864 bytes...OK
      sending 61964 bytes...OK
      sending 62064 bytes...OK
      sending 62164 bytes...OK
      sending 62264 bytes...OK
      sending 62364 bytes...OK
      sending 62464 bytes...jakarta.ejb.EJBException: java.io.IOException: UT001000: Connection closed
              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:212)
              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:116)
              at jdk.proxy1/jdk.proxy1.$Proxy0.send(Unknown Source)
              at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.sendBytes(RemoteEJBClient.java:64)
              at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.main(RemoteEJBClient.java:47)
      Caused by: java.io.IOException: UT001000: Connection closed
              at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:600)
              at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:535)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1279)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:603)
      ERROR - delay [60088] - error [java.io.IOException: UT001000: Connection closed]
      END
      Show
      We take the ejb-remote project from wildfly quick-starts github site to make a test showcase.  We make two additions to these projects:     1.- On the server side in CalculatorBean class we add a "send" method with a single byte array parameter     2.- On the client side in RemoteEJBClient class we add 20 invocations to that method "send" stoping when an exception occurs  At last we create a .bat file to execute the client side of the quick start to reproduce the issue The test show case is packaged in client-side.zip. Inside logs.zip attachment you can find client.log, java0.log.0 and NGINX.json to see ours results. java0.log.0 is the client result of java logging with FINEST level. NGINX.json is the log of the 408 NGINX response code status. The sources are inside sources.zip: ejb-remote-client-sources.jar and ejb-remote-server-side-sources.jar The deployment of the beans are in server-side.zip Steps to reproduce:     1.- Unzip the client-side.zip     2.- set the JAVA_HOME environment variable      3.- run the script from the step 1, client/ejb-remote-client-test.bat to reproduce the issue The result of step 3 shows that the calls of quick starts to RemoteCalculator goes well but when the calls of the remote method "send" at the tenth try, after 60088 milliseconds, the issue occurs. This is the output: nov. 13, 2023 5:46:52 P.áM. org.wildfly.naming.client.Version <clinit> INFO: WildFly Naming version 2.0.1.Final nov. 13, 2023 5:46:52 P.áM. org.wildfly.security.Version <clinit> INFO: ELY00001: WildFly Elytron version 2.2.2.Final nov. 13, 2023 5:46:52 P.áM. org.jboss.ejb.client.EJBClient <clinit> INFO: JBoss EJB Client version 5.0.5.Final Obtained a remote stateless calculator for invocation Adding 204 and 340 via the remote stateless calculator deployed on the server nov. 13, 2023 5:46:53 P.áM. org.xnio.Xnio <clinit> INFO: XNIO version 3.8.11.Final nov. 13, 2023 5:46:53 P.áM. org.xnio.nio.NioXnio <clinit> INFO: XNIO NIO Implementation Version 3.8.11.Final nov. 13, 2023 5:46:53 P.áM. org.jboss.threads.Version <clinit> INFO: JBoss Threads version 2.4.0.Final nov. 13, 2023 5:46:53 P.áM. org.jboss.remoting3.EndpointImpl <clinit> INFO: JBoss Remoting version 5.0.27.Final Remote calculator returned sum = 544 Subtracting 2332 from 3434 via the remote stateless calculator deployed on the server Remote calculator returned difference = 1102 Obtained a remote stateful counter for invocation Counter will now be incremented 5 times Incrementing counter Count after increment is 1 Incrementing counter Count after increment is 2 Incrementing counter Count after increment is 3 Incrementing counter Count after increment is 4 Incrementing counter Count after increment is 5 Counter will now be decremented 5 times Decrementing counter Count after decrement is 4 Decrementing counter Count after decrement is 3 Decrementing counter Count after decrement is 2 Decrementing counter Count after decrement is 1 Decrementing counter Count after decrement is 0 sending 61564 bytes...OK sending 61664 bytes...OK sending 61764 bytes...OK sending 61864 bytes...OK sending 61964 bytes...OK sending 62064 bytes...OK sending 62164 bytes...OK sending 62264 bytes...OK sending 62364 bytes...OK sending 62464 bytes...jakarta.ejb.EJBException: java.io.IOException: UT001000: Connection closed         at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:212)         at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:116)         at jdk.proxy1/jdk.proxy1.$Proxy0.send(Unknown Source)         at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.sendBytes(RemoteEJBClient.java:64)         at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.main(RemoteEJBClient.java:47) Caused by: java.io.IOException: UT001000: Connection closed         at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:600)         at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:535)         at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)         at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)         at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1279)         at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)         at org.xnio.nio.WorkerThread.run(WorkerThread.java:603) ERROR - delay [60088] - error [java.io.IOException: UT001000: Connection closed] END

      When a client application sends a byte array using remote EJB invocations over HTTPS, NGINX responds with status 408 (timeout) after a minute causing java.io.IOException: UT001000: Connection closed on the client side.
      We see that occasionally the client remote invocation is not capable to send all the request payload and the server stays wating. After a minute, NGINX returns 408.
      We couldn't reproduce the issue in localhost.
      Only over LAN or internet with latencies between 10 and 80 milliseconds.

        1. client-side.zip
          10.89 MB
        2. logs.zip
          69 kB
        3. server-side.zip
          4 kB
        4. sources.zip
          11 kB

            Unassigned Unassigned
            luisferreiranodum Luis Ferreira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: