question

Upvotes
Accepted
1 1 2 2

Issue in OMM Consumer creation - timeout (New to Refinitiv api)

I am using following code to test connect to contrib server to publish data.

This is part of sample I got from a link shared by support team. It is failing at OMM Consumer creation.

Can someone please guide what needs to be corrected here?

Output ::

May 25, 2021 11:16:26 AM com.thomsonreuters.ema.access.ChannelCallbackClient reactorChannelEventCallback

SEVERE: loggerMsg

ClientName: ChannelCallbackClient

Severity: Error

Text: Received ChannelDown event on channel Channel_1

Instance Name Consumer_1_1

RsslReactor @6b6776cb

RsslChannel @1863d2fe

Error Id 0

Internal sysError 0

Error Location Reactor.processWorkerEvent

Error text Error - exceeded initialization timeout (5 s)

loggerMsgEnd

login failed (timed out after waiting 45000 milliseconds) for contrib1-emea1.platform.refinitiv.com:443)


Code ::

AppClient appClient = new AppClient();

System.out.println("Starting encrypted connection...");

// Create an OMM consumer

OmmConsumer consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("contrib1-emea1.platform.refinitiv.com:443")

.username("xxxxx") //Machine ID shared by Refinitiv

.password("xxxxxx") // password shared by Refinitiv

.tunnelingKeyStoreFile("C:\\Users\\xxxx\\trcc.jks") //generated jks with *.cer file provided by Refinitiv

.tunnelingKeyStorePasswd("xxxxx"));


ClassOfService cos = EmaFactory.createClassOfService()

.authentication(EmaFactory.createCosAuthentication().type(CosAuthentication.CosAuthenticationType.NOT_REQUIRED))

.dataIntegrity(EmaFactory.createCosDataIntegrity().type(CosDataIntegrity.CosDataIntegrityType.RELIABLE))

.flowControl(EmaFactory.createCosFlowControl().type(CosFlowControl.CosFlowControlType.BIDIRECTIONAL).recvWindowSize(1200))

.guarantee(EmaFactory.createCosGuarantee().type(CosGuarantee.CosGuaranteeType.NONE));


System.out.println("Starting tunnel stream...");


EmaConfig.xml ::

<EmaConfig>


<ConsumerGroup>

<!-- DefaultConsumer parameter defines which consumer configuration is used by OmmConsumer -->

<!-- if application does not specify it through OmmConsumerConfig::consumerName() -->

<!-- first consumer on the ConsumerList is a default consumer if this parameter is not specified -->

<DefaultConsumer value="Consumer_1"/>

<ConsumerList>

<Consumer>

<Name value="Consumer_1"/>

<!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14002" -->

<Channel value="Channel_1"/>

<!-- Logger is optional: defaulted to "File + Success" -->

<Logger value="Logger_2"/>

<!-- Dictionary is optional: defaulted to "ChannelDictionary" -->

<Dictionary value="Dictionary_2"/>

<XmlTraceToFile value="1"/>

</Consumer>

<Consumer>

<Name value="Consumer_2"/>

<Channel value="Channel_2"/>

<Logger value="Logger_2"/>

<Dictionary value="Dictionary_2"/>

</Consumer>

</ConsumerList>

</ConsumerGroup>

<ChannelGroup>

<ChannelList>

<Channel>

<Name value="Channel_1"/>

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

<!-- CompressionType is optional: defaulted to None -->

<!-- possible values: None, ZLib, LZ4 -->

<CompressionType value="CompressionType::None"/>

<GuaranteedOutputBuffers value="5000"/>

<!-- ConnectionPingTimeout is optional: defaulted to 30000 -->

<ConnectionPingTimeout value="30000"/>

<!-- TcpNodelay is optional: defaulted to 1 -->

<!-- possible values: 1 (tcp_nodelay option set), 0 (tcp_nodelay not set) -->

<TcpNodelay value="1"/>

<Host value="contrib1-emea1.platform.refinitiv.com"/>

<Port value="443"/>

</Channel>

</ChannelList>

</ChannelGroup>

<DictionaryGroup>

<DictionaryList>

<Dictionary>

<Name value="Dictionary_1"/>

<!-- DictionaryType is optional: defaulted to ChannelDictionary" -->

<!-- possible values: FileDictionary, ChannelDictionary -->

<!-- if DictionaryType is set to ChannelDictionary, file names are ignored -->

<DictionaryType value="DictionaryType::ChannelDictionary"/>

</Dictionary>

<!-- <Dictionary>-->

<!-- <Name value="Dictionary_2"/>-->

<!-- <DictionaryType value="DictionaryType::FileDictionary"/>-->

<!-- &lt;!&ndash; dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def &ndash;&gt;-->

<!-- <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>-->

<!-- <EnumTypeDefFileName value="./enumtype.def"/>-->

<!-- </Dictionary>-->

</DictionaryList>

</DictionaryGroup>

</EmaConfig>

elektronrefinitiv-realtimeelektron-sdkrrtema-apijava
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
Accepted
25k 87 11 23

Hi @badal.vishal

I recall this issue was down to a combination of factors including invalid credentials and also lack of data dictionary files.

With the correct credentials and data dictionary files in the right location, you were able to connect and contribute.

Please confirm if my recollection is correct - if so, accept this post as a correct answer.

Thanks

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
25k 87 11 23

Hi @badal.vishal

Can you please confirm where you downloaded the sample source code from?

I am comparing your above snippet with the EMA Java RCC Contribution tutorial code from here and your code looks quite different in terms of the OMMConsumer initialisation

Looking at the above tutorial, the OMMConsumer creation code is:

OmmConsumer consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().tunnelingKeyStoreFile("KEYSTORE_FILE_NAME")
       .tunnelingKeyStorePasswd("KEYSTORE_PASSWORD"));

and the username + password are not submitted until a StatusMsg is received confirming the tunnel stream is open.

Also, please confirm with your Refinitiv account team that the username and password you are using are RCC specific.

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 @umer.nalla,

Earlier I used that only, but that was throwing same error, so I added these.

Both have same error, and yes, I am using the same sample code.

Please help.

Upvotes
25k 87 11 23

Hi @badal.vishal

Using the original unchanged sample please carry out the Troubleshooting steps detailed at the end of the above tutorial.

First, if you have not already done so, verify the Comodo CA using the keytool command as described.

Then, enable the EMA Java logging and the JDK network logging as described.

Once enabled, please capture the log output to a file and upload the file here as an attachment - removing any private credential information.

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

@umer.nalla Please check the uploaded log, and suggest please.

I used following commands to create keystore and jks :

"c:\Program Files\Java\jdk-11.0.8\bin\keytool.exe" -genkey -alias trcc -keyalg RSA -keystore trcc -storepass yourpassword

"c:\Program Files\Java\jdk-11.0.8\bin\keytool.exe" -list -v -keystore trcc -storepass yourpassword

"c:\Program Files\Java\jdk-11.0.8\bin\keytool.exe" -printcert -v -file COMODORSAOrganizationValidationSecureServerCA.crt

"c:\Program Files\Java\jdk-11.0.8\bin\keytool.exe" -import -trustcacerts -alias trccnew -file COMODORSAOrganizationValidationSecureServerCA.crt -keystore trcc -storepass yourpassword

"c:\Program Files\Java\jdk-11.0.8\bin\keytool.exe" -list -v -keystore trcc -storepass yourpassword -alias trccnew




omm consumer error logs.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.

Hello @badal.vishal
We cannot download the "logs.txt" file, could you please enable the network log as described in the Troubleshooting section of the tutorial, and re-upload the file (please remove your personal credential detail from the file first).


Additionally, do you run the application behind a firewall or any VPN?

Upvotes
1 1 2 2

Hi @wasin.waeosri I am running it from my local office machine.

I am reuploading the file if that works.

ServerHello, ClientHello happens, trcc found and then PKIX path building issue.

Snippet from log file :

javax.net.ssl|ERROR|0F|pool-1-thread-1|2021-05-28 12:20:14.104 IST|TransportContext.java:341|Fatal (CERTIFICATE_UNKNOWN): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (

"throwable" : {

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

omm consumer error logs.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
1 1 2 2

Yes please, I can join now as well.

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.