代理错误 502:代理服务器收到来自上游服务器的无效响应 [英] Proxy Error 502 : The proxy server received an invalid response from an upstream server
问题描述
我们正在用 Java 构建一个群发邮件发送应用程序.邮件正由第三方 SMTP 发送.发送 400-500 封邮件后 tomcat6 服务停止.以下是错误.
We are building a mass mailing sending application in Java. Mail is being send by third party SMTP. After sending 400-500 mails tomcat6 service get stopped. Below is the error.
代理错误代理服务器收到来自上游服务器的无效响应.代理服务器无法处理请求 GET/lin/Campaignn.jsp.原因:从远程服务器读取错误
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /lin/Campaignn.jsp. Reason: Error reading from remote server
此外,在尝试使用 ErrorDocument 处理请求时遇到了 502 Bad Gateway 错误.
Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request.
msizzler.com 端口 80 上的 Apache 服务器
Apache Server at msizzler.com Port 80
但是当我们从本地主机发送时,我没有收到任何错误.它发送所有邮件.请帮我解决这个问题.
But when we are sending from localhost I did not received any error. It send all the mails. Please help me to sort it out this problem.
推荐答案
当 Apache Web 服务器没有收到来自上游服务器的有效 HTTP 响应时,会生成 HTTP 502 "Bad Gateway" 响应,在这种情况下是您的 Tomcat网络应用程序.
The HTTP 502 "Bad Gateway" response is generated when Apache web server does not receive a valid HTTP response from the upstream server, which in this case is your Tomcat web application.
可能发生这种情况的一些原因:
Some reasons why this might happen:
- Tomcat 可能已经崩溃
- Web 应用程序没有及时响应,来自 Apache 的请求超时
- Tomcat 线程超时
- 网络设备阻止请求,可能是某种连接超时或 DoS 攻击预防系统
如果问题与超时设置有关,您可以通过调查以下内容来解决:
If the problem is related to timeout settings, you may be able to resolve it by investigating the following:
- ProxyTimeout Apache 的 mod_proxy 指令
- 连接器 Apache Tomcat 的配置
- 您的网络设备手册
- ProxyTimeout directive of Apache's mod_proxy
- Connector config of Apache Tomcat
- Your network device's manual
这篇关于代理错误 502:代理服务器收到来自上游服务器的无效响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!