简体   繁体   中英

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?

<!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.

In Spring Boot I did following:

@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:

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

Timeout 300
ProxyTimeout 300
ProxyBadHeader Ignore 

And it worked successfully.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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