question

Upvotes
Accepted
40 2 1 6

EMA Consumer App Login times out after 45 seconds

I'm just getting started with the EMA consumer tutorials. I've been provided two machine account names and passwords and as well as a-side and b-side VIP Service DNS names, but I am unable to login with either. I've used the obfuscation tool to generate the password string I use in the code. Where I'm stuck is right at the beginning of the tutorial code:

OmmConsumer consumer(OmmConsumerConfig()

.host( <A-side VIP Service DNS Name>:443 ) //"ADS:14002")

.username(<machine account name 1>)

.password(<password 1 obfuscation tool output>)

);

The result is always a 45 second timeout. The tutorial does not include a password, but I added it after trying it without didn't work.

Am I using the credential in the wrong way. Should I be using the A-side VIP service DNS Name as the host for the initial login? Do I need to provide the service name at login time?


Thank You




elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
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.

Please note - this is for connecting to Contributions Channel

Hello @jeff.birkel,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

-AHS


Upvotes
Accepted
32.2k 40 11 20

Hello @jeff.birkel,

If you are requesting dictionary then you are connecting at this point-

no firewall/connectivity issues and no protocol issues, i.e. getting further.

---

The dictionary is mandatory in order to parse content, options are to download the dictionary from the infra (default) or to use a local file based dictionary.

Instead of investigating why you can not download, for now, let's swap local file-based handling of the dictionary into config.

In EmaConfig, do:

<Dictionary>
            <Name value="Dictionary_2"/>
            <DictionaryType value="DictionaryType::FileDictionary"/>

            <!-- dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def -->
            <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
            <EnumTypeDefFileName value="./enumtype.def"/>
        </Dictionary>

You can either

place the two dictionaries from

C:\Program Files\Reuters\Elektron\Elektron-SDK-1.3.0.L1.win.rrg\Cpp-C\etc

Into your run file folder

or

update path in the config to point to where they are at.

Let us know how this works for you?

---

Once you are up and running the most straightforward way, you may then wish to go back, and take advantage of the latest features of the library, to define the encryption and connect to a linux endpoint, and also to download and use the infra-hosted dictionaries. These will be preferred.

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.

@zoya.farberov I dont know how far you reached in resolving this issue. I have a working C++ example in case you need one. Thx.

Thanks @Gurpreet.,!

This is excellent.

Am sure there will be more, and a C++ example will come very useful.

Upvotes
32.2k 40 11 20

Hello @jeff.birkel,

Looks like you are following EMA Consumer - Posting data to TR Contribution Channel tutorial? or EMA Consumer tutorial? Because the later is not describing how to connect to Contribution Channel via encrypted tunnel, it is connecting via RSSL to ADS infra component.

Looks like you are not connecting successfully to the endpoint.

Did you have a chance to go through the end section of TRCC tutorial, "Troubleshooting" and is both you keystore in order, as described and logging on level finest?

If you are following this tutorial, I would suggest following exactly as it states, i.e. producing the keystore as per steps, replacing your connection info into the provided ema config file, and referring to it from code as in tutorial.

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
40 2 1 6

Zoya, thank you for your response. I am using this tutorial: EMA Consumer - Posting data to TR Contribution Channel (C/C++)

There is no "Troubleshooting" section in this tutorial, and I don't know what you mean by "keystore in order" -- there doesn't seem to be a reference to that in this tutorial. (NOTE: The one you linked to above is the Java tutorial, not the one I am looking at.)

However I did create an EmaConfig.xml file as you suggested. (There wasn't one in the sample project so I created one from scratch and copied in the XML from the tutorial text. See below.) I then simplified my code changes to provide just a username in the code.

OmmConsumer consumer(OmmConsumerConfig().username( <machine account 1> ));

The result is the same as before: Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds) for chp02-amers1.thomsonreuters.com:443)'

There are further steps in the tutorial for Opening a Tunnel Stream and Performing a Client Login, but for now I am stuck at the very beginning of the program, where it tries an initial login as soon as you construct the OmmConsumer. (NOTE: It seems odd that no password is needed at this point. Since the port being used is 443, I assume the connection is HTTPS? Do I need to install a certificate for this to work?)

What should I try next?

Thank you very much for your attention to this matter, Jeff


EmaConfig.xml:


<?xml version="1.0" encoding="UTF-8"?>

<EmaConfig>

<ConsumerGroup>

<DefaultConsumer value="Consumer_1"/>

<ConsumerList>

<Consumer>

<Name value="Consumer_1"/>

<Channel value="Channel_1"/>

</Consumer>

</ConsumerList>

</ConsumerGroup>

<ChannelGroup>

<ChannelList>

<Channel>

<Name value="Channel_1"/>

<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>

<Host value="chp02-amers1.thomsonreuters.com"/>

<Port value="443"/>

</Channel>

</ChannelList>

</ChannelGroup>

</EmaConfig>


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.

@jeff.birkel

Please disregard on key store and Java TRCC comments.

From your original message I mistakenly thought you were integrating in EMA Java.

Upvotes
40 2 1 6

One more detail, I am working on Windows 10 and using Visual Studio 2017.

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
40 2 1 6

@zoya.farberov I looked at the Java tutorial you referenced. In that sample a key store file is passed into the OmmConsumer object. There's no equivalent step in the C++ tutorial.

Perhaps the difference is Windows. Windows has a centralized certificate store that programs can access via a system API so maybe that's what the C++ SDK is doing under the hood. If so it would still need to find a valid certificate for the given host name. Is there such a certificate and can it be downloaded? (It might also be among the many certificates that come with Windows.)

I'd expect a different error message if the problem was related to certificates but I though it might be worth asking. Thanks, Jeff


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
32.2k 40 11 20

Hello @jeff.birkel,

This config looks not to be valid. If it is contained in the folder you run from, it attempts to be

read and parsed when you create OMMConsumer

OmmConsumer consumer(OmmConsumerConfig().username("user"));

which may result in exception.

I would start with EmaConfig.xml from Example 341

Elektron-SDK-1.3.0.L1.win.rrg\Cpp-C\Ema\Examples\Training\Consumer\300_Series\341__MarketPrice__OffStreamPost

Drop it in the same folder where you are running from and edit to your host and port as discussed in the tutorial.

If you do not have the dictionary where tutorial config refers to it, you can either drop the dictionary in there, or edit the dictionary location in config.

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
40 2 1 6

@zoya.farberov I copied the file from sample 341, and added the host and port elements. (Note that the the 341 sample uses ChannelType:RSSL_SOCKET and I Ieft it that way for the first test.) With that config it gets the following error, which repeats several times.


(with RSSL_SOCKET)

loggerMsg

TimeStamp: 15:26:49.538

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_1

Instance Name Consumer_1_1

RsslReactor 0x0000023ECD2B87D0

RsslChannel 0x0000023ECD2B87D0

Error Id -1

Internal sysError 10057

Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS120-64\rcdev\source\esdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1132

Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS120-64\rcdev\source\esdk\Cpp-C\Eta\Impl\Transport\rsslSocketTransportImpl.c:5679> Error: 1002 ipcConnecting() client connect() failed. System errno: (10057)

loggerMsgEnd


Next I changed the ChannelType to RSSL_ENCRYPTED and tried again. This time the log output was a little different (it also repeated several times.)

loggerMsg

TimeStamp: 15:29:44.057

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_1

Instance Name Consumer_1_1

RsslReactor 0x00000278A3FBE950

RsslChannel 0x00000278A3FBE950

Error Id -1

Internal sysError 0

Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS120-64\rcdev\source\esdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1132

Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS120-64\rcdev\source\esdk\Cpp-C\Eta\Impl\Transport\ripcinetutils.c:410> winInetCallback error - HTTPSendRequest unable to complete successfully

loggerMsgEnd



I didn't do anything about the dictionary so that could be part of the problem. I don't know what you mean by: "If you do not have the dictionary where tutorial config refers to it, you can either drop the dictionary in there, or edit the dictionary location in config."

I understand that dictionaries have something to do with how data items are named and formatted, but that's about as far as I've gotten. Would that have to do with logging in?

Thanks, Jeff


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
32.2k 40 11 20

Hello @jeff.birkel,

ENCRYPTED is definitely the correct channel to establish with TRCC.

I do not think dictionary is the issue, from the error you see.

(You may learn more about dictionary use from Elektron API Concept Guide)

Rather, I do not think you are able to establish the connection successfully with the endpoint you are attempting to connect to.

What is the second endpoint you are assigned to?

Let me explain what I mean,

chp02-amers1.thomsonreuters.com is a linux endpoint, what looks like, we may need to confirm, and you are running from a windows machine, you have mentioned.

"EMA supports both of Windows and Linux platform. However, it must connect to an associated server OS host only. Otherwise, the application will encounter an "Initialization timed out" error message."

So worth testing via second endpoint if it is for windows. If not, may need to be re-assigned to a windows endpoint.

The other issue that is common, may be a connectivity issue connecting through to 443 port, if you are behind a firewall.

---

You may have noticed, that contribution is considered and advanced topic, it's recommended, in the beginning of the tutorial:

"Knowledge Prerequisite – Must have an understanding of an Elektron Message API and be familiar with consuming OMM Market Price data. You should also have a basic understanding of EMA Configuration (see the end of this article for links to relevant tutorials) "

Our tutorials section progresses in complexity, from the simplest to the more involved, and contribution tutorial, at the end, implies the previous absorption of the previous tutorials, which acquaint the user with the usage of dictionaries.

So you would have had more understanding, have you progressed through this route. However, we may try to save you some time instead, if we can, shall we? :)

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
40 2 1 6

@zoya.farberov

The second endpoint is: chp02-amers2.thomsonreuters.com

I just tried that endpoint and then the first endpoint with the second machine account and it still failed the same way. I am using a Windows machine so that could be the problem. I'll highlight this issue with @dominic.allison who is my refinitiv contact. Maybe he can assign me new endpoints.

I am working from my home where I have a basic home router installed with no special firewall setup so I would guess that is probably not an issue. Certainly I wouldn't have normal web browsing access if port 443 were blocked. Are there any other ports you'd like me to check?

However, we may try to save you some time instead, if we can, shall we? :)

Much appreciated. :)

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
32.2k 40 11 20

Hello @jeff.birkel,

When you have a chance, please try windows endpoints:

chpw02-amers1.thomsonreuters.com

chpw02-amers2.thomsonreuters.com

Let us know how this works for you?

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
40 2 1 6

With chpw02-amers1.thomsonreuters.com the log output is now this:


loggerMsg

TimeStamp: 09:46:15.050

ClientName: ChannelCallbackClient

Severity: Success

Text: Received ChannelUp event on channel Channel_1

Instance Name Consumer_1_1

Connected component version: eta3.1.1.L1.linux.rrg 64-bit Static

loggerMsgEnd


loggerMsg

TimeStamp: 09:47:00.136

ClientName: Consumer_1_1

Severity: Error

Text: dictionary retrieval failed (timed out after waiting 45000 milliseconds) for chpw02-amers1.thomsonreuters.com:443)

loggerMsgEnd


Exception Type='OmmInvalidUsageException', Text='dictionary retrieval failed (timed out after waiting 45000 milliseconds) for chpw02-amers1.thomsonreuters.com:443)'


So it seems that changing endpoints solved the initial connection problem, which is progress (thank you!), but now there is a 'dictionary retrieval' problem, which goes back to your comments about fixing up the EmaConfig.xml file to properly locate the dictionary. I guess I now need to learn about dictionaries. :) You provided a link to a 'concepts' document. Are there any additional links about creating and configuring dictionaries that would help me?


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
40 2 1 6

@zora.farberov

I copied the files to the working directory and made your changes in EmaConfig.xml and with that it got through the OmmConsumer constructor without any exceptions. (Although FYI I ended up having to make the changes to Dictionary_1 rather than Dictionary_2.)

I will probably revisit the dictionary handling and try to use the Linux endpoint at some point, but for now I will start working through the tutorials once again and try to achieve the goal, which is to push a data value to the Contribution Channel.

Thank you very much for your attentiveness and your expertise.


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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.