For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
33 0 2 2

Error Code 503 | Server Error: API Proxy is not available - What do I do?

Hi, I'm attempting to use the EIkon API for the first time, and I'm getting the above error. I have Eikon installed and open.

Following this troubleshooting link, I determined that my Eikon proxy (called APIPROXY) is listening to port 9001, not 9000, which is the default for the API proxy. The troubleshooting guide says the Eikon proxy switches to 9001 if 9000 is not available. But the guide is not clear about what my solution should be. Should I change the API proxy to listen at port 9000? Or does the API also automatically switch to port 9001? Or is there some other solution?

The reason I have not just tried redirecting the Eikon proxy to listen at 9000 instead of 9000 is that I'm concerned about creating unexpected problems with my Eikon desktop.

I'm not a programmer, I'm just learning to do this on my own, so grateful for your patience.

Tks

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonerror-503
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
33 0 2 2

I figured out that if I turn on my Thomson Reuters VPN I can now connect to the API proxy. No idea why.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@Noel.Randewich
Thanks for the update. I'm afraid I cannot explain this either. I don't see why running VPN client would interfere with HTTP requests sent to localhost. On my end I have no problem connecting to Eikon API Proxy with or without running VPN client. If anything it would make more sense to me if it were the other way around, i.e. you could use Eikon API Proxy when not running the VPN client and couldn't when on the VPN. This said I'm glad you found a way to use Eikon API Proxy and I hope it's not too onerous that in your case you need to be on the VPN.

Upvotes
4.3k 2 4 5

Hi,

The Eikon proxy is running for several functionalities that can includes API Proxy, but not always.

"Error Code 503 | Server Error: API Proxy is not available" means your Eikon variant is not permissioned for API Proxy (ex: Eikon Core variant).

To check this, open http://localhost:9000/ping?all (or http://localhost:9001/ping?all)

{"port":9000,"mode":"eikon4","pid":19064,"hasSecure":true,"startedTime":"Tue May 05 2020 22:22:43 GMT+0200 (Romance Daylight Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"}]}

If you don't have {"path":"/api"}, that will confirm this.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi @pierre.faurel, As I pasted just above, I do have that {'path':'api"}, so apparently not a permission issue. Also, see above some lines from the Eikon log file (mentioned in the troubleshooting guide) that I pasted in response to @zoya.farberov.

Tks

Upvotes
39.2k 75 11 27

@Noel

As @zoya.farberov said, even though Eikon API Proxy on your machine is listening on port 9001, Eikon Data APIs library should get this port number from .portInUse file. From the SxS log file you provided and from the response you get from the ping, your account is entitled to use Eikon Data APIs. It's not clear where the problem is. Could you run the following Python code and let us know what you get from pyeikon logger?

import eikon as ek
import logging
logger = logging.getLogger('pyeikon')
logger.setLevel(5)
ek.set_app_key(YOUR_APP_KEY)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

HI @Alex Putkov

Here's what I get:

2020-05-05 14:49:36,708 P[13372] [MainThread 12568] Checking port 9001 response : 503 - API Proxy is not available 
2020-05-05 14:49:36,711 P[13372] [MainThread 12568] Port 9001 was retrieved from .portInUse file 
2020-05-05 14:49:36,711 P[13372] [MainThread 12568] Try to handshake on url http://localhost:9001/api/handshake...
2020-05-05 14:49:36,713 P[13372] [MainThread 12568] Response : 503 - API Proxy is not available 
2020-05-05 14:49:36,714 P[13372] [MainThread 12568] Response 503 on handshake port 9001 : API Proxy is not available 
2020-05-05 14:49:36,715 P[13372] [MainThread 12568] Application ID: THIS_IS_MY_APPKEY 
2020-05-05 14:49:36,715 P[13372] [MainThread 12568] Port 9001 on local proxy was detected


This is very, very strange... Perhaps you have some kind of local HTTP proxy running and that proxy interferes with some HTTP requests to the localhost while allowing others? I'm grasping at straws here. It would be interesting to see what occupies port 9000. Could you run "netstat -anb" in Command Prompt and see which process occupies port 9000? The Command Prompt needs to be launched with elevated privileges (aka run as administrator).

Click below to post an Idea Post Idea