question

Upvotes
Accepted
3 1 0 2

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>
elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apiconnectiontutorial
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
22.7k 59 14 21

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.

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.

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.

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

@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?

Upvotes
22.7k 59 14 21

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

Are you getting rdmLoginMsgCallback message from EMA?

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.

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?

Upvotes
22.7k 59 14 21

@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.

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.

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.)

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.