我们在tomcat上部署了一个应用程序。 要访问应用程序,我们使用apache向tomcat发送请求。 随机浏览器提供以下响应。代理服务器收到来自上游服务器的无效响应
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /sampleapp/<http://samplehost.com:8080/sampleapp/>.
Reason: Error reading from remote server
________________________________
Apache/2.2.21 (Unix) Server at samplehost.com Port 8080
这个错误并不总是会出现,到目前为止,我们只在IE浏览器的客户端机器上得到这个错误。在与Firefox相同的客户机上,它运行良好。
以下是从Apache日志的跟踪误差为失败的请求
[Thu Mar 22 02:51:08 2012] [error] [client 10.36.64.137] (20014)Internal error: proxy: error reading status line from remote server localhost:8081, referer: http://samplehost.com:8080/sampleapp/opp/showSearchHome.htm
[Thu Mar 22 02:51:08 2012] [error] [client 10.36.64.137] proxy: Error reading from remote server returned by /sampleapp/opp/searchResult.htm, referer: http://samplehost.com:8080/sampleapp/opp/showSearchHome.htm
没有越做越tomcat的日志打印时的请求失败。
以下就是Apache的相关信息,安装的版本
-bash-3.00$ ./httpd -v
Server version: Apache/2.2.21 (Unix)
Server built: Sep 21 2011 20:00:58
当试图找出模块加载我获得以下错误
-bash-3.00$ /usr/local/apache2/bin/apachectl -t -D DUMP_MODULES
httpd: Syntax error on line 64 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_authnz_ldap.so into server: ld.so.1: httpd: fatal: libldap-2.4.so.2: open failed: No such file or directory
你可能想尝试尝试像这样在Apache配置(尝试不同的组合): // SETENV力代理的请求1.0 1 //小号etEnv proxy-nokeepalive 1 // SetEnv proxy-initial-not-pooled 1 // KeepAlive Off(or On) 很多人都有类似的问题,不幸的是他们有不同的解决方案。或者你尝试从Apache切换到另一个反向代理。 – HelmuthB 2012-06-08 12:59:53
这也可能发生在Firefox上,似乎是https问题 – virtualeyes 2012-11-17 09:55:58