Named target server not resolved

I have an issue with loadbalancer and named target server. The request doesnt get routed to the target end point when i use the named target server and load balancer.

Here are my target servers - https://api.enterprise.apigee.com/v1/o/nagashreeb/environments/test/targetservers

My proxy is http://nagashreeb-test.apigee.net/ex1_advproxydev

I get a HTTP 503 error when I do a trace. A very wierd thing i noticed, when i run the request from browser, it challenges for basic auth credentials of jokeindex. I do have a target server TSTEST, pointing to jokeindex but i am not using it in this proxy. Any pointers on this?

Solved Solved
0 9 1,192
1 ACCEPTED SOLUTION

adas
New Member

@Nagashree B The targetserver output shows, its configured incorrectly. You have specified the entire target url instead of the host. Please change it as follows:

{ "host": "httpbin.org", "isEnabled": true, "name": "targetServer1", "port": 80 }

For details on targetservers, please follow our documentation here:

http://apigee.com/docs/api-services/content/load-balancing-across-backend-servers

View solution in original post

9 REPLIES 9

Hi @Nagashree B,

When i try http://nagashreeb-test.apigee.net/ex1_advproxydev, it return me a httpbin homepage i guess.

I think we need to look into the proxy and see the routing behavior, can you share it here or add me mukundha@apigee.com to your org? or you could create a support ticket and provide those details -

https://pages.apigee.com/request-support-general.html

Thanks,

@mukundha@apigee.com

I am getting same 503 error when I try to use the created target server. Can you point to any common mistake?

@mukundha@apigee.com I have added you in my org. Pls take a look at it.

Not applicable

Did you use TSTEST in this proxy before you pointed to the new target server ?

adas
New Member

Share the apiproxy and also paste your targetservers/{targetserver} response here, so that we can see if there's anything wrong with it.

All target servers in Test environment listed

HTTP/1.1 200 OK

Access-Control-Allow-Methods:GET
Access-Control-Allow-Origin:*
Connection:keep-alive
Content-Length:46
Content-Type:application/json
Date:
Sat, 27 Jun 2015 15:29:37 GMT
[
  "targetServer1",
  "TSTEST",
  "targetServer2"
]

Response for targetServer1 details (targetServer1 is used in loadbalancer configuration)

HTTP/1.1 200 OK

Access-Control-Allow-Methods:GET

Access-Control-Allow-Origin:*
Connection:keep-alive
Content-Length:101
Content-Type:application/json
Date:
Sat, 27 Jun 2015 15:28:44 GMT
{
  "host": "https://httpbin.org",
  "isEnabled": true,
  "name": "targetServer1",
  "port": 80
}

Still facing this issue. APIProxy code attached.

adas
New Member

@Nagashree B The targetserver output shows, its configured incorrectly. You have specified the entire target url instead of the host. Please change it as follows:

{ "host": "httpbin.org", "isEnabled": true, "name": "targetServer1", "port": 80 }

For details on targetservers, please follow our documentation here:

http://apigee.com/docs/api-services/content/load-balancing-across-backend-servers

@arghya dasThanks a ton, never realized that it was just host name. Lesson learnt the hard way although I saw the docs multiple times