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

[GSS](8.0.z) Undertow: END_RESPONSE message is not sent when the request duration exceeds the write-timeout on ajp-listener with CPING/CPONG enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Undertow
    • None
    • False
    • None
    • False
    • Hide

      Set a value larger than the maximum request duration assumed for write-timeout in standalone.xml:

      <ajp-listener name="ajp" socket-binding="ajp" write-timeout="120000"/>
      
      Show
      Set a value larger than the maximum request duration assumed for write-timeout in standalone.xml: <ajp-listener name= "ajp" socket-binding= "ajp" write-timeout= "120000" />
    • Hide

      1. add the below directive to httpd.conf

      ProxyPass "/app/" "ajp://127.0.0.1:8009/app/" ping=10
      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 error message in Apache's error_log.

      $ 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/" ping=10 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 error message in Apache's error_log. $ curl 127.0.0.1/app/slow.jsp?timeout=100000

      When an AJP request with a request duration longer than 90 seconds as write-timeout=“90000” set by WFLY-14980 is sent, AJP END_RESPONSE message will not be responding, and the following error will be logged in Apache's error_log. It would not expected that the time between CPONG and sending an AJP response will be counted as part of the write-timeout.

      /etc/httpd/logs/error_log

      [Thu Dec 05 17:31:33.334793 2024] [proxy_ajp:error] [pid 60300:tid 60320] (70014)End of file found: AH01030: ajp_ilink_receive() can't receive header
      [Thu Dec 05 17:31:33.334836 2024] [proxy_ajp:error] [pid 60300:tid 60320] [client 127.0.0.1:45284] AH00992: ajp_read_header: ajp_ilink_receive failed
      [Thu Dec 05 17:31:33.334845 2024] [proxy_ajp:error] [pid 60300:tid 60320] (120006)APR does not understand this error code: [client 127.0.0.1:45284] AH00893: dialog to 127.0.0.1:8009 (127.0.0.1:8009) failed
      

      jbeap_ajp_write-timeout_issue.pcap

      1    2024-12-05 17:29:53.081136    127.0.0.1    127.0.0.1    TCP    74    42054 → 8009 [SYN] Seq=0 Win=65495 Len=0 MSS=65495 SACK_PERM TSval=3760530610 TSecr=0 WS=128
      2    2024-12-05 17:29:53.081140    127.0.0.1    127.0.0.1    TCP    74    8009 → 42054 [SYN, ACK] Seq=0 Ack=1 Win=65483 Len=0 MSS=65495 SACK_PERM TSval=3760530610 TSecr=3760530610 WS=128
      3    2024-12-05 17:29:53.081144    127.0.0.1    127.0.0.1    TCP    66    42054 → 8009 [ACK] Seq=1 Ack=1 Win=65536 Len=0 TSval=3760530610 TSecr=3760530610
      4    2024-12-05 17:29:53.081188    127.0.0.1    127.0.0.1    AJP13    71    2:REQ:CPING
      5    2024-12-05 17:29:53.081189    127.0.0.1    127.0.0.1    TCP    66    8009 → 42054 [ACK] Seq=1 Ack=6 Win=65536 Len=0 TSval=3760530610 TSecr=3760530610
      6    2024-12-05 17:29:53.090263    127.0.0.1    127.0.0.1    AJP13    71    2:RSP:CPONG
      7    2024-12-05 17:29:53.090271    127.0.0.1    127.0.0.1    TCP    66    42054 → 8009 [ACK] Seq=6 Ack=6 Win=65536 Len=0 TSval=3760530619 TSecr=3760530619
      8    2024-12-05 17:29:53.090330    127.0.0.1    127.0.0.1    AJP13    243    2:REQ:GET /app/slow.jsp HTTP/1.1
      9    2024-12-05 17:29:53.132099    127.0.0.1    127.0.0.1    TCP    66    8009 → 42054 [ACK] Seq=6 Ack=183 Win=65536 Len=0 TSval=3760530661 TSecr=3760530619
      10   2024-12-05 17:31:33.333474    127.0.0.1    127.0.0.1    AJP13    350    2:RSP:SEND BODY CHUNK
      11   2024-12-05 17:31:33.334781    127.0.0.1    127.0.0.1    TCP    66    8009 → 42054 [FIN, ACK] Seq=290 Ack=183 Win=65536 Len=0 TSval=3760630863 TSecr=3760530619
      12   2024-12-05 17:31:33.334861    127.0.0.1    127.0.0.1    TCP    66    42054 → 8009 [FIN, ACK] Seq=183 Ack=291 Win=65536 Len=0 TSval=3760630863 TSecr=3760630862
      13   2024-12-05 17:31:33.334875    127.0.0.1    127.0.0.1    TCP    66    8009 → 42054 [ACK] Seq=291 Ack=184 Win=65536 Len=0 TSval=3760630863 TSecr=3760630863
      

              jboss-set_jira JBoss SET
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: