[Geoserver-devel] [JIRA] (GEOS-10584) Enabling logging of request body results in stream closed errors in tomcat environment

Jody Garnett created an issue

GeoServer / BugGEOS-10584

Enabling logging of request body results in stream closed errors in tomcat environment

Issue Type:

BugBug

Affects Versions:

2.21.0

Assignee:

Unassigned

Components:

Main

Created:

12/Jul/22 4:40 PM

Environment:

Tomcat 9.5

Priority:

HighHigh

Reporter:

Jody Garnett

We have encountered a very challenging issue when running in a production environment using Java 8 and Tomcat 9.5:

  1. Global Settings
  2. Logging profile: DEFAULT_LOGGING
  3. Request logging:
    1. Enable request logging: true
    2. Log Request bodies: true
    3. Number of characters to log for incoming POST requests: 1024 (default)
    4. Log Request Headers: true
  4. The application starts to fail on any interaction where http POST is used:
    • Server Status, System status, check enable all statistics, checkbox disabled
    • Contact information, edit phone number, press save → Stream closed
    • GeoServer Logs display fine, click refresh → Stream closed
    • Edit global.xml to set values to false, Server Status, press Reload → Stream closed
      • global.xml values restored to true

Example:

12 023 02:23:16 ERROR  [geoserver.rest] - java.io.IOException: Stream closed
java.io.UncheckedIOException: java.io.IOException: Stream closed
	at java.io.BufferedReader$1.hasNext(BufferedReader.java:574)
	at java.util.Iterator.forEachRemaining(Iterator.java:115)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at org.geoserver.filters.BufferedRequestWrapper.parseFormBody(BufferedRequestWrapper.java:160)
	at org.geoserver.filters.BufferedRequestWrapper.parseParameters(BufferedRequestWrapper.java:133)
	at org.geoserver.filters.BufferedRequestWrapper.getParameter(BufferedRequestWrapper.java:89)
        ...
Caused by: java.io.IOException: Stream closed
	at org.apache.catalina.connector.InputBuffer.throwIfClosed(InputBuffer.java:546)
	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:345)
	at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:158)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
        ...

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100202-sha1:7f0496f)

Atlassian logo