Apigee not using port specified in target server

We have specified a target to use port 8081 but the requests are sent to port 80.

9724-apigee-target.png

9725-apigee-trace.png

And how our HTTPTargetConnection looks like.

    <HTTPTargetConnection>
        <Properties>
            <Property name="connect.timeout.millis">20000</Property>
        </Properties>
        <LoadBalancer>
            <Server name="XXXXX_STOK01_CSTA_API"/>
        </LoadBalancer>
        <Path>/tsg-csta</Path>
    </HTTPTargetConnection>
0 3 537
3 REPLIES 3

Are you sure? It's possible that the Trace UI is in error.

Can you show the target server definition for GINTEL_STOK01_CSTA_API ?

The blacked-out in the first image is the target server definition.

It worked after I changed to use an <URL> instead and specify the port in the url.

Not applicable

configure the target server as below using the management API call.

<TargetServer  name="TargetServer-1">
    <IsEnabled>true</IsEnabled>
    <Host>www.example.com</Host>
    <Port>443</Port>
    <SSLInfo>
        <Ciphers/>
        <ClientAuthEnabled>true</ClientAuthEnabled>
        <Enabled>true</Enabled>
        <IgnoreValidationErrors>false</IgnoreValidationErrors>
        <KeyAlias>keystore-alias</KeyAlias>
        <KeyStore>keystore-name</KeyStore>
        <Protocols/>
        <TrustStore>truststore-name</TrustStore>
    </SSLInfo>
</TargetServer >