'Request sent to the target server' is not showing on trace when had 502 Bad Gateway Unexpected EOF?

Hi Apigee Community!

Just raising this issue in Apigee edge trace UI, I'm just clarifying if some people also encountering that 'Request sent to the target server' in Trace is not showing up when using a target server config in httptargetconnection and encountered an '502 Bad Gateway Unexpected EOF'?

This is the case:
When I am using target server config with load balancer in my httptargetconnection and the path of that Target server is from the kvm - got the 502 eof error but 'Request sent to the target server' in Trace is not showing up, but when I directly put the hardcoded complete <URL> on my httptargetconnection, we have the same error but the 'Request sent to the target server' in Trace is showing.

This is my config:

<HTTPTargetConnection>
        <LoadBalancer>
            <MaxFailures>0</MaxFailures>
            <RetryEnabled>true</RetryEnabled>
            <Server name="sampleServer">
                <IsEnabled>true</IsEnabled>
                <IsFallback>false</IsFallback>
                <Weight>1</Weight>
            </Server>
            <TargetDisableSecs>1500</TargetDisableSecs>
        </LoadBalancer>
        <Path>{samplePath}</Path>
        <Properties>
            <Property name="io.timeout.millis">180000</Property>
        </Properties>
    </HTTPTargetConnection>

 


Thanks for your time.

0 5 340
5 REPLIES 5

There's a troubleshooting doc for 502 errors here https://docs.apigee.com/api-platform/troubleshoot/runtime/502-bad-gateway

Thanks @dk, but any thoughts on why the 'Request sent to the target server' in trace is not showing up when encountering this error? I am using target server config with load balancer in my httptargetconnection and the path of that Target server is from the kvm - got the 502 eof error but 'Request sent to the target server' in Trace is not showing up, but when I directly put the hardcoded complete <URL> on my httptargetconnection, we have the same error but the 'Request sent to the target server' in Trace is showing.

This is my config:

<HTTPTargetConnection>
        <LoadBalancer>
            <MaxFailures>0</MaxFailures>
            <RetryEnabled>true</RetryEnabled>
            <Server name="sampleServer">
                <IsEnabled>true</IsEnabled>
                <IsFallback>false</IsFallback>
                <Weight>1</Weight>
            </Server>
            <TargetDisableSecs>1500</TargetDisableSecs>
        </LoadBalancer>
        <Path>{samplePath}</Path>
        <Properties>
            <Property name="io.timeout.millis">180000</Property>
        </Properties>
    </HTTPTargetConnection>

 

Which version of Apigee are you using?

Can you see the samplePath variable is set correctly in the trace? Is the target server defined in the same environment you've deployed the API Proxy to?

I am using Apigee Edge. One more thing that I observed is that we got 

state 

TARGET_REQ_FLOW

when we are using a target server when we have a 502 error and state REQ_Sent when we explicitly put the URL in httptargetconnection

state 

REQ_SENT

is this an Apigee bug? My theory is that the apigee is trying to loadbalance it to other server? but we have only one server that's why we have state TARGET_REQ_FLOW? but when we explicitly type the URL, the Apigee didn't try to loadbalanced it that's why we got state REQ_SENT. Hopefully you can confirm, thanks.

This is helpful for the support team on the project to troubleshoot which target is the proxy sending its request when we have this error and using a target server.