question

Upvotes
Accepted
41 1 4 4

Why do I get "errorId=-1 text=Connection refused" while connecting to MMT_DICTIONARY?

Hello!

I try to connect to the MMT_DICTIONARY (332 java example). I extended this example to use username,password and clientId while creating OmmConsumer. But when I start the example I get next output:

> Task :Ema:Examples:runconsumer332
Sep 24, 2021 6:21:31 PM com.refinitiv.ema.access.ConfigErrorTracker log
SEVERE: loggerMsg
ClientName: EmaConfig
Severity: Error
Text: Unable to find tagId for DefaultServiceID
loggerMsgEnd


Sep 24, 2021 6:21:31 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
WARNING: loggerMsg
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
RsslReactor @c8c12ac
RsslChannel @6adbc9d
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error initializing channel: errorId=-1 text=Connection refused
loggerMsgEnd

At the same time I am able to run example 450 with the same username, password and clientId.


Could you please help me to understand what is the problem with MMT_DICTIONARY?

connection
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
20.3k 73 10 20

Hi @Nikita

Example 332 does not have the necessary additional code required to connect to the RTO service - it is only designed to connect to a local server.

You would have to merge the additional service discovery etc with the Data Dictionary request code from example 332 to achieve what you require e.g. it performs service discovery, extracts a host from the list and then uses that and additional information to populate some in-memory config programmatically. It then uses that config as part of the OMMConsumer creation/initialisation.

A simple example for connecting to RTO is ex113 which uses Session Management facility to do much of the above behind the scenes.

Also, I have to ask if there is a particular reason for requesting the data Dictionary? EMA does not require the developer to explicitly request and download the dictionary - it does that behind the scenes and uses it to decode the data. You can amend the EMA config to use either local dictionary files or download from the server(the recommended option).



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
41 1 4 4

Thank you for the answer, I will try to do this. I need dictionaries to convert a given set of strings with ACRONYMs into FIDs and then use them to configure a view like in the example 360.

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
41 1 4 4

One more question: can method .host() be used to configure OmmConsumer? Something like that:
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig()
.host("ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:14002")
.username("username")
.password("password")
.clientId("clientId"));

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.

If I configure the OmmConsumer like that I get the following:

Sep 24, 2021 7:18:00 PM com.refinitiv.ema.access.ConfigErrorTracker log
SEVERE: loggerMsg
ClientName: EmaConfig
Severity: Error
Text: Unable to find tagId for DefaultServiceID
loggerMsgEnd


Sep 24, 2021 7:18:05 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
WARNING: loggerMsg
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
RsslReactor @c8c12ac
RsslChannel @6adbc9d
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error - exceeded initialization timeout (5 s)
loggerMsgEnd


Upvotes
20.3k 73 10 20

hi @Nikita

I would never recommend hardcoding a specific hostname into an application or config because:

  • they are subject to change and
  • if the particular host is unavailable for whatever reason then your application would not be able to connect.


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.

I got it, thanks. But still will I be able to connect in that way if I request Services via 450 example and then use them to improve 322 example? At this moment I get next responses:
Sep 27, 2021 4:53:05 PM com.refinitiv.ema.access.ConfigErrorTracker log
SEVERE: loggerMsg
ClientName: EmaConfig
Severity: Error
Text: Unable to find tagId for DefaultServiceID
loggerMsgEnd


Sep 27, 2021 4:53:10 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
WARNING: loggerMsg
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
RsslReactor @6069db50
RsslChannel @4efbca5a
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error - exceeded initialization timeout (5 s)
loggerMsgEnd

Upvotes
20.3k 73 10 20

Hi @Nikita

Calling the OmmConsumerConfig.host() method overrides the channelType to RSSL_SOCKET - therefore it is not possible to use the OmmConsumerConfig.host() method to set RTO endpoints (as RTO uses Encrypted ChannelType).

You can still set the RTO hostname and port programmatically by using the technique shown in ex450 which creates a config Map and sets host and port within the Map entries. You can then pass that Map to the OmmConsumerConfig.config() method.



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
41 1 4 4

Hello @umer.nalla

Thank you for the answer. Would you also be so kind as to tell me is there any difference between connecting to the Managed Distribution Service using vpn, ADS ip and service name; and connecting via username, password, clientId like in the 450 example. Could I read the difference somewhere?

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
20.3k 73 10 20

Hi @Nikita

For the RTDS + VPN scenario - you would need to have an

  • onsite RTDS infrastructure hardware + software
  • An Edge device with a Real-Time feed within your organisation
  • the costs associated with the RTDS software Licenses and the Real-Time feed.
  • This would also allow you to consume a full tick feed (subject to your VPN internet connection speed etc.)

For the Real-Time Optimized scenario, the RTDS infrastructure is hosted by us in the cloud and you do not need to deploy any further hardware or software. The RTO feed is Trade Safe Bandwidth optimised one - i.e. delivers up to 3 ticks per second plus all trades. The RTO feed is also lower cost than the full Real-Time feed.

Generally speaking, RTDS is more suitable for organisations that have multiple users, internal publishers etc.

If you want further information, please reach out to your Refinitiv Account team or if you dont have one, then feel free to contact our sales teams - Contact us | Refinitiv


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.

Thank you for the explanation!
Click below to post an Idea Post Idea