Elektron SDK C++ tutorial example - Unable to login

I am currently trying the tutorial example for contributing data "Elektron Message API - Consumer Tutorial - Posting data to TR Contribution Channel" on a Windows 10 machine.

The following line seems to timeout:

OmmConsumer consumer(OmmConsumerConfig().host("ecc01-emea1.fr.aws.thomsonreuters.com:443").username("GE-A-01281282-3-2411"));


And I get the following error:

Exception Type='OmmInvalidUsageException', Text='login failed (timed out after waiting 45000 milliseconds) for ecc01-emea1.fr.aws.thomsonreuters.com:443)', ErrorCode='-4052'


I believe the server and port are correct and the username is the one I received.

Any ideas?

Thanks


Best Answer

  • For Windows, EMA needs to have an encrypted protocol type set to SOCKET. Please see the Channel_3 configuration in EmaConfig.xml provided in Cpp-C/Ema/Examples.

    The line is:

    <EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>

    This encryption type requires OpenSSL libraries, which are not built by the Elektron SDK package. Please see chapter 4.3.3: Encrypted Connections in the EMA Developer's Guide for more information.

Answers

  • Hi @emir.subasic

    The above host value is a valid TRCC mount point and should be working fine.

    Just want to check you are following all the steps in the tutorial - including changing the Channel Type to RSSL_ENCRYPTED from the default RSSL_SOCKET

    Rather than hard coding the host:port into the source code, change the config file as described in the tutorial for now and confirm it all works.

  • Hi,

    Below is a screenshot that illustrates the usage and the error I am getting. As you can see the xml is updated for Channel 1 and 2. It is in the same directory as the source. When run it is somehow still picking up localhost.

    I guess that's the default when not specified:

    OmmConsumerConfig& host( const EmaString& host = "localhost:14002" );


    See error below.

    Any ideas on whats wrong? Thanks


    image


  • Hi,

    Have you had a chance to review my last post please. This is quite an urgent issue for us.

    Thanks

  • Hi @emir.subasic

    The EmaConfig.xml files needs to be in the Working Directory which defaults to the location where the Project files etc are located i.e. $(ProjectDir)

    For example, on my PC I placed the EmaConfig.xml file in

    C:\Code\ESDKC131VS2017\Cpp-C\Ema\Examples\Training\Consumer\300_Series\341__MarketPrice__OffStreamPost

    where C:\Code\ESDKC131VS2017 is the location of my main esdk.sln file.

    If you copy the file to that location, it should pick up the contents of the file.


  • Hi,

    Thanks for looking into this. I have tried that but now get a different error.

    image

  • Hi,


    I provide my EmaConfig.xml and the latest log file. Please note I had to rename the files extension to txt in order to upload here.

    Thanks

    emaLog_16628.log.txtEmaConfig.xml.txt


  • This functionality was added in 3.3.0, which was released in March 2019.

  • Thank you for pointing this out. It is working now.