502错误,怎么解决?

baihexige 2008-07-07 05:31:27
502 Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /project/index.jsp.

Reason: Error reading from remote server

这个错误怎么发生的?又怎么修改?

有时访问静态的页面时不会出现这样的错误,

是代码有问题还是服务器的事?


...全文
5547 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
stephie 2012-04-24
  • 打赏
  • 举报
回复
我最近也遇到这个问题,我是通过apache作为web服务器转到jboss服务器的,用mod-jk进行设置。
出错后,查看mod-jk.log可以看到这样的信息信息(引用其它网页里的错误信息):
[Date/Time] [4994:52144] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down
(10.X.X.X:8009), err=-110

[Date/Time] [4994:52144] [error]
ajp_get_reply::jk_ajp_common.c (1531): Tomcat is down or refused
connection. No response has been sent to the client (yet)

修改apache中的mod-jk.conf对应的worker设置,worker.ajp13.connection_pool_timeout=600
修改jboss的server的server.xml文件,增加蓝色粗体部分内容<Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3" emptySessionPath="true" enableLookups="false" redirectPort="8443" connectionTimeout="600000" />

把jboss和apache的服务器程序都重启后就解决了。

不知道你的情况是不是和我完全一样,我把我的参考链接发给你:
http://blog.techstacks.com/2008/01/tip-modjk-timesout-on-initial.html
http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html


dushipianzhou 2009-01-16
  • 打赏
  • 举报
回复
与apache的配置无关,应检查下运行jsp的中间件状况。
dreambecky 2009-01-16
  • 打赏
  • 举报
回复
顶啊!!这个问题困扰我好多天了!!
我是在国外的一个空间部署我的rails项目,但是一遇到相应时间较长的request就出现这个问题!然后程序也被停掉了!google了半天,好像要修改apache的配置文件,但是我没有权限修改啊!
能否通过修改.htaccess文件实现??哪位大人指教一下吧,谢谢!!!
傻根她弟 2008-12-02
  • 打赏
  • 举报
回复
我也遇到了这样的问题 有些地方能访问 有些地方就报这样的错误

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /WebOffice/login.aspx.

Reason: Error reading from remote server



--------------------------------------------------------------------------------

Apache/2.0.52 (Red Hat) Server at bf.wsd52.com Port 80
yifanwu 2008-07-23
  • 打赏
  • 举报
回复
代码呢
baihexige 2008-07-22
  • 打赏
  • 举报
回复
这个错误有时发生,有时就没有,
javaiswhat 2008-07-21
  • 打赏
  • 举报
回复
路过
zgycsmb 2008-07-21
  • 打赏
  • 举报
回复
把代码贴出才好说。
baihexige 2008-07-21
  • 打赏
  • 举报
回复
没有啊,都没人出来说的
孟祥龙 2008-07-20
  • 打赏
  • 举报
回复
我也想知道这个问题,楼主已经知道答案了吗?

24,921

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧