In using RDP search in R (using a community package) I receive an error message: "Failed to connect


In using RDP search in R (using a community package) I receive an error message: "Failed to connect to localhost port 9060: Connection refused"


Is this something that can be fixed on your end? I can use other data functions just fine since they use port 9000.


My colleagues would also be interested in a solution to this as well, since it allows us to bypass Excel altogether.

Best Answer

  • Jirapongse
    Answer ✓

    @devimonisha.jr

    First of all, the RefinitvR library is a third-party library that we are unable to support it.

    I have done a quick test and found that the library works fine on my machine. I can retrieve data from TCP port 9060. Therefore, the client needs to verify the version of Eikon or Refinitiv Workspace used on that machine. Currently, the default TCP port of the Eikon API Proxy is 9060.

    Moreover, the client can refer to the Eikon Data API(Python) Troubleshooting article to make sure that the Eikon API proxy is running properly.

    Otherwise, the client can run the following code to change the default TCP ports used by the RefinitivR library. The rdp_port is used by the search function.

      options(eikon_port=9000L)
      options(rdp_port=9060L)

Answers

  • Hi @devimonisha.jr ,

    as mentioned in this thread

    You can set a TCP port to 9060 by using the following code.

    Call the set_proxy_port before calling set_app_id.

    set_proxy_port(9060L)
    set_app_id('<application key>')

    Please make sure that the Eikon or Workspace runs properly. Eikon Data API requires Eikon to run on the same machine.

    You can verify if the Eikon API Proxy is running by accessing http://127.0.0.1:9060/api/status via a web browser.

    1658453076164.png

    Hope this helps and please let me know in case you have any further questions

  • Hi @devimonisha.jr ,

    Could you please clarify the library you're using and the code used?

    If the library is https://github.com/GreenGrassBlueOcean/RefinitivR , you can raise this issue to the contributor at https://github.com/GreenGrassBlueOcean/RefinitivR/issues.

    However, if you have an access to RDP API, R language can be used to call RDP API search function as well, for example

    1. request the token with your username, password, app key

    library(httr)

    headers = c(
    'Content-Type' = 'application/x-www-form-urlencoded'
    )

    body = list(
    'username' = '{{USERNAME}}',
    'password' = '{{PASSWORD}}',
    'grant_type' = 'password',
    'scope' = 'trapi',
    'takeExclusiveSignOnControl' = 'true',
    'client_id' = '{{APP_KEY}}'
    )

    res <- VERB("POST", url = "https://api.refinitiv.com/auth/oauth2/v1/token", body = body, add_headers(headers), encode = 'form')

    cat(content(res, 'text'))

    2. then store the access_token into a variable access_token and use it to call the search endpoint of the RDP API

    library(httr)

    headers = c(
    'Content-Type' = 'application/json',
    'Authorization' = 'Bearer access_token'
    )

    body = '{
    "View": "CommodityQuotes",
    "Query": "cheese",
    "Navigators": "ExchangeName"
    }';

    res <- VERB("POST", url = "https://api.refinitiv.com/discovery/search/v1/", body = body, add_headers(headers))

    cat(content(res, 'text'))
  • @devimonisha.jr

    I tested the https://github.com/GreenGrassBlueOcean/RefinitivR library and I can use the search feature properly.

    1679290211803.png

    Currenlty, Eikon uses the TCP Port 9060, as a default port.

    You may need to verfiy the version of Eikon or Refinitiv Workspace that you are using. I am using Eikon Desktop 4.0.62.


  • Thanks , but the client is still not happy.

    He say's "

    Unfortunately, only the first "solution" tried to directly find a solution. Unfortunately, you can't set the API's port like that (gives me a refused connection). The second "solution" said use a different language; I don't see how this is relevant. The third solution says "well it works for me" which doesn't help.


    I have been trying to connect to the RDP service using the package mentioned in the file (RefinitivR) and the package creator said it's an issue on the developers' end and since users first reported the issue has never heard of solution for it. To me, the development team should be able to explain conditions under which the RDP API functionality should work other than just saying "properly installed". I need help to determine the port issue so it can find a solution. I am a user, and not an expert on port configuration or whatever this is.

    I wonder if there are anyone on there who has had the 9060 port issue who has managed to get around it?

  • Thanks , but the client is still not happy.

    He say's "

    Unfortunately, only the first "solution" tried to directly find a solution. Unfortunately, you can't set the API's port like that (gives me a refused connection). The second "solution" said use a different language; I don't see how this is relevant. The third solution says "well it works for me" which doesn't help.


    I have been trying to connect to the RDP service using the package mentioned in the file (RefinitivR) and the package creator said it's an issue on the developers' end and since users first reported the issue has never heard of solution for it. To me, the development team should be able to explain conditions under which the RDP API functionality should work other than just saying "properly installed". I need help to determine the port issue so it can find a solution. I am a user, and not an expert on port configuration or whatever this is.

    I wonder if there are anyone on there who has had the 9060 port issue who has managed to get around it?

  • Client's reply "

    Thanks for your reply. My Refinitiv Workspace version is 1.20.38. I have Eikon Desktop installed, but I haven't used it since I was told Workspace was a replacement for Desktop (version 4.0.61). Does having both installed create a conflict?


    I'll look at the troubleshooting guide (minus the python stuff) as much as I can to see if I find anything off.

    I got port 9060 to open. I had to have Eikon Desktop running. It doesn't work with Workspace alone. Is this the intended design? I only used Workspace because I was told by my data department it was a replacement for Desktop and they planned to phase it out soon. Should I tell them we still need it?

  • @devimonisha.jr

    You need to check the Data API Proxy TCP port opened by Refintiv Workspace by opening the About Refinitiv Workspace windows from the help menu.

    1679549113981.png

    For example, it shows that the Data API Proxy use the 9001 port. Then, you need to override the port used in the RefinitivR code.

    options(eikon_port = 9001L)
    options(rdp_port=9001L)