简体   繁体   English

502 代理 | 谁是 Wildfly 或 Spring Boot 或 Httpd 的罪魁祸首? | 来自上游服务器的无效响应

[英]502 Proxy | Who is culprit Wildfly or Spring Boot or Httpd? | Invalid response from an upstream server

We are not sure whether it is Wildfly Server, Spring Boot app, HTTPD or anything else?我们不确定它是 Wildfly Server、Spring Boot app、HTTPD 还是其他?

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>

<head>
    <title>502 Proxy Error</title>
</head>

<body>
    <h1>Proxy Error</h1>
    <p>The proxy server received an invalid
        response from an upstream server.<br />
The proxy server could not handle the request
        <em><a href="/terp-offerings-rest-0.0.1-SNAPSHOT-wildfly10/offerings/all">GET&nbsp;/terp-offerings-rest-0.0.1-SNAPSHOT-wildfly10/offerings/all</a></em>.
        <p>
            Reason: <strong>Error reading from remote server</strong></p>
    </p>
</body>

</html>

Request goes and in 2 minutes it tries to fetch response from db but in 1 minute client end gets proxy error.请求在 2 分钟内尝试从数据库获取响应,但在 1 分钟内客户端收到代理错误。

In Spring Boot I did following:在 Spring Boot 中,我做了以下操作:

@GetMapping("/offerings/all")
@Transactional(timeout = 600000)
public List<XxtoneOfferingsV> getAllOfferings(){

and

spring.mvc.async.request-timeout=600000

But in vain same error.但同样的错误是徒劳的。

Following i tried in wildfly:以下我在 wildfly 中尝试过:

Profile -> servergroup -> Undertow -> Server -> AJP/HTTP/HTTPS (Changed norequesttimeout to 600000 and readtimeout to 600000

Got nothing....什么都没有....

Along with above mentioned settings除了上述设置

Added following to HTTPD.CONF在 HTTPD.CONF 中添加了以下内容

Timeout 300
ProxyTimeout 300
ProxyBadHeader Ignore 

And it worked successfully.它成功地工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM