question

Upvotes
Accepted
39 1 0 5

Contributor does not work

I have downloaded the Contributor example and followed the tutorial to the letter but don't seem to be able to create an OmmConsumer. When I run it, I get the following output:


Contributing to Refinitiv Contributions Channel

Starting encrypted connection...

May 17, 2022 4:32:09 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback

WARNING: loggerMsg

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_1

RsslReactor @1ef6d34c

RsslChannel @1ecee32c

Error Id 0

Internal sysError 0

Error Location Reactor.processWorkerEvent

Error text Error initializing channel: errorId=-1 text=General SSLEngine problem

loggerMsgEnd

I have set the RCC_HOST_NAME to contrib-ws1-emea1.uat.platform.refinitiv.com and the port to 443 and have created the keystore as specified.

Can anyone give me any ideas as to what might be wrong?

Thanks!

javasample-code
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 @JasonS,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.


Thanks,

AHS


Upvotes
Accepted
79.2k 251 52 74

@JasonS

According to the error message, it could be a certificate issue.

If you are using EMA Java 3.5.1.L1 or above, the application doesn't need to specify a key store file in the code.

Both ETA Java and EMA Java 3.5.1.L1 Issues Resolved
- [RTSDK-3866] - RTSDKJ Client Side Encryption: Set default Certificate Authority keystore location in Java so a jks file isn't required

You can modify the code, as shown below.

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

Moreover, this endpoint (contrib-ws1-emea1.uat.platform.refinitiv.com) is for WebSocket connections. EMA supports WebSocket connections but you need to specify it via the EncryptedProtocolType configuration, as shown below.

<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"/>
            <EncryptedProtocolType value="EncryptedProtocolType::RSSL_WEBSOCKET"/>
            <!-- TcpNodelay is optional: defaulted to 1 -->
            <!-- possible values: 1 (tcp_nodelay option set), 0 (tcp_nodelay not set) -->
            <TcpNodelay value="1"/>
            <Host value="contrib-ws1-emea1.uat.platform.refinitiv.com"/>
            <Port value="443"/>
        </Channel>

Otherwise, if you would like to use the socket connection, you need to use this endpoint contrib1-emea1.uat.platform.refinitiv.com instead.

        <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.uat.platform.refinitiv.com"/>
            <Port value="443"/>
        </Channel>
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
24.7k 54 17 14

Hello @JasonS

It seems the API cannot establish the connection from your application machine to the RCC host. Can you connect to other endpoints? Please give us more detail about your application environment.

  • Are you using RTSDK Java or C/C++ edition?
  • The version of RTSDK
  • The OS and compiler information

If you are using EMA C++, please enable the API tracing log when the problem occurs with the XmlTraceToFile parameter in the EmaConfig.xml file

<Consumer>
            <Name value="Consumer_1"/>
           ...
            <XmlTraceToFile value="1"/>
</Consumer>

If you are using EMA Java, you can enable the API tracing log when the problem occurs with the following steps:

Firstly, set the XmlTraceToStdout parameter in the EmaConfig.xml file

<Consumer>
            <Name value="Consumer_1"/>
            ....
            <XmlTraceToStdout value="1"/>
</Consumer>

Next, create a file named "logging.properties" with the following content:

.level=FINEST
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level=FINEST
java.util.logging.FileHandler.pattern=./emaj.log <-- Update file path to match your env
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
# Format timestamp as date/time with millisecond
java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL %4$-7s %2$s %n%5$s

Finally, run the application with the following JVM argument.

-Djava.util.logging.config.file=<your paht>/logging.properties
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.

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.