cant access a working HTTP Target Server

Not applicable

I have configured a target server named "payments-service" which points to some (available) url.

and configured my target endpoint to use it with

	<LoadBalancer>
            <Server name="payments-service"/>
        </LoadBalancer>
        <Path>/</Path>

but when trying to get this service through the flow I get

{
  "fault": {
    "faultstring": "The Service is temporarily unavailable",
    "detail": {
      "errorcode": "messaging.adaptors.http.flow.NoActiveTargets"
    }
  }
}


**before using target servers the url was hard coded and worked well, so the problem is isolated in the target servers change

Solved Solved
1 5 3,870
1 ACCEPTED SOLUTION

Consider the following as the backend URL -

http://<base-URL>/<path-suffix>;

Following should be the target server initialisation in an Environment Configuration -

Name
HostPortEnabled
Target Server Name

<target-server-name>
Base URL of the target server without the
HTTP/HTTPS protocol
<base-URL>
80
checked

Following should be your target server configuration in an API proxy -

 <HTTPTargetConnection>
        <Properties/>
        <LoadBalancer>
            <Server name="<target-server-name>"/>
        </LoadBalancer>
        <Path><path-suffix></Path>
 </HTTPTargetConnection>

Hope this helps, thank you.

View solution in original post

5 REPLIES 5

Hi @yuri abaev Can you please share your TargetServer configuration? Make sure that the host URL of the backend service (without the protocol). It's a common configuration error that I see.

Consider the following as the backend URL -

http://<base-URL>/<path-suffix>;

Following should be the target server initialisation in an Environment Configuration -

Name
HostPortEnabled
Target Server Name

<target-server-name>
Base URL of the target server without the
HTTP/HTTPS protocol
<base-URL>
80
checked

Following should be your target server configuration in an API proxy -

 <HTTPTargetConnection>
        <Properties/>
        <LoadBalancer>
            <Server name="<target-server-name>"/>
        </LoadBalancer>
        <Path><path-suffix></Path>
 </HTTPTargetConnection>

Hope this helps, thank you.

@Nisha Mallesh : After adding the target Server do we need to restart anything? I have added the Target Server but still i am getting the above error.

Error :

{"Envelope": { "encodingStyle": "http://schemas.xmlsoap.org/soap/encoding/", "Body": {"Fault": { "faultcode": "soap:Server", "faultstring": "The Service is temporarily unavailable", "faultactor": {}, "detail": {"source": {"errorcode": "messaging.adaptors.http.flow.NoActiveTargets"}} }} }}

Not applicable

Hello @Nisha Mallesh,

Can you please confirm the following 3 points:

1. The "base-URL" does not contain any resource like "/{resource}"

2. The <Path> tag is used as "<Path>{path-suffix}</Path>

3. The "path-suffix" variable is available in the context ?


To confirm -

1. Yes, it should not contain any resource

2. I have enclosed path-suffix in <> as a reference instead of {}, kindly replace <path-suffix> with the value.

3. No, it is just a reference name I have used with respect to the backendURL taken for instance.

Thanks for clarification.