question

Upvote
Accepted
18 0 0 4

Unable to connect to RCC channel using EMA Consumer

1. Using EMA as gradle dependency

implementation group: 'com.refinitiv.ema', name: 'ema', version: '3.6.6.0'

Java 17, Windows 10

2. I used example from https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java/tutorials#ema-consumer-posting-data-to-contribution-channel
Stuck on Establish an encrypted connection to the server step. Keep getting error:

Error text Tunnel Channel Closed

Here is my EmaConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>
</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"/>
<Host value="contrib1-emea1.uat.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>

Here is my source code:

public class ContributorTest {
    public static void main(String[] args) {

        try {
            System.setProperty("java.util.logging.config.file", "src/main/resources/logging.properties");

            System.out.println("Contributing to Refinitiv Contributions Channel");

            System.out.println("Starting encrypted connection...");
            // Create an OMM consumer
            OmmConsumer consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig()); <------ error here 
.....
        } catch (Exception excp) {
            System.out.println(excp.getMessage());
        }
    }
}


I followed pre-requirements:
- copied the RDMFieldDictionary and enumtype.def from EMA /etc directory.
- added the Comodo certificate authority to the keystore (the default Certificate Authority Keystore location in the Java directory)

Here is output logs:

Contributing to Refinitiv Contributions Channel
Starting encrypted connection...
2022-09-28 16:16:19.996 WARNING com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback 
loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel Channel_1
RsslReactor @58ce9668
RsslChannel @172b013
Error Id 0
Internal sysError 0
Error Location null
Error text Tunnel Channel Closed
loggerMsgEnd


elektronrrtema-apijavarefinitiv-realtime-sdkconsumerrccchanneltunnel-stream
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.

Upvote
Accepted
52.9k 136 44 63

@ihor.kiulian

Sorry for the issue you are facing, let me see if I can help you in resolving this.

Please add the following configuration (EncryptedProtocolType) to the RCC channel.

<ChannelGroup>
    <ChannelList>
        <Channel>
            <Name value="Channel_1"/>
            <ChannelType value="ChannelType::RSSL_ENCRYPTED"/>           
            <CompressionType value="CompressionType::None"/>
            <GuaranteedOutputBuffers value="5000"/>           
            <ConnectionPingTimeout value="30000"/>
            <EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>           
            <TcpNodelay value="1"/>           
            <Host value="contrib1-emea1.uat.platform.refinitiv.com"/>
            <Port value="443"/>
        </Channel>
    </ChannelList>
</ChannelGroup>

I hope that this information is of help

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.

it worked for me, thanks
Upvotes
16.7k 42 12 19

Hi @ihor.kiulian,

I am unable to connect to either of the UAT environments using the SDK either. Seems like those endpoints are down.

I have tried the websocket endpoint and they are working. Here is an article on how to use websockets to contribute.

I will check up with product team and find out the status of UAT endpoints.

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
16.8k 31 9 12

Hello @ihor.kiulian

This is not related to the case but the RTSDK Java supports Oracle JDK 8/11, and OpenJDK 8/11 only, not Java 17.
You can check the supported compilers' detail from the API Compatibility Matrix page and RTSDK - Java README file.

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.