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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
36 1 2 4

APP cannot connect to server port 9000... target machine is actively refusing it

my App_key couldn't connect to the server. When I did a netstat, eikonbox is not listening to 9000.

Error Message Below:

Error on checking port 9000 : HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /api/v1/data (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at XXXX>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonconnection
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
4.6k 26 7 22

@calvin.lam first thing to check is that you are on the latest version of the python library (1.0.0). After that I suggest to check if .portInUse file exists. As Eikon API Proxy initializes, it writes a port that it is using into this location:

%APPDATA%\Thomson Reuters\Eikon API Proxy\.portInUse

```%APPDATA%``` should resolve into ```C:\Users\user_name\AppData\Roaming```.

Do you see a port number ? It would be helpful if you share the contents of the log file in this folder:

%APPDATA%\Thomson Reuters\Eikon API Proxy\Logs\
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, I'm having the same issue. I'm on the latest version of the python library, but I do not find the Thomson Reuters folder in the AppData folder. What can be causing this problem?

@facuiannello
Do you have Eikon running on the machine where you're running your Python scripts?

Hi,thanks for your response. I do have Eikon desktop version running on the same computer. Shoudn't this folder be created during Eikon installation?

Show more comments
Upvotes
36 1 2 4

Thanks for the reply @facuiannello, @Zhenya Kovalyov @Alex Putkov.I think I managed to solve it..... at least no error message so far. no time to test now.

I have Eikon running and eikon package is 1.0.0. I checked out the .portinuse file and noticed it was (port) 9000, next I did a netstat - anb (as admin with cmd) and checked out a port that EikonBox is listening to but not used; it doesn't have 9000 but I managed to find 8043. Changed the portinuse file to 8043. Next, I ran EK.set_app_key("XXXXXXXXXXXXX") and no error message. I checked netstat -anb and saw that 8043 has established a connection....

I hope this is the correct way.. i need to run now for a meeting and can't test getting data.

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.

@calvin.lam
Would you mind sharing your experience further when you have a chance? The behavior you describe is not in line with my expectations. I would not expect Eikon APIs Proxy to listen on port 8043. The startup logic is that it tries port 9000. If 9000 is occupied it tries 9001, 9002 and so on until it finds a free port. Once it sets the port number to listen on this port number is written into the file %APPDATA%\Thomson Reuters\Eikon API Proxy\\.portInUse

@calvin.lam could you please paste the http://localhost:8043/ping?all address into your browser while Eikon is running, and share the output of this. Does this work? If not, try http://localhost:9000/ping?all

Upvotes
1 0 2 2

Hi, how to know if your API service is activated?


when i put the url : http://localhost:9000/ping?all on a browser i get the following answer.


{"port":9000,"mode":"eikon4","pid":4848,"hasSecure":true,"startedTime":"Mon Oct 07 2019 20:48:23 GMT+0100 (GMT Daylight Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}}]}


which doesn't include the api



This is on behalf of a client.

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.

@AUP1028

1. Old threads that have an accepted answer are not monitored by moderators. If you have a new question always start a new thread.
2. {"path":"api"} missing from the "subApps" in the response to http://localhost:9000/ping?all indicates that Eikon API Proxy service is not activated for this user. The most likely reason is that the variant of Eikon the user subscribes to does not include access to Eikon Data APIs.

Click below to post an Idea Post Idea