You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2024/02/15 11:24:11 UTC

[Bug 68631] New: Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

            Bug ID: 68631
           Summary: Observing
                    org.apache.catalina.connector.ClientAbortException:
                    java.net.SocketTimeoutException
           Product: Tomcat 9
           Version: 9.0.74
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: suryanarayana.garlapati@nokia.com
  Target Milestone: -----

Created attachment 39589
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39589&action=edit
server.xml file

Hi, 
we are using tomcat 9.0.74 with SSL Enabled. we are observing following error
in our localhost.log when we send a POST request with body size 9000 bytes to
tomcat based servlet application(this issue is not seen when the size is less
than 8k bytes). Following is the backtrace.

{"type":"log", "host":"localhost", "level":"DEBUG", "neid":"0",
"system":"TOMCAT", "time":"2024-02-08T10:23:11.776Z", "timezone":"UTC",
"log":{"message":"Exception thrown whilst processing POSTed parameters"}}
org.apache.catalina.connector.ClientAbortException:
java.net.SocketTimeoutException
        at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:318)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:596)
~[catalina.jar:9.0.74]
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:336)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:131)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.Request.readPostBody(Request.java:3282)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.Request.parseParameters(Request.java:3219)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.Request.getParameter(Request.java:1117)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:309)
~[catalina.jar:9.0.74]
        at
javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:159)
~[servlet-api.jar:4.0.FR]
        at
webgui.hlr.wm.filter.GuiXssValidator.getParameter(GuiXssValidator.java:122)
~[webgui.jar:22.2.0-23.2111]
        at
webgui.hlr.wm.filter.GuiXssValidator.getParameter(GuiXssValidator.java:115)
~[webgui.jar:22.2.0-23.2111]
        at
webgui.webguicommon.filter.GuiSecurityFilter.doFilter(GuiSecurityFilter.java:57)
~[classes/:?]
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
~[catalina.jar:9.0.74]
        at webgui.hlr.wm.filter.GuiXssFilter.doFilter(GuiXssFilter.java:61)
~[webgui.jar:22.2.0-23.2111]
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
~[catalina.jar:9.0.74]
        at
webgui.hlr.wm.filter.GuiSessionFilter.doFilter(GuiSessionFilter.java:66)
~[webgui.jar:22.2.0-23.2111]
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
~[catalina.jar:9.0.74]
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
~[catalina.jar:9.0.74]
        at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
~[tomcat-util.jar:9.0.74]
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
~[tomcat-util.jar:9.0.74]
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
~[tomcat-util.jar:9.0.74]
        at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.net.SocketTimeoutException
        at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1317)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1234)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:785)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.http11.Http11InputBuffer.access$400(Http11InputBuffer.java:41)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1179)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:97)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:244)
~[tomcat-coyote.jar:9.0.74]
        at org.apache.coyote.Request.doRead(Request.java:619)
~[tomcat-coyote.jar:9.0.74]
        at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:313)
~[catalina.jar:9.0.74]
        ... 36 more

Following is the server.xml configuration(attached as well)

<Connector defaultSSLHostConfigName="127.0.0.1" port="9880"
connectionUploadTimeout="90000" disableUploadTimeout="false"
protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
scheme="https" secure="true" ><SSLHostConfig hostName="127.0.0.1"
ciphers="TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
honorCipherOrder="true" sslProtocol="SSL"
protocols="TLSv1.3,TLSv1.2"><Certificate
certificateFile="/var/lib/hosted_ui/data/ssl/server.crt"
certificateKeyFile="/var/lib/hosted_ui/data/ssl/server.key"/></SSLHostConfig><UpgradeProtocol
className="org.apache.coyote.http2.Http2Protocol"/></Connector>

We tried enabling the AprConnector,  but still issue is same.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

Suryanarayana Garlapati <su...@nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |blocker
           Priority|P2                          |P1

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

--- Comment #2 from Suryanarayana Garlapati <su...@nokia.com> ---
Any help here?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Update to latest 9.0.x release and retest.

If you still see the issue, provide the simplest possible test case (with
source) that demonstrates the issue on a clean install of Tomcat.

Not marking as NEEDINFO (yet) as I want to test a 9000 byte upload over TLS
first (but I'd be surprised if that failed on a default install).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

--- Comment #1 from Suryanarayana Garlapati <su...@nokia.com> ---
This was working earlier in 9.0.20 and now we had upgraded to 9.0.74 and
observing the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
No response after 2+ weeks. This is heading towards WORKSFORME.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

--- Comment #5 from Suryanarayana Garlapati <su...@nokia.com> ---
Hi Mark,
We were busy in release work. This week will test on latest release and update
here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 68631] Observing org.apache.catalina.connector.ClientAbortException: java.net.SocketTimeoutException

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68631

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
The standard Tomcat unit tests included a test of POST over TLS with a 16MB
body. That has been passing consistently for as long as I can remember.

Adjusting the test to use a 9k body also passes.

I am therefore resolving this as WORKSFORME.

If you believe you are experiencing this issue then feel free to reopen the
issue provided that:

- you have tested with the latest release of any supported major version

- you have provided a minimal test case that reliably reproduces the issue on a
clean install of Tomcat from an ASF provided distribution

- you have included the full source code for your test case

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org