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 2022/09/09 17:55:55 UTC

[Bug 66255] New: Error state [CLOSE_NOW] on HTTP/2 connections

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

            Bug ID: 66255
           Summary: Error state [CLOSE_NOW]  on HTTP/2 connections
           Product: Tomcat 9
           Version: 9.0.x
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: dev@tomcat.apache.org
          Reporter: matafagafo@yahoo.com
  Target Milestone: -----

I tried to use HTTP/2 protocol on my APP server running on the following
environment 

Tomcat Version: Apache Tomcat/9.0.65
JVM Version: OpenJDK 1.8.0_342-8u342-b07-0ubuntu1~20.04-b07
OS Name: Ubuntu 20.04.5 LTS     
OS Version: 5.15.0-1017-aws     
OS Architecture: aarch64

And even with the following connector config 

              <UpgradeProtocol
className="org.apache.coyote.http2.Http2Protocol"
                       compression="on"
                       overheadCountFactor="0"
                       overheadContinuationThreshold="0"
                       overheadDataThreshold="0"
                       overheadWindowUpdateThreshold="0"
                       readTimeout="2000000"
                       />



Some connections are closed with 

org.apache.coyote.AbstractProcessor.setErrorState Error state [CLOSE_NOW]
reported while processing request
        org.apache.coyote.CloseNowException: Connection [15], Stream [215],
This stream is not writable
                at
org.apache.coyote.http2.Stream.doStreamCancel(Stream.java:257)
                at
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:898)
                at
org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:940)
                at
org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:859)
                at
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:159)
                at
java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:168)
                at
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:126)
                at
org.apache.coyote.http2.Http2OutputBuffer.end(Http2OutputBuffer.java:71)
                at
org.apache.coyote.http2.StreamProcessor.finishResponse(StreamProcessor.java:230)
                at
org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:389)
                at org.apache.coyote.Response.action(Response.java:209)
                at
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:262)
                at
org.apache.catalina.connector.Response.finishResponse(Response.java:443)
                at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:391)
                at
org.apache.coyote.http2.StreamProcessor.service(StreamProcessor.java:426)
                at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at
org.apache.coyote.http2.StreamProcessor.process(StreamProcessor.java:87)
                at
org.apache.coyote.http2.StreamRunnable.run(StreamRunnable.java:35)
                at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:748)
        Caused by: org.apache.coyote.http2.StreamException: Connection [15],
Stream [215], This stream is not writable
                at
org.apache.coyote.http2.Stream.doStreamCancel(Stream.java:249)
                ... 21 more

I'm attaching the full Catalina log here.
Thanks in advance for your time

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

--- Comment #2 from Matafagafo <ma...@yahoo.com> ---
The log file is too large to attach, so I upload to WeTransfer

URL: https://we.tl/t-QvmXeeWQPe

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Steps to reproduce from a clean install of the latest stable 9.0.x (or any
other currently supported major version) release please.

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

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

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

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
That is a debug level log message. Such messages are expected when using HTTP/2
and likely indicate that the client reset the stream.

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

--- Comment #3 from Matafagafo <ma...@yahoo.com> ---
(In reply to Mark Thomas from comment #1)
> Steps to reproduce from a clean install of the latest stable 9.0.x (or any
> other currently supported major version) release please.

A Tomcat 9.0.65 configured to enable HTTP/2, using the following connector
configuration in server.xml 

   <Connector port="443" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
                SSLEnabled="true"
               address="0.0.0.0"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               SSLCertificateFile="/etc/tomcat9/xxxxx.com.crt"
               SSLCertificateChainFile="/etc/tomcat9/chain.pem"
               SSLCertificateKeyFile="/etc/tomcat9/xxxxx.com.pem"
               SSLPassword="xxxxxxxxxx"
               SSLCipherSuite="ALL:!ADH:!SSLv2:!EXPORT40:!EXP:!LOW:!aNULL"
            compression="on"
             >
               <UpgradeProtocol
className="org.apache.coyote.http2.Http2Protocol"
                       compression="on"
                       overheadCountFactor="0"
                        overheadContinuationThreshold="0"
                       overheadDataThreshold="0"
                       overheadWindowUpdateThreshold="0"
                       readTimeout="2000000"
                       />
        </Connector>


With HTTP/2 enabled, spurious *Unable to write to stream once it has been
closed* are generated, as you can see on attached log file.
With HTTP/2 disabled the errors don't occurs any more.
I want to enable HTTP/2 but with this errors it is impossible.

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

Matafagafo <ma...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Matafagafo <ma...@yahoo.com> ---
Please, let me know, if you needs more informations or some tests to help to
narrow this down.

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

--- Comment #5 from Matafagafo <ma...@yahoo.com> ---
(In reply to Matafagafo from comment #2)
> The log file is too large to attach, so I upload to WeTransfer
> 
> URL: https://we.tl/t-QvmXeeWQPe

I reduced the log file removing some application messages 
So please use the following URL to access the log file

https://we.tl/t-FROOCDNdCh

-- 
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 66255] Error state [CLOSE_NOW] on HTTP/2 connections

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

--- Comment #4 from Matafagafo <ma...@yahoo.com> ---
I have no clear steps to reproduce the problem, because they happen while users
are accessing my APP running on Tomcat.
I didn't find a way (a sequence) to generate the problem.

-- 
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