question

Upvotes
Accepted
35 5 7 10

Getting -> Error text Error initializing channel: errorId=-1 text=Error occurred during connection process. Can you please help me

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apierror-login
icon clock
10 |1500

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

Upvotes
Accepted
11.5k 16 7 10

Hi @Chaitanya.Vishnubhotla

The error

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 

at java.util.ArrayList.rangeCheck(Unknown Source) 

at java.util.ArrayList.get(Unknown Source)

that you encounter is similar to the problem in this How to connect to TREP using EMA topic. The problem occurs when you connect the EMA API to the ADS older versions that does not provide component version to the API. After EMA connects to older version of TREP, it tries to get TREP component version. If it fails, the exception is thrown.

What is the ADS version that you are using?

If your ADS version is 2.2 or older, they are already end of life and no longer supported, I suggest you upgrade to ADS 3.0 which is a latest version.

icon clock
10 |1500

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

Hi @Wasin Waeosri

Thanks for advice. I reached the MDS team and got the updated servers versions and now I am able to connect to servers.

Upvotes
11.5k 16 7 10

Hi @Chaitanya.Vishnubhotla

I can replicate the same message by using a telnet connects to the EMA Java Interactive Provider example 100 (IProvider.java), and then quit a telnet command. The example shows the same log messages

SEVERE: loggerMsg
    ClientName: ServerChannelHandler
    Severity: Warning
    Text:    Received ChannelDown event on client handle 1
	Instance Name Provider_1_1
	RsslReactor Channel is null
	Error Id 0
	Internal sysError 0
	Error Location Reactor.processWorkerEvent
	Error text Error initializing channel: errorId=-1 text=Error occurred during connection process.
loggerMsgEnd

Based on the above log message, the problem seems to happen when the provider application receives a connection from consumer client. What is the consumer application that you are using? Can you re-test by using the EMA Java Consumer example 100 as a consumer client to verify the problem?

icon clock
10 |1500

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

Hi @Wasin Waeosri
I have used the below example

com.thomsonreuters.ema.examples.training.consumer.series100.example100__MarketPrice__Streaming.Consumer.java class (client) to connect to Reuters servers and get the Market pricing data

But I got as below
For server 1:

Error text Error initializing channel: errorId=-1 text=Error occurred during connection process

For server 2:

Error text Error initializing channel: errorId=-1 text=Handshake failed with far end. No more Protocols to try

Please guide me

Upvotes
35 5 7 10

Hi @Wasin Waeosri
I have used the below example

com.thomsonreuters.ema.examples.training.consumer.series100.example100__MarketPrice__Streaming.Consumer.java class (client) to connect to Reuters servers and get the Market pricing data

But I got as below
For server 1:

Error text Error initializing channel: errorId=-1 text=Error occurred during connection process

For server 2:

Error text Error initializing channel: errorId=-1 text=Handshake failed with far end. No more Protocols to try

Please guide me
icon clock
10 |1500

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

Upvotes
11.5k 16 7 10

Hi @Chaitanya.Vishnubhotla

I can replicate the both messages when setting the Consumer example connects to the SSL publisher which is unsupported by the EMA Java. The EMA Java supports the RSSL connection only, I suggest you configure the host to the RSSL port as following example

consumer = EmaFactory.createOmmConsumer(config.host("<ADS IP>:<RSSL Port>").username("user"));

If the problem still persists after you changed the port to the RSSL port, please give us the server details (server IP, Port, snippet of code that set the connection).

icon clock
10 |1500

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

Hi @Wasin Waeosri,


I have used the following code for conection

consumer = EmaFactory.createOmmConsumer(config.host("stprtrsp2p:8101").username("721002"));

or

consumer = EmaFactory.createOmmConsumer(config.host

("rcortrsp2p:8101").username("721002"));
Server detals:

stprtrsp2p

rcortrsp2p

Port details:
8101

Username

721002

Please help me.


Hi @Chaitanya.Vishnubhotla,

Port 8101 is for legacy SSL connection. As Wasin mentioned, EMA only uses RSSL connection, which should be port 14002. Have you tried it yet?

Hi @Steven Peng and @Wasin Waeosri,
I tried with RSSL port 14002 as below:

consumer = EmaFactory.createOmmConsumer(config.host("rcortrsp2p:14002").username("user"));

But I got an exception like this

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.rangeCheck(Unknown Source)

at java.util.ArrayList.get(Unknown Source)

at com.thomsonreuters.ema.access.ChannelCallbackClient.reactorChannelEventCallback(ChannelCallbackClient.java:366)

Show more comments
Click below to post an Idea Post Idea