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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
38 0 1 3

Error code 503 | Server Error: API Proxy is not available?

Cannot call in data via Eikon Data API since Monday, was working fine on Sunday. Working within Jupyter Notebook. Have restarted Eikon and my machine multiple times to no avail.

SxS.20200507.181819000.p20536.txt

.portInUse 9001

http://localhost:9001/ping?all

{"port":9001,"mode":"eikon4","pid":20536,"hasSecure":true,"startedTime":"Thu May 07 2020 18:18:29 GMT+0100 (GMT Daylight Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"},{"path":"/sxs/v1/services/messenger"}]}


eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonerror-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.

Upvotes
Accepted
38 0 1 3

Hi Wasin.I did not. After I posted my last response I gave up as my original ticket sent me here in the first place. About a week later it started working all by itself.

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.

Upvotes
9.5k 10 5 7

Hello @Martin.Miller

Have you checked the answer of the similar question?

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.

Yes I did check that previous answer, which is why I have posted the logs etc above. I also pointed out that I have started my machine multiple times

Upvotes
45.2k 103 43 60

@Martin.Miller

Please try to enable Eikon Data APIs log with the below code.

import logging
logger = logging.getLogger('pyeikon')
logger.setLevel(5)
ek.set_app_key('appkey')

I got the following log when Eikon Proxy API uses 9001 port instead of 9000 port.

2020-05-08 14:09:16,394 P[34436] [MainThread 31912] Set App Key: xxx
2020-05-08 14:09:17,411 P[34436] [MainThread 31912] Error on checking port 9000 : ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2020-05-08 14:09:17,412 P[34436] [MainThread 31912] Warning: file .portInUse was not found. Try to fallback to default port number.
2020-05-08 14:09:17,414 P[34436] [MainThread 31912] Try defaulting to port 9000...
2020-05-08 14:09:18,432 P[34436] [MainThread 31912] Error on checking port 9000 : ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2020-05-08 14:09:18,434 P[34436] [MainThread 31912] Try defaulting to port 36036...
2020-05-08 14:09:20,442 P[34436] [MainThread 31912] Error on checking port 36036 : HTTPConnectionPool(host='localhost', port=36036): Max retries exceeded with url: /api/v1/data (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000238A19ADF98>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
2020-05-08 14:09:20,443 P[34436] [MainThread 31912] Try to handshake on url http://localhost:None/api/handshake...
2020-05-08 14:09:20,444 P[34436] [MainThread 31912] Error on handshake port None : Failed to parse: localhost:None
2020-05-08 14:09:20,445 P[34436] [MainThread 31912] Set Proxy port number to None
2020-05-08 14:09:20,446 P[34436] [MainThread 31912] Unlock login_event for streaming session 0 due to stop streaming call
2020-05-08 14:09:21,466 P[34436] [MainThread 31912] Error on checking port 9000 : RemoteProtocolError("can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE")
2020-05-08 14:09:21,467 P[34436] [MainThread 31912] Warning: file .portInUse was not found. Try to fallback to default port number.
2020-05-08 14:09:21,468 P[34436] [MainThread 31912] Try defaulting to port 9000...
2020-05-08 14:09:22,487 P[34436] [MainThread 31912] Error on checking port 9000 : RemoteProtocolError("can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE")
2020-05-08 14:09:22,488 P[34436] [MainThread 31912] Try defaulting to port 36036...
2020-05-08 14:09:24,497 P[34436] [MainThread 31912] Error on checking port 36036 : ConnectionError(OSError("Multiple exceptions: [Errno 10061] Connect call failed ('::1', 36036, 0, 0), [Errno 10061] Connect call failed ('127.0.0.1', 36036)"))
2020-05-08 14:09:24,498 P[34436] [MainThread 31912] Error: no proxy address identified.
Check if Eikon Desktop or Eikon API Proxy is running.
2020-05-08 14:09:24,499 P[34436] [MainThread 31912] Port number was not identified, cannot send any request
2020-05-08 14:09:24,500 P[34436] [MainThread 31912] Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running

It turns out that the value of TCP port in C:\Users\<user>\AppData\Roaming\Thomson Reuters\Eikon API Proxy\.portInUse is still 9000.


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.



This is what I got from the code

2020-05-09 10:14:32,247 P[38728] [MainThread 41976] Checking port 9001 response : 503 - API Proxy is not available 2020-05-09 10:14:32,251 P[38728] [MainThread 41976] Port 9001 was retrieved from .portInUse file 2020-05-09 10:14:32,251 P[38728] [MainThread 41976] Try to handshake on url http://localhost:9001/api/handshake...
2020-05-09 10:14:32,256 P[38728] [MainThread 41976] Response : 503 - API Proxy is not available 2020-05-09 10:14:32,257 P[38728] [MainThread 41976] Response 503 on handshake port 9001 : API Proxy is not available 2020-05-09 10:14:32,258 P[38728] [MainThread 41976] Application ID: ****************************** 2020-05-09 10:14:32,258 P[38728] [MainThread 41976] Port 9001 on local proxy was detected

I think I need a ticket opened for this

Hello @Martin.Miller

Did you raise a ticket yet?

Show more comments