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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
73 0 2 5

Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running

Starting today (09/30) can no longer connect to the Eikon API Proxy.

Error looks like this:

2019-09-30 14:45:35,654 pyeikon INFO     Warning: file .portInUse was not found. Try to fallback to default port number.
2019-09-30 14:45:35,655 pyeikon INFO     Try defaulting to port 9000...
2019-09-30 14:45:37,663 pyeikon ERROR    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 0x000001C5CB39FB70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
2019-09-30 14:45:37,664 pyeikon INFO     Try defaulting to port 36036...
2019-09-30 14:45:39,690 pyeikon ERROR    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 0x000001C5CB3C3198>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
2019-09-30 14:45:39,691 pyeikon INFO     Try to handshake on url http://localhost:None/api/handshake...
2019-09-30 14:45:39,692 pyeikon ERROR    Error on handshake port None : Failed to parse: localhost:None
2019-09-30 14:45:39,692 pyeikon INFO     Set Proxy port number to None
2019-09-30 14:45:39,692 pyeikon ERROR    Port number was not identified.
Check if Eikon Desktop or Eikon API Proxy is running.


c:\Users\<user>\AppData\Roaming\Thomson Reuters\Eikon API Proxy\ is empy, no .portInUse file


Eikon terminal version 4.0.49

eikon lib version 1.0.1


In C:\ProgramData\Thomson Reuters\Eikon Data\Logs I don't see lines like 'listening to port=" at all, however, proxy worked somehow until today and I see a lot of lines containing "APIPROXY" before today, for example:

[2019-09-27 10:16:53.441|2B50|SD_KPROCFG    |2|INFO ][Batch#1] Uploading 1 CPAP setting(s), APIPROXY.THROTTLING.STORE

in the EikonStarter*.txt file.


Any help is highly appreciated, it's a blocker which happened over sudden. I already contacted the Eikon support (chat option), but was redirected here.

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

with extra logs enabled I see

[2019-09-30 15:15:40.850|4AA0|A_PROXYADDON  |4|DEBUG]ProxyResolver::initAvailableLocalPort(): initializing the local available port
[2019-09-30 15:15:40.851|4AA0|A_PROXYADDON  |4|DEBUG]ProxyResolver::setProxySharedMemory(): initializing the proxy shared memory
[2019-09-30 15:15:40.851|4AA0|A_PROXYADDON  |4|DEBUG]ProxyResolver::setProxySharedMemory(): http://127.0.0.1:8042
[2019-09-30 15:15:40.853|4AA0|A_PROXYADDON  |4|DEBUG]ProxyResolver::init(): Proxy addon initialized
[2019-09-30 15:15:41.377|4AA0|A_PROXYADDON  |2|INFO ]NetMonitor.startMonitoring, started collecting data.
[2019-09-30 15:15:41.385|4AA0|A_PROXYADDON  |4|DEBUG]AddonMain::GetAvailablePort(): retrieving the available port
[2019-09-30 15:15:41.385|4AA0|A_PROXYADDON  |2|INFO ]EikonProxy.listen, trying to listen on port: 8042
[2019-09-30 15:15:41.388|4AA0|A_PROXYADDON  |4|DEBUG]Mon Sep 30 2019 15:15:41 GMT+0300 (Russia TZ 2 Standard Time) Clear NodeJS DNS cache.
[2019-09-30 15:15:41.389|4AA0|A_PROXYADDON  |2|INFO ]EikonProxy.listen, listening succeeded on port: 8042
[2019-09-30 15:15:41.389|4AA0|A_PROXYADDON  |2|INFO ]Proxy agent correctly initialized

If I open http://127.0.0.1:8042/ in browser I see

Server socket terminatedPress "F5" to try to solve this issue, if the problem persists please contact your IT. 


If I manually create file .portInUse with 8042, in the script output I see

2019-09-30 15:13:06,271 pyeikon INFO     Response : 502 - <html>        <head>          <style>html,body{background-color:#2D2D2D;}</style>                <title>Navigation Error</title> </head> <body>          <p style="font-size:22; font-weight:bold; font-famly: helvetica; text-align:justify; color:#FF9414"> ... Hw+/xdgAAi0XWMuJ/iUAAAAAElFTkSuQmCC" style="width:286px; height:100px;"/>           </p> <p style="font-size:20; font-weight:bold; font-family: helvetica; text-align:center; color:#FF9414"></p> <br/>           <p style="font-size:16; color:#C2C2C2">Server socket terminated<br>Press "F5" to try to solve this issue, if the problem persists please contact your IT.</p>      </body></html> Traceback (most recent call last): 

- which, I suppose, is the serialized error page.

Surprisingly, when I login to a terminal on another PC, the http://localhost:9000/ping?all link works. But on my PC it says that "This site can’t be reached", so, supposedly, proxy doesn't start on my PC for some reason.

Upvotes
Accepted
73 0 2 5

It appears that the problem was in the corporate firewall or smth. like that.

To reiterate:

* eikon python api started throwing the "Warning: file .portInUse was not found. Try to fallback to default port number" error

* http://localhost:9000/ping?all was not accessible, nothing listened 9000 port

* after a fresh reinstall of the Eikon terminal:

** SxS.YYYYMMDD.hhmmssfff.pPID.txt log files were missing in the ..\Thomson Reuters\Eikon Data\Logs\TRD

** THOMSONREUTERS.EIKON.DESKTOPSXSSVC directory was missing in the ..\Thomson Reuters\EikonUser\Cache\LibraryCache\Apps

* it appears that smth. prevented the THOMSONREUTERS.EIKON.DESKTOPSXSSVC app from downloading

* once the issue above was pinpointed and addressed, the THOMSONREUTERS.EIKON.DESKTOPSXSSVC app installed and the proxy started on 9000 port


Maybe this information will help someone running into the same problem.

Please consider adding a check for the THOMSONREUTERS.EIKON.DESKTOPSXSSVC to the troubleshooting guide https://developers.refinitiv.com/article/eikon-data-apipython-troubleshooting-refinitiv .

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 @ivan.cherkasov

Thanks for the feedback.

Will include the information in the article.

Upvotes
39.3k 76 11 27

EikonProxy listening on local port 8042 is not the APIPROXY service that Eikon Data APIs utilize. What you experienced with an Eikon process listening on port 8042 is normal and expected. What you experienced with Eikon not listening on port 9000 and not creating .portInUse file is not normal. To investigate the problem we need to look at the log file named SxS.YYYYMMDD.hhmmssfff.pPID.txt, where YYYYMMDD and hhmmss(fff) are date and time strings when the log is created and PID is the Windows process ID of the Eikon process creating the log. The time and the PID will not be the same for the folder name and the file names. E.g. the full path to the log file we’re interested in may be C:\ProgramData\Thomson Reuters\Eikon Data\Logs\TRD\Eikon.20190930.111142.p15756\SxS.20190930.111236000.p13216.txt.

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
73 0 2 5

Yes, 9000. SxS.YYYYMMDD.hhmmssfff.pPID.txt file was missing, as well as AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\THOMSONREUTERS.EIKON.DESKTOPSXSSVC directory.

That was the situation after multiple uninstall/reboot/install/reboot/try cycles.

Then THOMSONREUTERS.EIKON.DESKTOPSXSSVC directory was copied from another pc, where Eikon terminal was launched using my login, and terminal was left overnight. Today proxy magically started working.

Today SxS log file doesn't look particularly interesting:

start node
Arg: C:\Users\<user>\AppData\Local\Thomson Reuters\Eikon\X\Bin\Eikonbox.exe C:\Users\<user>\AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\THOMSONREUTERS.EIKON.DESKTOPSXSSVC\1.1.0.69\index.js -TraceLevel=-1 

I don't know how exactly Eikon terminal works, but I've got an impression that it was not able to populate its cache with THOMSONREUTERS.EIKON.DESKTOPSXSSVC and, possibly, other subsystems for whatever reason. For example, I don't see neither update button, nor a checkmark confirming that I'm running the latest version (I'm not) as in the https://developers.refinitiv.com/article/eikon-data-apipython-troubleshooting-refinitiv .

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.