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

[GSS](8.0.z) Undertow multiple AJP responses are returned for a AJP request with a duration longer than read-timeout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 8.0 Update 7
    • None
    • Undertow
    • None
    • False
    • None
    • False
    • Hide

      1. add the below directive to httpd.conf

      ProxyPass "/app/" "ajp://127.0.0.1:8009/app/"
      TimeOut 300
      

      2. set-up JBoss EAP 8.0 with the latest patch

      $ unzip jboss-eap-8.0.0.zip
      $ cd jboss-eap-8.0
      $ bin/jboss-eap-installation-manager.sh update perform --yes
      $ mkdir standalone/deployments/app.war
      $ cp slow.jsp standalone/deployments/app.war/
      $ touch standalone/deployments/app.war.dodeploy
      $ bin/standalone.sh -c standalone-ha.xml
      

      3. Sending a request that takes 100 seconds. Then, we can see duplicate AJP responses on wireshark.

      $ curl 127.0.0.1/app/slow.jsp?timeout=100000
      
      Show
      1. add the below directive to httpd.conf ProxyPass "/app/" "ajp: //127.0.0.1:8009/app/" TimeOut 300 2. set-up JBoss EAP 8.0 with the latest patch $ unzip jboss-eap-8.0.0.zip $ cd jboss-eap-8.0 $ bin/jboss-eap-installation-manager.sh update perform --yes $ mkdir standalone/deployments/app.war $ cp slow.jsp standalone/deployments/app.war/ $ touch standalone/deployments/app.war.dodeploy $ bin/standalone.sh -c standalone-ha.xml 3. Sending a request that takes 100 seconds. Then, we can see duplicate AJP responses on wireshark. $ curl 127.0.0.1/app/slow.jsp?timeout=100000

      When an AJP request with a request duration longer than 90 seconds as read-timeout=“90000”, we can see duplicate response on wireshark. mod_proxy_ajp and mod_jk ignore duplicate responses, so it doesn't seem to cause any actual harm.

      jbeap_ajp_read-timeout_issue.pcap

      1	2024-12-06 17:24:11.211286	127.0.0.1	127.0.0.1	TCP	74	49708 → 8009 [SYN] Seq=0 Win=65495 Len=0 MSS=65495 SACK_PERM TSval=1576498431 TSecr=0 WS=128
      2	2024-12-06 17:24:11.211291	127.0.0.1	127.0.0.1	TCP	74	8009 → 49708 [SYN, ACK] Seq=0 Ack=1 Win=65483 Len=0 MSS=65495 SACK_PERM TSval=1576498431 TSecr=1576498431 WS=128
      3	2024-12-06 17:24:11.211296	127.0.0.1	127.0.0.1	TCP	66	49708 → 8009 [ACK] Seq=1 Ack=1 Win=65536 Len=0 TSval=1576498431 TSecr=1576498431
      4	2024-12-06 17:24:11.211316	127.0.0.1	127.0.0.1	AJP13	244	2:REQ:GET /app/sleep.jsp HTTP/1.1
      5	2024-12-06 17:24:11.211319	127.0.0.1	127.0.0.1	TCP	66	8009 → 49708 [ACK] Seq=1 Ack=179 Win=65408 Len=0 TSval=1576498431 TSecr=1576498431
      6	2024-12-06 17:25:51.479581	127.0.0.1	127.0.0.1	AJP13	350	2:RSP:SEND BODY CHUNK
      7	2024-12-06 17:25:51.479591	127.0.0.1	127.0.0.1	TCP	66	49708 → 8009 [ACK] Seq=179 Ack=285 Win=65280 Len=0 TSval=1576598699 TSecr=1576598699
      8	2024-12-06 17:25:51.480255	127.0.0.1	127.0.0.1	AJP13	72	2:RSP:END RESPONSE
      9	2024-12-06 17:25:51.480260	127.0.0.1	127.0.0.1	TCP	66	49708 → 8009 [ACK] Seq=179 Ack=291 Win=65280 Len=0 TSval=1576598700 TSecr=1576598700
      10	2024-12-06 17:25:51.482553	127.0.0.1	127.0.0.1	AJP13	84	2:RSP:END RESPONSE   <<<=== duplicate reponse due to read-timeout
      11	2024-12-06 17:25:51.482563	127.0.0.1	127.0.0.1	TCP	66	49708 → 8009 [ACK] Seq=179 Ack=309 Win=65280 Len=0 TSval=1576598702 TSecr=1576598702
      12	2024-12-06 17:25:51.483542	127.0.0.1	127.0.0.1	TCP	66	8009 → 49708 [FIN, ACK] Seq=309 Ack=179 Win=65536 Len=0 TSval=1576598703 TSecr=1576598702
      13	2024-12-06 17:25:51.524009	127.0.0.1	127.0.0.1	TCP	66	49708 → 8009 [ACK] Seq=179 Ack=310 Win=65280 Len=0 TSval=1576598744 TSecr=1576598703
      

        1. httpd.conf
          12 kB
        2. jbeap_ajp_read-timeout_issue.pcap
          2 kB
        3. slow.jsp
          0.3 kB

              rhn-cservice-bbaranow Bartosz Baranowski
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: