Resolve "Error parsing HTTP request header" in Tomcat

Home > Search
  by

This error appears in catalina.log.

26-Jul-2018 01:13:52.454 INFO [tomcat-http--27] org.apache.coyote.http11.Http11Processor.service 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 method name. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:426)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)


If the app in question is not fronted by a web server and does not produce web content (eg. JSP and HTML pages), and anti-virus scans may be the cause of this error in catalina.log. The localhost_access_log.txt may identify an anti-virus scan. In this example, the anti-virus software Qualys was scanning Tomcat can producing the HTTP exceptions.

x.x.x.x - - [dd/mm/yyyy:hh:mm:ss -xxxx] "QUALYS / HTTP/1.1" 405 1134

 

Usually, anti-virus scans are scheduled to occur at a reoccurring period, such as once every 7 days near the same time period. If you know the schedule for the anit-virus scans, you can check the catalina.log at the same time period in the past. If similar exceptions are found near the same time period, this is further indication of an anti-virus scan as the cause of the HTTP errors.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments