[英]java.io.IOException: Server returned HTTP response code: 502
i wrote a code which goes to a list of web addresses and get data from there. 我写了一个代码,该代码转到网址列表并从那里获取数据。 but when i run code some time code works mean goes to all web links and take data but some time i goes to 2 or 4 websites and get data and after them gives this exception followed by a web link form list. 但是当我运行代码一段时间代码工作意味着去所有的网络链接并获取数据,但有时我去2或4个网站获取数据,然后他们给出这个例外,然后是一个网络链接表格列表。
java.io.IOException: Server returned HTTP response code: 502 java.io.IOException:服务器返回HTTP响应代码:502
but actually web link is alive not dead. 但实际上网络链接还没死。 when i run code for 2nd time then it runs but gives this exception for another link. 当我第二次运行代码然后运行但是为另一个链接提供此异常。 code is too long thats why not posting it. 代码太长了,为什么不发布它。 if needed i can provide. 如果需要我可以提供。
Whats this excetption about? 什么是这个例外?
502 means "Bad Gateway". 502表示“Bad Gateway”。 See http://www.checkupdown.com/status/E502.html . 请参阅http://www.checkupdown.com/status/E502.html 。
The server the Java client is talking to is the "gateway". Java客户端正在与之通信的服务器是“网关”。 That server was depending on another server (called the "upstream" server) to give it a response and it failed. 该服务器依赖于另一台服务器(称为“上游”服务器)来给它一个响应,但它失败了。
In my experience, 502 errors are sporadic, and can indicate problems with server architecture. 根据我的经验,502错误是零星的,并且可能表明服务器架构存在问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.