question

Upvotes
Accepted
1 0 0 2

EMA to connect LPC, and found LPC session logout every 45 seconds

Client using EMA to connect LPC, and found LPC logout every 45 seconds, but code set sleep is 60 seconds. Could you please help review the code if any incorrect input?


OmmConsumer ommConsumer = null;

try {

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig()

.host("xxxx")

.username("xxxx");

ommConsumer = EmaFactory.createOmmConsumer(config);

ommConsumer.registerClient(getPBOCReqMsg(), client);

TimeUnit.SECONDS.sleep(60L);

} catch (InterruptedException e) {

Thread.currentThread().interrupt();

} finally {

if (ommConsumer != null) {

ommConsumer.uninitialize();

}

}

ema-apilpc
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
24.4k 53 17 14

Hello @wangziqi.9425

I agree with @Gurpreet, the issue is LPC disconnects with the RTO server and rejects the consumer API login request message. The "login failed (timed out after waiting 45000 milliseconds) for 10.xxx.xx.xxx:14002)" error status means the API cannot get a Login response message from LPC within 45 seconds, then the OMMConsumer throws an exception.

The default login request timeout is 45000 msec. This is the recommended setting, as in general, if connectivity to infra is available, a connection should be established within 45 sec.

loginrequest-timeout.png


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
21.8k 57 14 21

Hello @Yunqing.Peng,

What is the error message or exception that they get? Can you ask them to try the basic Consumer example that ships with EMA SDK. What happens when the sleep timeout is increased to 500 seconds? It might be easier to get the client to directly ask their findings here.

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.

The client thinks why I set the 60s, but the logout is done at 45s, which is earlier than the time he set.

He used the testclient on LPC to test that the session remains active until the connection is actively disconnected.

Upvotes
32.2k 40 11 19

Hello @Yunqing.Peng

Was LPC installation verified with testclient that came with LPC, using the same user, for >45 sec? No issues observed?

Would this same user be connecting from any other application or LPC instance, at the same time? There should be only one connection per RTO credential, if there is another connecting with the same cred, by any means, that may cause the issue observed.

I am not fully sure why client may wish to connect to LPC with EMA, maybe just for the preliminary testing, after the suggestion from @Gurpreet, if you run basic EMA consumer example, if 60 sec run is not long enough to test, you may wish to modify the example code to run:

//Thread.sleep(60000);
while(true)
    Thread.sleep(1000);    


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.

The client thinks why I set the 60s, but the logout is done at 45s, which is earlier than the time he set.

He used the testclient on LPC to test that the session remains active until the connection is actively disconnected.

This is LPC log:

<n224-090-169.novalocal.1.lpc: Info: Thu Aug 25 07:30:00.071108 2022>

RSSL client login ipcSession.272105 on socket ID: 12 from IP 10.14.244.67.

<END>

<n224-090-169.novalocal.1.lpc: Info: Thu Aug 25 07:30:02.728733 2022>

Standard endpoint found via Service Discovery. Using endpoint address ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net and port 14002.

<END>

<n224-090-169.novalocal.1.lpc: Info: Thu Aug 25 07:30:06.583832 2022>

Successfully connected secure socket 14 secureChannel.262977 to host ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net, component version: ads3.5.4.L1.linux.rrg 64-bit. Secure socket associated with client session ipcSession.272105. Sending Login message.

<END>

<n224-090-169.novalocal.1.lpc: Info: Thu Aug 25 07:30:45.074698 2022>

Logging out client ipcSession.272105 on socket 12 from source 10.14.244.67. Removing secure channel socketId 14. Reason from client: rsslRead() failed with code -1 and system error 11. Text: </local/jenkins/workspace/RRTLPC/OS/OL7-64/esdk/source/esdk/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:669> Error:1002 ipcRead() failure. Connection reset by peer

<END>

As testclient does not get disconnected, a simple example that is running continuously, should stay connected as well. However, let us know how this test works for the client.

Upvotes
21.8k 57 14 21

Hi @Yunqing.Peng,

As shown in the LPC logs

Logging out client ipcSession.272105 on socket 12 from source 10.14.244.67. Removing secure channel socketId 14. Reason from client: rsslRead() failed with code -1 and system error 11. Text: </local/jenkins/workspace/RRTLPC/OS/OL7-64/esdk/source/esdk/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:669> Error:1002 ipcRead() failure. Connection reset by peer

its the client application which is disconnecting and not the other way around. Please have the client try the EMA example linked earlier and report their findings.

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.4k 53 17 14

Hello @Yunqing.Peng

Can you also share more detail about the API and platform that are currently used by the client?

  • The API edition (Java or C/C++)
  • The API version
  • SDK/Compiler version
  • OS
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
1 0 0 0

@Gurpreet @zoya faberov @wasin.w

I am the user Yunqing represented and I just finished my registration today. Thank you for looking into my problem last week. I checked the context of this issue and there is some clarification I'd like to make. First the LPC did not logout every 45 seconds each time I initiated a session, it only occurs occasionally. The application in our system, for the simplest case, will initiate one LCP poll task every 5 minutes, and call the

ommConsumer.uninitialize()

function to exit the session. The problem I encountered is the login failed reported by ema sdk. The error log is as follows:

_process=347 _language=java _msg=loggerMsg

ClientName: EmaConsumer_316

Severity: Error

Text: login failed (timed out after waiting 45000 milliseconds) for 10.xxx.xx.xxx:14002)

loggerMsgEnd

The error occurs about 3-4 times an hour. Considering there are only 12 times total in an hour, the number is unacceptable.

Last week I tried the LPC test client, the process I started last about 25 minutes before the connection got lost. According to Yunqing, it was the network failure between the LPC and the aws in Singapore that leads to the disconnection.

The information required by @wasin.w is as follows:

  • The API edition (Java or C/C++): Java
  • The API version: Is this the same as the sdk version?
  • SDK version: ema-3.6.2.0
  • OS: CentOS Linux release 7.6.1810 (Core)


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
21.8k 57 14 21

Hello @wangziqi.9425,

It seems like you have already identified the issue - LPC is loosing connection to the RTO servers in AWS. This however is an exception condition rather then norm. Are you still experiencing this issue?

What is causing the network loss. What do you see in the LPC logs when the connection is lost?

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.