For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 2 2 9

login failed while running the Consumer

Hi Team,

While running the consumer we are facing login failed issues. I would like to know why this is failing and how to resolve this. Could someone please help me on this?


2022-12-05 15:26:48.529 ERROR 21852 --- [           main] c.refinitiv.ema.access.OmmConsumerImpl   : 
loggerMsg
    ClientName: Consumer_1_1
    Severity: Error
    Text:    login failed (timed out after waiting 45000 milliseconds) for us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:14002)
loggerMsgEnd
2022-12-05 15:26:48.542 ERROR 21852 --- [           main] c.refinitiv.reps.ema.consumer.Consumer   :login failed (timed out after waiting 45000 milliseconds) for us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:14002)


#technologyema-apielektron-message-api
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.

<AHS>

This question is investigated by the RDC team as case 11976920. The case status is "Partial Service Restored".

Note: The client's project is still on going.

Hello @Maha Rana Parthap Sing

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
24.6k 54 17 14

Hello @Maha Rana Parthap Sing

I am sorry to hear that you are facing this connection issue.

The "login failed (timed out after waiting 45000 milliseconds) for <Hostname>:<Port>)" error message indicates that the API cannot connect to the RSSL <Hostname> server at <Port> within 45000 milliseconds. It does not relate to the invalid RIC request (the application gets "The record could not be found" in that case).

I am noticed the "http://" in the "login failed (timed out after waiting 45000 milliseconds) for http://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:14002)" second log. Please be informed that you do not need to put "http://"or "https://" to the DNS endpoint when connecting via the RSSL connection.

Please note that when the API connects to RTO (the us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net of the US-EAST 1 zone in your case), the connection is via the public internet, so it may have latency, etc. You can adjust the amount of time (in milliseconds) the provider has to respond with a login refresh message before the API throws this exception via the Consumer's group LoginRequestTimeOut as follows:

loginrequrest-timeout.png

My next point is you may try to connect to RTO endpoints in other regions (EU-WEST, AP-SOUTHEAST) that are closer to your application Region instead. You can set the preferred location via the API Service Discovery feature.

Example via EmaConfig.xml of the Consumer ex113_MP_SessionMgmt example:

<Channel>
    <Name value="Channel_4"/>
    <ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
    <CompressionType value="CompressionType::None"/>
    <GuaranteedOutputBuffers value="5000"/>
    <!-- EMA discovers a host and a port from RDP service discovery for the specified location when both of them are not set and the session management is enable. -->
        
    <Location value="ap-southeast-1"/>
    <EnableSessionManagement value="1"/>
    <ObjectName value=""/>
</Channel>

Or check the onSuccess() method of the Consumer ex450_MP_QueryServiceDiscovery example to see how to query the preferred location manually.

### Is there a limit to how many existing connections are allowed for a user? ###

I highly recommend you reach out to your Refinitiv representative to get multiple Machine-IDs if you want to run multiple applications/sessions. If you use a single Machine ID with multiple sessions, the applications may encounter an error when an access token expires or when the applications attempt to refresh an access token.

### Is it ok to use the example EmaConfig.xml? This may contain all configurations. ###

Please note that the example EmaConfig.xml aims for demonstration purposes only. You may need to adjust or add additional parameters to match your application requirements.

For the RTO RSSL connection, you may check the Channel_4 configuration of the ex113_MP_SessionMgmt example.

Hopes this helps.


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
11 2 2 9

Hi Team,

While running/starting the consumer I am facing the login failed issue.

Sometimes the consumer runs (local), and all of the sudden application goes down (Error text Tunnel Channel Closed) and throws login failed error over the console.

After deploying in our AWS cloud it is continuously failing. I am unable to understand in which scenario it is failing.

1. Is it due to invalid RIC?

2. is it due to improper connections closing/termination?

3. Is there a limit to how many existing connections are allowed for a user?

4. Is it ok to use the example EmaConfig.xml. This may contain all configuration.

2022-12-12 16:54:33.893 ERROR 30288 --- [ main] c.refinitiv.reps.ema.consumer.Consumer : Error stack :Exception Type='OmmInvalidUsageExcepti
on', Text='login failed (timed out after waiting 45000 milliseconds) for http://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:14002)', Error Code='-4
052'


Details:

Query Type: Technical
Operating System: Windows
Compiler: Java & 11
Product Load: EMA Version 3.6.6.0

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.6k 54 17 14

Hello @Maha Rana Parthap Sing

If the above adjustments do not help and you still encountering the RTO connection issues, I highly recommend you contact the RTO support team to verify the connection issue. You can contact the RTO support team directly via the https://my.refinitiv.com/content/mytr/en/helpandsupport.html website.

rrto-ticket.png

Additionally, if you need more investigation detail on the API side, I highly recommend you or the client submit the issue to the RDC support team to investigate this API issue in more detail. The RDC is the dedicated Real-Time API support team with SLA, and email-based support. If the client is RDC named user, the client can submit a ticket to the RDC team directly via the “Contact premium support” button on the RTSDK Java (or C/C++) pages like https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java. The client can contact the RDC Administrator team (rdc.administrator@lseg.com) about the RDC member registration process.

rtsdk-contact-support.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
3 0 1 5

Hello @Maha Rana Parthap Sing and team, did you manage to resolve teh problem?

I am facing the same issue when connecting to RTO using EMA, below is my code:


        Map elementMap = EmaFactory.createMap();
        ElementList elementList = EmaFactory.createElementList();
        ElementList innerElementList = EmaFactory.createElementList();

        innerElementList.add(EmaFactory.createElementEntry().ascii("Channel", "Channel_1"));
        elementMap.add(EmaFactory.createMapEntry().keyAscii("Consumer_1", MapEntry.MapAction.ADD, innerElementList));
        innerElementList.clear();

        elementList.add(EmaFactory.createElementEntry().map("ConsumerList", elementMap));
        elementMap.clear();

        Map configDb = EmaFactory.createMap();
        configDb.add(EmaFactory.createMapEntry().keyAscii("ConsumerGroup", MapEntry.MapAction.ADD, elementList));
        elementList.clear();

        innerElementList.add(EmaFactory.createElementEntry().ascii("ChannelType", "ChannelType::RSSL_WEBSOCKET"));


// discoveryClient is of ServiceEndpointDiscoveryClient type implementing onSuccess()
// This client was registered using the same clientId & secret as bellow and the endpoint 
// was successfully discovered
        innerElementList.add(EmaFactory.createElementEntry().ascii("Host", discoveryClient.getHost()));
        innerElementList.add(EmaFactory.createElementEntry().ascii("Port", discoveryClient.getPort()));
        innerElementList.add(EmaFactory.createElementEntry().intValue("EnableSessionManagement", 1));

        elementMap.add(EmaFactory.createMapEntry().keyAscii("Channel_1", MapEntry.MapAction.ADD, innerElementList));
        innerElementList.clear();

        elementList.add(EmaFactory.createElementEntry().map("ChannelList", elementMap));
        elementMap.clear();

        configDb.add(EmaFactory.createMapEntry().keyAscii("ChannelGroup", MapEntry.MapAction.ADD, elementList));
        elementList.clear();

        try {
            OmmConsumerConfig subscriptionConfig = EmaFactory.createOmmConsumerConfig();

// And finally create the consummer
            OmmConsumer subscriptionRTOConsumer = EmaFactory.createOmmConsumer(subscriptionConfig.consumerName("Consumer_1")
                    .clientId(XXXX)
                    .clientSecret(XXXXXXX)
                    .tokenServiceUrlV2("api.refinitiv.com/auth/oauth2/v2/token")
                    .config(configDb));


On the consumer creation, I have many login retry errors like this:

2023-12-20 13:19:17:566 ERROR main access.OmmConsumerImpl:675 - loggerMsg
    ClientName: ChannelCallbackClient
    Severity: Error
    Text:    Received ChannelDown event on channel Channel_1
    Instance Name Consumer_1_1
    RsslReactor @2dca0d64
    RsslChannel @7b84fcf8
    Error Id 0
    Internal sysError 0
    Error Location Reactor.processWorkerEvent
    Error text Error - exceeded initialization timeout (5 s)
loggerMsgEnd


And the final error:

2023-12-20 13:26:17:798 ERROR main refinitiv.RefinitivRTOSource:189 - Cannot start connector for client Id [XXXXX], invalid usage: login failed (timed out after waiting 45000 milliseconds) for eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443)


Any help would be appreciated,

Many thanks


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.