Invalid character found in method name. HTTP method names must be tokens

简介:   o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
 

59$Q6B67{IS}XWW3`@CFB}N

 

o.apache.coyote.http11.Http11Processor   : 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:422)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:683)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

 

阿里云上弄了一个tomcat,经常半夜发送崩溃,查看日志发现这个东西,查阅资料发现是Tomcat的header缓冲区大小不够,只需要在server.xml中增加maxHttpHeaderSize字段即可:

<Connector URIEncoding="UTF-8" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
    useBodyEncodingForURI="false"
    enableLookups="false"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="你想要的大小"/>
如:
   <Connector port="8080" executor="tomcatThreadPool"
     protocol="HTTP/1.1"
     maxThreads="1000"
     maxHttpHeaderSize="8192"
     minSpareThreads="100"
     maxSpareThreads="200"
     acceptCount="1000"
     maxConnections="1000"
     connectionTimeout="30000"
     keepAliveTimeout="15000"
     maxKeepAliveRequests="1"
      tcpNoDelay="true"
     redirectPort="8443"
     enableLookups="false"
     URIEncoding="UTF-8"/>

http://www.cnblogs.com/yuananyun/p/6501324.html

 

相关文章
|
2月前
|
弹性计算 安全 API
HTTP 405 Method Not Allowed:解析与解决
本文详细解析了HTTP 405 &quot;Method Not Allowed&quot; 错误,包括其定义、常见原因、示例代码及解决方案。通过检查API文档、修改请求方法或更新服务器配置,可有效解决此错误,提升Web开发效率。
729 2
|
2月前
|
JSON 编解码 安全
【HTTP】方法(method)以及 GET 和 POST 的区别
【HTTP】方法(method)以及 GET 和 POST 的区别
131 1
|
4月前
|
Java Shell API
【Azure 环境】Update-MgEntitlementManagementAccessPackageAssignmentPolicy 命令执行时候遇见的 No HTTP Resource was found 问题分析
【Azure 环境】Update-MgEntitlementManagementAccessPackageAssignmentPolicy 命令执行时候遇见的 No HTTP Resource was found 问题分析
|
6月前
|
文字识别 API 开发工具
视觉智能开放平台操作报错合集之报错提示为“This http method is not supported.”,该如何解决
在使用视觉智能开放平台时,可能会遇到各种错误和问题。虽然具体的错误代码和消息会因平台而异,但以下是一些常见错误类型及其可能的原因和解决策略的概述,包括但不限于:1. 认证错误、2. 请求参数错误、3. 资源超限、4. 图像质量问题、5. 服务不可用、6. 模型不支持的场景、7. 网络连接问题,这有助于快速定位和解决问题。
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must b
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must b
259 0
|
7月前
|
监控 搜索推荐 定位技术
HTTP状态码:如何修复 404 Not Found错误?
互联网上各种类型的网站非常多,无论用户还是网站运营者不可避免的会遇到404 Not Found错误,如果遇到404错误,我们应该如何解决呢?
156 1
|
应用服务中间件
tomcat 异常 HTTP method names must be tokens
tomcat 异常 HTTP method names must be tokens
1312 0
|
缓存 Linux 开发工具
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
2824 0
|
Java 应用服务中间件 Apache
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
518 0
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
|
Java Maven
maven jsp报错javax.servlet.http.HttpServlet“ was not found on the Java Build Path
maven jsp报错javax.servlet.http.HttpServlet“ was not found on the Java Build Path
247 0