部署环境:

Apache 2.3 + Tomcat 6.0 群集

Apache地址:192.168.20.206:80

tomcat1地址:192.168.20.206:8080

tomcat2地址:192.168.20.205:8080

 

问题描述:

直接登录tomcat,查询报表出现如下报错

224902338.jpg

 

主要错误信息:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of  the time the error occurred and anything you might have ...

More information about this error may be available in the server error log.

 

问题原因:

判断为tomcat下工程文件授权不足导致

 

解决方案:

执行chmod 755 -R /usr/local/tomcat/webapps/ROOT命令给文件赋权

 

再登录tomcat地址,查询报表后不再报错,但登录apache,查询报表仍然有一样的报错;

去查看了apache/logs下的error.log日志,发现存在如下错误:[Wed Nov 20 20:23:15 2013] [error] ajp_read_header: ajp_ilink_receive failed
[Wed Nov 20 20:23:15 2013] [error] (120006)APR does not understand this error code: proxy: read response failed from 192.168.20.205:8009 (192.168.20.205)

 

问题原因:

1、apache的超时时间Timeout配置为120s(2分钟);

2、tomcat查询报表的时间超过了2分钟;

 

解决方案:

修改apache/conf下的httd.conf文件,找到

# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120 

 

将120改为900 (900是我根据现场需要修改的,也可以修改成其他数字,注意单位是秒)

 

重启apache后,问题得到解决;