简体   繁体   English

有关请求正文的Apache(httpd)dumpio日志条目的查询,在Tomcat端为NULL

[英]Query about Apache (httpd) dumpio log entry for the Request body which is coming NULL on Tomcat side

I am working on a hosted application running on Apache Tomcat 6.0.18 and it is hidden behind Apache (httpd). 我正在运行在Apache Tomcat 6.0.18上运行的托管应用程序,它被隐藏在Apache(httpd)后面。 They are connected through mod_jk. 它们通过mod_jk连接。 We have take VPS and therefore Apache has been hosted as VirtualHost. 我们采用了VPS,因此Apache已作为VirtualHost托管。 The OS is CentOS 32 bit. 操作系统是CentOS 32位。

The problem is that very randomly Tomcat is getting NULL request (it may have some URL specific info but not the data). 问题是,Tomcat非常随机地获取NULL请求(它可能具有一些URL特定信息,但没有数据)。 In order to debug this problem I enabled dumpio on apache to get the request body printed in logs. 为了调试此问题,我在apache上启用了dumpio以便将请求正文打印在日志中。 However I just got the following log entry, 但是我得到了以下日志条目,

[Tue Aug 18 04:18:16 2009] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (metadata-EOS): 0 bytes [2009年8月18日星期四04:18:16] [调试] mod_dumpio.c(55):mod_dumpio:dumpio_in(元数据EOS):0字节

Also the thing to be noted that if I see access log, I could not find any entry with the same time stamp. 另外要注意的是,如果我看到访问日志,则找不到具有相同时间戳的任何条目。 Same can be seen in following two consecutive entries, 在接下来的两个连续条目中可以看到相同的结果,

86.96.227.88 - app [18/Aug/2009:04:17:47 -0400] "POST /app/masters/ajaxReq.iajax HTTP/1.1" 400 - " http://server/app/masters/customer.do?action=menuLoad# " "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)" 1036 180 86.96.227.88-应用[[18 / Aug / 2009:04:17:47 -0400]“ POST /app/masters/ajaxReq.iajax HTTP / 1.1” 400-“ http://server/app/masters/customer.do “ action = menuLoad# ”“ Mozilla / 4.0(兼容; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)” 1036 180

86.96.227.88 - - [18/Aug/2009:04:18:49 -0400] "GET /app/ HTTP/1.1" 401 495 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)" 716 848 8 86.96.227.88--[18 / Aug / 2009:04:18:49 -0400]“ GET / app / HTTP / 1.1” 401495“-”“ Mozilla / 4.0(兼容; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)“ 716 848 8

Is it possible that Apache (HTTPD) is firing some autonomous requests to Tomcat? Apache(HTTPD)是否可能向Tomcat发出一些自治请求?

I need help understanding this problem. 我需要帮助来了解这个问题。

Tomcat has something called a RequestDumperValve, which dumps very verbose information about each request to the server log. Tomcat有一个称为RequestDumperValve的东西,它将有关每个请求的非常详细的信息转储到服务器日志中。 It can be useful for seeing a lot of detail. 这对于查看很多细节很有用。

You'll find the config for this in tomcat's server.xml file: 您可以在tomcat的server.xml文件中找到此配置:

        <!--
        <Valve className="org.apache.catalina.valves.RequestDumperValve" />
        -->

Uncomment it, restart Tomcat, and off you go. 取消注释,重新启动Tomcat,然后退出。 It won't solve your problem, obviously, but it may give you the information to track down those spurious requests. 显然,它不能解决您的问题,但可以为您提供跟踪这些虚假请求的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM