Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by linmao.song · Sep 17, 2018 at 08:03 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiconnectiontutorial

Connection reset with data contribution tutorial code

I have been following this tutorial: https://developers.thomsonreuters.com/elektron/elektron-sdk-java/learning?content=41885&type=learning_material_item

The code (see below) is essentially a copy from the tutorial. When the code is run, the error below is returned:

Sep 17, 2018 12:43:53 PM com.thomsonreuters.ema.access.ChannelCallbackClient reactorChannelEventCallback
WARNING: loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel Channel_10
	RsslReactor Channel is null
	Error Id 0
	Internal sysError 0
	Error Location Reactor.processWorkerEvent
	Error text Error initializing channel: errorId=0 text=null
loggerMsgEnd

I tried to diagnose with Wireshark, which shows the connection fails at the TCP level: the server (port 443) actively sends RST.

My first suspicion is firewall rules on the TRCC end. However, after the first RST, it looks like the rest of the connection attempts were ended locally (e.g. from port 63248). So I wonder if it's a coding issue.

The code I am using is as follows.

OmmConsumer consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().tunnelingKeyStoreFile(<keystore-file-name>).tunnelingKeyStorePasswd(<keystore-passwd>));

ClassOfService cos = EmaFactory.createClassOfService().authentication(EmaFactory.createCosAuthentication().type(CosAuthentication.CosAuthenticationType.OMM_LOGIN)).dataIntegrity(EmaFactory.createCosDataIntegrity().type(CosDataIntegrity.CosDataIntegrityType.RELIABLE)).flowControl(EmaFactory.createCosFlowControl().type(CosFlowControl.CosFlowControlType.BIDIRECTIONAL).recvWindowSize(1200)).guarantee(EmaFactory.createCosGuarantee().type(CosGuarantee.CosGuaranteeType.NONE));

TunnelStreamRequest tsr = EmaFactory.createTunnelStreamRequest()
			    .classOfService(cos)
			    .domainType(EmaRdm.MMT_SYSTEM)
			    .name("TUNNEL1")
			    .serviceName("TEST_SERVICE");


basicConsumer appClient = new basicConsumer();
long tunnelStreamHandle = consumer.registerClient(tsr, appClient );	

The channel config in the EmaConfig.xml is as follows.

<ChannelGroup>
    <ChannelList>
        <Channel>
            <Name value="Channel_10"/>
            <ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
            <GuaranteedOutputBuffers value="5000"/>
            <ConnectionPingTimeout value="30000"/>
            <TcpNodelay value="1"/>
            <Host value="chp02-emea2.thomsonreuters.com"/>
            <Port value="443"/>
        </Channel>
    </ChannelList>
</ChannelGroup>
ema-example-connection-reset.jpg (252.3 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · Sep 17, 2018 at 09:53 AM

Hi @linmao.song I would recommend that you turn on the JDK network debugging (-Djavax.net.debug=all) to see the reset cause. Also can you verify that DigiCert CA is trusted in your environment.

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
linmao.song · Sep 17, 2018 at 10:50 AM 0
Share

Thanks @Gurpreet. The debug flag helped. It turned out to be two issues:

createOmmConsumerConfig().tunnelingKeyStoreFile(<keystore-file-name>)

The specified keystone file couldn't be found. Possibly the relative-path didn't match the code's execution path. Changed to absolute path for now and it seems to work

Second issue: DigiCert's CA wasn't in trust. The TLS negotiation now seems to work after trusting it.

avatar image
linmao.song · Sep 17, 2018 at 11:36 AM 0
Share

A follow-up question. After the connection is established, There doesn't appear to be a "status" message.

The logger does show an event "ChannelUp"

Sep 17, 2018 4:27:46 PM com.thomsonreuters.ema.access.ChannelCallbackClient reactorChannelEventCallback
INFO: loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Info
    Text:    Received ChannelUp event on channel Channel_10
	Instance Name Consumer_1_1
	Component Version eta3.1.1.L1.linux.rrg 64-bit Static
loggerMsgEnd

However, apart from this, there isn't other interactions. As a result, the login never happens.

Any ideas how to diagnose

avatar image
linmao.song linmao.song · Sep 17, 2018 at 12:30 PM 0
Share

@Gurpreet. regarding the above login issue, I have just tried the C++ version https://developers.thomsonreuters.com/elektron/elektron-sdk-cc/learning?content=26452&type=learning_material_item . And the result is the same: no Status message, afterwards, a timeout:

Exception Type='OmmInvalidUsageException', Text='dictionary retrieval failed (timed out after waiting 45000 milliseconds) for '

Any ideas what might be the issue?

avatar image
REFINITIV
Answer by Gurpreet · Sep 17, 2018 at 12:30 PM

You will have to provide complete EMA log, config and whatever code you modified.

Are you getting rdmLoginMsgCallback message from EMA?

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
linmao.song · Sep 17, 2018 at 12:46 PM 0
Share

Code: the only modifications were replacing username/password, keystore location/password.

Logs: happy to provide. The majority is java's SSL dump. Is there a secure/private way to send it to you guys, as the log contains our hostname/address, etc?

avatar image
REFINITIV
Answer by Gurpreet · Sep 17, 2018 at 12:36 PM

@linmao.song The C++ version has to connect to different VIP endpoint based on Windows or Linux version. You should refer to the list of endpoints you received for your account.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
linmao.song · Sep 17, 2018 at 12:42 PM 0
Share

Thanks. Yes, I am connecting to a Linux endpoint, from the Wireshark capture, the TLS negotiation looks good (e.g., I can see the handshake, changecipher, appdata, etc.)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

[EMA Java] How to receive connection level events such as a disconnection?

Login Domain - Components and Elements in Login responses

Monitor status of TREP connection

Need to understand few extra details on disconnection issues.

An established connection was aborted by the software in your host machine

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges