Error on handshake url http://127.0.0.1:9060/api/handshake

Eikon is working fine.

Python API stopped to work yesterday with the following errors:


C:\Users\backend>python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:34:50) [MSC v.1934 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import eikon as ek
>>> ek.set_log_level(1) #This is to enable log deta
>>> ek.set_app_key("***")
2024-03-01 13:06:36,286 P[11652] [MainThread 32844] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
2024-03-01 13:06:36,286 P[11652] [MainThread 32844] Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': '***'}
params = None
2024-03-01 13:06:36,372 P[11652] [MainThread 32844] Send request with headers [(b'Host', b'127.0.0.1:9060'), (b'Accept-Encoding', b'gzip, deflate'), (b'Connection', b'keep-alive'), (b'User-Agent', b'python-httpx/0.24.0'), (b'Accept', b'application/json'), (b'x-tr-applicationid', b'***')] and cookies None
2024-03-01 13:06:36,374 P[11652] [MainThread 32844] HTTP request response 200: {"statusCode":"ST_PROXY_READY","version":"3.9.0-eikon4"}
2024-03-01 13:06:36,375 P[11652] [MainThread 32844] Checking proxy url http://127.0.0.1:9060/api/status response : 200 - {"statusCode":"ST_PROXY_READY","version":"3.9.0-eikon4"}
2024-03-01 13:06:36,375 P[11652] [MainThread 32844] Port 9060 was retrieved from .portInUse file
2024-03-01 13:06:36,376 P[11652] [MainThread 32844] Try to handshake on url http://127.0.0.1:9060/api/handshake...
2024-03-01 13:06:36,377 P[11652] [MainThread 32844] Request to http://127.0.0.1:9060/api/handshake
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': '***'}
params = None
2024-03-01 13:06:51,379 P[11652] [MainThread 32844] TimeoutException on HTTP request: ReadTimeout('')
2024-03-01 13:06:51,380 P[11652] [MainThread 32844] Error on handshake url http://127.0.0.1:9060/api/handshake : ReadTimeout('')
2024-03-01 13:06:51,381 P[11652] [MainThread 32844] Error on handshake url http://127.0.0.1:9060/api/handshake : ReadTimeout('')
2024-03-01 13:06:51,381 P[11652] [MainThread 32844] Port number was not identified, cannot send any request
2024-03-01 13:06:51,382 P[11652] [MainThread 32844] Received notification for closed streaming session 0
2024-03-01 13:06:51,383 P[11652] [MainThread 32844] Init a Desktop session with new app_key

I went through https://developers.lseg.com/en/article-catalog/article/eikon-data-api-python-troubleshooting-refinitiv

Logs:


[2024-03-01 17:31:39.153|1|api-svc|1|INFO] Start server...
[2024-03-01 17:31:39.162|1|api-svc|2|DEBUG] onStarted: 9000
[2024-03-01 17:31:39.163|1|api-svc|1|INFO] Listening to port=9000
[2024-03-01 17:31:39.165|1|data-api|1|INFO] API Proxy is available on port 9060. Start redirecting /api/* requests


http://localhost:9000/ping?all:

{"port":9000,"mode":"eikon4","pid":24104,"hasSecure":true,"startedTime":"Thu Feb 29 2024 21:05:26 GMT-0500 (Eastern Standard Time)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/api"},{"path":"/sxs/v1/services/messenger"}]}


http://localhost:9060/api/status

{"statusCode":"ST_PROXY_READY","version":"3.9.0-eikon4"}


Eikon: 4.0.6412

eikon python module: 1.1.16


What can I do next?

Tagged:

Best Answer

  • Charles Cara
    Charles Cara Explorer
    Answer ✓

    I encountered the same error. After a call from LSEG support, the solution was to generate a new API Key and use that instead of the old one.

Answers