You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by dk...@ccilindia.co.in on 2020/02/26 13:30:48 UTC

Error parsing HTTP request header

Dear Team,

We are getting below error in catelina log while starting the tomcat.

26-Feb-2020 18:57:36.795 INFO [main] 
org.apache.catalina.startup.Catalina.start Server startup in 21520 ms
26-Feb-2020 18:57:38.277 INFO [http-nio-443-exec-11] 
org.apache.coyote.http11.AbstractHttp11Processor.process 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.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:283)
        at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
        at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
        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)

Will this impact any performance of our tomcat.

Thanks & Regards
Deepak Kumar
CCIL - IT
022-61546230
CIN of CCIL- U65990MH2001PLC131804
"Disclaimer and confidentiality clause -
 This message and any attachments relating to official business of CCIL OR ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original addressee only.
The message may contain information that is confidential and subject to legal privilege. 
Any views expressed in this message are those of the individual sender. 
If you have received this message in error, please notify the original sender immediately and destroy the message and copies thereof and any attachments contained in it .
 If you are not the intended recipient of this message, you are hereby notified that you must not disseminate, copy, use, distribute, or take any action in connection therewith. 
 CCIL cannot ensure that the integrity of this communication has been maintained nor that it is free of errors, viruses, interception and/or interference. 
CCIL is not liable whatsoever for loss or damage resulting from the opening of this message and/or attachments and/or the use of the information contained in this message and/or attachments."

RE: Error parsing HTTP request header

Posted by dk...@ccilindia.co.in.
May I know the tomcat version please.

- It is apache-tomcat-8.0.41
-----Original Message-----
From: dkumar@ccilindia.co.in [mailto:dkumar@ccilindia.co.in] 
Sent: 26 February 2020 19:01
To: 'Tomcat Users List'
Subject: Error parsing HTTP request header

Dear Team,

We are getting below error in catelina log while starting the tomcat.

26-Feb-2020 18:57:36.795 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in 21520 ms
26-Feb-2020 18:57:38.277 INFO [http-nio-443-exec-11]
org.apache.coyote.http11.AbstractHttp11Processor.process 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.AbstractNioInputBuffer.parseRequestLine(AbstractNio
InputBuffer.java:283)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce
ssor.java:1017)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.jav
a:1524)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
1480)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)
        at java.lang.Thread.run(Thread.java:748)

Will this impact any performance of our tomcat.

Thanks & Regards
Deepak Kumar
CCIL - IT
022-61546230
CIN of CCIL- U65990MH2001PLC131804

"Disclaimer and confidentiality clause -
 This message and any attachments relating to official business of CCIL OR ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original addressee only.
The message may contain information that is confidential and subject to legal privilege. 
Any views expressed in this message are those of the individual sender. 
If you have received this message in error, please notify the original sender immediately and destroy the message and copies thereof and any attachments contained in it .
 If you are not the intended recipient of this message, you are hereby notified that you must not disseminate, copy, use, distribute, or take any action in connection therewith. 
 CCIL cannot ensure that the integrity of this communication has been maintained nor that it is free of errors, viruses, interception and/or interference. 
CCIL is not liable whatsoever for loss or damage resulting from the opening of this message and/or attachments and/or the use of the information contained in this message and/or attachments."

RE: Error parsing HTTP request header

Posted by Naga Ramesh <na...@manthan.com.INVALID>.
May I know the tomcat version please.

-----Original Message-----
From: dkumar@ccilindia.co.in [mailto:dkumar@ccilindia.co.in] 
Sent: 26 February 2020 19:01
To: 'Tomcat Users List'
Subject: Error parsing HTTP request header

Dear Team,

We are getting below error in catelina log while starting the tomcat.

26-Feb-2020 18:57:36.795 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in 21520 ms
26-Feb-2020 18:57:38.277 INFO [http-nio-443-exec-11]
org.apache.coyote.http11.AbstractHttp11Processor.process 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.AbstractNioInputBuffer.parseRequestLine(AbstractNio
InputBuffer.java:283)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce
ssor.java:1017)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.jav
a:1524)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
1480)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)
        at java.lang.Thread.run(Thread.java:748)

Will this impact any performance of our tomcat.

Thanks & Regards
Deepak Kumar
CCIL - IT
022-61546230
CIN of CCIL- U65990MH2001PLC131804
"Disclaimer and confidentiality clause -  This message and any attachments
relating to official business of CCIL OR ANY OF IT'S SUBSIDIARIES is
proprietary to CCIL and intended for the original addressee only.
The message may contain information that is confidential and subject to
legal privilege. 
Any views expressed in this message are those of the individual sender. 
If you have received this message in error, please notify the original
sender immediately and destroy the message and copies thereof and any
attachments contained in it .
 If you are not the intended recipient of this message, you are hereby
notified that you must not disseminate, copy, use, distribute, or take any
action in connection therewith. 
 CCIL cannot ensure that the integrity of this communication has been
maintained nor that it is free of errors, viruses, interception and/or
interference. 
CCIL is not liable whatsoever for loss or damage resulting from the opening
of this message and/or attachments and/or the use of the information
contained in this message and/or attachments."


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error parsing HTTP request header

Posted by "André Warnier (tomcat/perl)" <aw...@ice-sa.com>.
On 26.02.2020 14:30, dkumar@ccilindia.co.in wrote:
> Dear Team,
> 
> We are getting below error in catelina log while starting the tomcat.
> 
> 26-Feb-2020 18:57:36.795 INFO [main]
> org.apache.catalina.startup.Catalina.start Server startup in 21520 ms
> 26-Feb-2020 18:57:38.277 INFO [http-nio-443-exec-11]
> org.apache.coyote.http11.AbstractHttp11Processor.process 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.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:283)
>          at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
>          at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
>          at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
>          at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
>          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)
> 
> Will this impact any performance of our tomcat.
> 

It is not quite clear what you mean by that question.

Origin of the above :
- a HTTP client sent an invalid HTTP request to your tomcat
- tomcat caught this, refused the request, and warned you of it by writing a detailed 
error message to the logfile
- tomcat also tells you that if there are any further errors of the same type, you will 
only see them in the logfile, if you turn the general log level of tomcat to "debug" 
(which produces *a lot* of messages). That is tomcat's way of saving resources, in case 
there are many more requests of that kind.

Will this impact the performance of tomcat ?

Well, of course, if your tomcat continues to receive a lot of such invalid requests all 
the time, that will use some of the processing time of the tomcat host, even to return an 
error to the client.  But this has nothing to do with your tomcat per se or its 
configuration, it has to do with bad or malicious clients out there, which send invalid 
requests to your server, and it would be the same with any webserver.
If you want to filter out such requests before they arrive to tomcat, you will have to put 
in front of tomcat some specialised filtering device which is optimised to do that kind of 
thing.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error parsing HTTP request header

Posted by Mark Thomas <ma...@apache.org>.
On 26/02/2020 13:30, dkumar@ccilindia.co.in wrote:
> Dear Team,
> 
> We are getting below error in catelina log while starting the tomcat.
> 
> 26-Feb-2020 18:57:36.795 INFO [main] 
> org.apache.catalina.startup.Catalina.start Server startup in 21520 ms
> 26-Feb-2020 18:57:38.277 INFO [http-nio-443-exec-11] 
> org.apache.coyote.http11.AbstractHttp11Processor.process 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.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:283)
>         at 
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
>         at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
>         at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
>         at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
>         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)
> 
> Will this impact any performance of our tomcat.

In that Tomcat is wasting cycles processing a request that the client
should never have sent, yes, it will impact performance.

Does processing an invalid request cost any more than a valid one. On
average, no.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org