Skip to content

Instantly share code, notes, and snippets.

@kaweesi
Created September 3, 2018 08:27
Show Gist options
  • Save kaweesi/4b8e36cb3c80697ef78f38c9a747fe71 to your computer and use it in GitHub Desktop.
Save kaweesi/4b8e36cb3c80697ef78f38c9a747fe71 to your computer and use it in GitHub Desktop.
root@8c2eb78e50cb:/usr/local/tomcat# cat logs/catalina.2018-09-03.log
Sep 03, 2018 7:20:18 AM org.apache.coyote.http11.AbstractHttp11Processor process
INFO: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:240)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1049)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Sep 03, 2018 8:18:59 AM org.apache.coyote.http11.AbstractHttp11Processor process
INFO: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:240)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1049)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
root@8c2eb78e50cb:/usr/local/tomcat#
@kaweesi
Copy link
Author

kaweesi commented Sep 3, 2018

root@8c2eb78e50cb:/usr/local/tomcat# ./bin/version.sh 
Server version: Apache Tomcat/7.0.90
Server built:   Jul 2 2018 17:05:37 UTC
Server number:  7.0.90.0
OS Name:        Linux
OS Version:     4.4.0-127-generic
Architecture:   amd64
JVM Version:    1.8.0_171-8u171-b11-1~deb9u1-b11
JVM Vendor:     Oracle Corporation

@kaweesi
Copy link
Author

kaweesi commented Sep 10, 2018

resolved by adding

<Connector executor="tomcatThreadPool"
               port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" relaxedQueryChars="^{}[]|&quot;"/>

to /usr/local/tomcat/conf/server.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment