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"/>-->
<!-- <!– dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def –>-->
<!-- <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>-->
<!-- <EnumTypeDefFileName value="./enumtype.def"/>-->
<!-- </Dictionary>-->
</DictionaryList>
</DictionaryGroup>
</EmaConfig>
Best Answer
-
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
0
Answers
-
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.
0 -
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.
0 -
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.
0 -
@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
0 -
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?
0 -
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
0 -
Yes please, I can join now as well.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛