May 13, 2019 3:05:29 PM 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 method name. HTTP method names must be tokens
at org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:186)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1052)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2492)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
項目跑着很正常,突然有一天出現了這個錯誤。
修改bug:
1、看到 header parsing errors will be logged at DEBUG level.時 考慮tomcat出現問題,http head不夠大 ,訂單式往下看IllegalArgumentException不對 應該不是http head問題 ,如果是head太小應該下面是有too large類,要是這樣在tomcat的conf 下的server.xml中
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="5443" useBodyEncodingForURI="true" disableUploadTimeout="true" URIEncoding="UTF-8" />加maxHttpHeaderSize再重啓應該就可以了
2、https訪問http協議導致出現的問題,