Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
39 2 5 6

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apierror-503
icon clock
10 |1500

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

Hello @Noel,

According to the troubleshooting guide steps, what do you see in your .portInUse file?

Hi @zoya.farberov , It shows 9001.

Tks


Hi @Noel,

If the Eikon is listening on 9001 and .portInUse for API shows 9001, generally the two should match.

However, it may be worth verifying that your running Eikon is fully healthy. I would try shutting down and restarting Eikon first (if it does not shut down cleanly, this may confirm the cause), retrying the API connection; and If that does not help, shutting down the machine, restarting Eikon, and then retrying to connect.

Show more comments

And if I ping 9001 I get:

{"port":9001,"mode":"eikon4","pid":12148,"hasSecure":true,"startedTime":"Tue May 05 2020 08:02:53 GMT-0700 (Pacific Daylight Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"}]}

@Noel,

Unusual... but all kind of improbable local environment issues are possible. Which are not always feasible to investigate in the format of a discussion forum... but let us try and find out more info of yours:

Are you able to run a command shell (CMD) "as administrator", and try on it

netstat -a -o | findstr 9000

and after it completes ( takes loooong), again

netstat -a -o | findstr 9001

The last number that you see is the process ID. For example:

 TCP    127.0.0.1:9000         MyBox:0       LISTENING       48892

Go into Task Manager and check for PID (process ID) you have identified on the port...

so see what you've got, and what's really listening on what? :)

Show more comments

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

@Noel.Randewich

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS


Upvotes
Accepted
39 2 5 6

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 512.0 KiB each and 1.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 512.0 KiB each and 1.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

@Noel.Randewich

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvotes
39.4k 77 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 512.0 KiB each and 1.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).

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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