简体   繁体   English

java.io.IOException:服务器返回HTTP响应代码:502

[英]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.

相关问题 java.io.IOException:服务器返回HTTP响应代码:500 - java.io.IOException: Server returned HTTP response code: 500 Java Http(s)URLConnection java.io.IOException:服务器返回 HTTP 响应代码:403 - Java Http(s)URLConnection java.io.IOException: Server returned HTTP response code: 403 在Java代码中获取“ java.io.IOException:服务器返回的HTTP响应代码:URL的403:” - Getting “java.io.IOException: Server returned HTTP response code: 403 for URL: ” in java code 服务器返回 java.io.IOException:服务器返回 HTTP 响应代码:URL 为 400 - server returns java.io.IOException: Server returned HTTP response code: 400 for URL java.io.IOException:服务器在Java中返回了HTTP响应代码:URL的403: - java.io.IOException: Server returned HTTP response code: 403 for URL: in java 错误打开连接 java.io.IOException:服务器返回 HTTP 响应代码:URL 501 - Error opening connection java.io.IOException: Server returned HTTP response code: 501 for URL 服务器返回URL的HTTP响应代码:400:java.io.IOException - Server returned HTTP response code: 400 for URL : java.io.IOException java.io.IOException:服务器返回HTTP响应代码:403表示URL - java.io.IOException: Server returned HTTP response code: 403 for URL java.io.IOException:服务器返回HTTP响应代码:405表示URL - java.io.IOException: Server returned HTTP response code: 405 for URL java.io.IOException:服务器在上传JSON对象时返回了HTTP响应代码:URL为500 - java.io.IOException: Server returned HTTP response code: 500 for URL while uploading JSON object
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM