Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by hj · Jan 21, 2021 at 09:19 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api

Login Denied:Failed to validate sso token

Hello, we found that there was disconnection when we used EMA to get dynamic data. The error report is as follows. What's the problem? thank you



һÔÂ 21, 2021 12:02:57 ÉÏÎç com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback

¾¯¸æ: loggerMsg

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received Channel warning event on channel Channel_1

Instance Name Consumer_1_2

RsslReactor @50e3bf38

RsslChannel @5af32797

Error Id 0

Internal sysError 0

Error Location Reactor.processWorkerEvent

Error text Failed REST request for the token service from HTTP status code 400 for user: xxxxx. Text: {"error":"invalid_grant"}

loggerMsgEnd




һÔÂ 20, 2021 11:04:30 ÏÂÎç com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback

¾¯¸æ: loggerMsg

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_1

RsslReactor @5ea7d158

RsslChannel @10f6165f

Error Id 0

Internal sysError 0

Error Location Reactor.processWorkerEvent

Error text Ping error for channel: Lost contact with connection...

loggerMsgEnd




һÔÂ 20, 2021 11:04:30 ÏÂÎç com.refinitiv.ema.access.LoginCallbackClient rdmLoginMsgCallback

¾¯¸æ: loggerMsg

ClientName: LoginCallbackClient

Severity: Warning

Text: RDMLogin stream state was changed to suspect with status message

username <not set>

usernameType <not set>


State: Open/Suspect/None - text: ""

loggerMsgEnd



2021-01-20 23:04:31,848 Timer-0 [monitorLogger(36)]-[INFO] | Monitor2021-01-20 23:04:31[]

һÔÂ 20, 2021 11:04:36 ÏÂÎç com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback

ÐÅϢ: loggerMsg

ClientName: ChannelCallbackClient

Severity: Info

Text: Received ChannelUp event on channel Channel_1

Instance Name Consumer_1_2

Component Version ads3.4.2.L1.linux.tis.rrg 64-bit

loggerMsgEnd



һÔÂ 20, 2021 11:04:36 ÏÂÎç com.refinitiv.ema.access.LoginCallbackClient rdmLoginMsgCallback

ÑÏÖØ: loggerMsg

ClientName: LoginCallbackClient

Severity: Error

Text: RDMLogin stream was closed with status message

username xxxxxxxxxxxxx

usernameType 1


State: Closed/Suspect/Internal error from sender - text: "Login Denied:Failed to validate sso token"

loggerMsgEnd

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

6 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.w · Jan 22, 2021 at 06:58 AM

Hello @zzuwhj @Xiaorong.Xu

The "Error text Failed REST request for the token service from HTTP status code 400 for user: xxxxx. Text: {"error":"invalid_grant"} " error message indicates that the API cannot gets OAuth grant credentials from the RDP Auth service server.

How often the application occurs? Did the issue occur when the application tries to connect to the server for the "first time" or after it runs for a while?

I can't replicate the issue with the latest version of RTSDK 2.0/EMA Java 3.6.0 in my environment. I have run the ex450_MP_QueryServiceDiscovery example for a while and the API can run and get tokens successfully.

Could you please enable the API log to turn on the HTTP REST messages between the API and the server? You can enable it by setting the logging.properties file (the file is available at <RTSDK-2.0.0.L1 package>\Java\Ema\Core\src\main\resources folder) with the following pattern

.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=<absolute path to your log file location>//ema.log
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

Then run the application with the JVM argument -Djava.util.logging.config.file points to the logging.properties file

Example:

-Djava.util.logging.config.file=C:\drive_d\Project\APIs\EMA_Code\EMA_Java_200_Maven\src\main\resources\logging.properties

Please note that you can set the following properties on logging.properties file for the log file roll-over:

  • java.util.logging.FileHandler.limit=the maximum number of bytes to write to any one file
  • java.util.logging.FileHandler.count= the number of files to use
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by wasin.w · Jan 21, 2021 at 10:21 AM

Hello @zzuwhj

The "Error text Failed REST request for the token service from HTTP status code 400 for user: xxxxx. Text: {"error":"invalid_grant"} " error message seems to relate to the API couldn't get the Authentication. I am assuming that you are connecting to the Refinitiv Real-Time Optimized (ERT in Cloud) connection?

  • Could you please let me known the EMA/RTSDK version and edition (Java or C++)?
  • Can you replicate the issue with EMA ex450_MP_QueryServiceDiscovery example?
Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
hj · Jan 21, 2021 at 12:18 PM 0
Share

yes,We use the connecting to the Refinitiv Real-Time Optimized (ERT in Cloud) connection


  •     
                         
    1. The development language is Java 
  •     
                         
    1. EMA/RTSDK version  is <refinitiv.version>3.6.0.0</refinitiv.version>


avatar image
hj · Jan 21, 2021 at 12:19 PM 0
Share

@wasin.waeosri Thank you for your answer. Next, what aspects of analysis and troubleshooting do we need

avatar image
REFINITIV
Xiaorong · Jan 22, 2021 at 06:30 AM 0
Share

Hi Wasin

Thank you for your help. After discussing with client, I would confirm the error message popped out when client api is ready for receiving dynamic messages, e.g. updates. The method was consumer.registerClient(EmaFactory.createReqMsg().serviceName("ELEKTRON_DD").payload(elementList), dynamicDataCallback);

With regard to replicating with EMA ex450_MP_QueryServiceDiscovery. I am working with client.

In the meantime could you please advise the cause and how to avoid it? Thank you.

avatar image
Answer by hj · Jan 21, 2021 at 10:51 AM

yes,We use the connecting to the Refinitiv Real-Time Optimized (ERT in Cloud) connection


  • The development language is Java 
  • EMA/RTSDK version  is   <refinitiv.version>3.6.0.0</refinitiv.version>


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by hj · Jan 22, 2021 at 07:51 AM

@wasin.waeosri

Thank you for your reply

The issue occur when the application tries to connect to the server after it runs for a while.

we use the ex450_MP_QueryServiceDiscovery example:


ElementList batch = EmaFactory.createElementList();

        OmmArray array = EmaFactory.createOmmArray();

//        subscribe all

        int num = stocksSize;

        Iterator<String> codeIterator = USDataCenter.getInstance().getRicCodes();

        while (codeIterator.hasNext()) {

            try {

                array.add(EmaFactory.createOmmArrayEntry().ascii(codeIterator.next()));

                num--;

                if (num % 1000 == 0) {

                    batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));

                    cloudClient.getDyncStock(batch);

                    array.clear();

                    batch.clear();

                }

            } catch (Exception e) {

            }

        }

we enable the API log but can't find log file。


  • you can't replicate the issue with the latest version of RTSDK 2.0/EMA Java 3.6.0 in my environment. Are you subscribing to one stock or to all paged stocks?
  • I wonder if every subscription will be authenticated?
  • We are binding in /etc/hosts api.refinitiv.com 75.2.0.254 99.83.242.11, is that a problem?
  • Is disconnection related to the number of times we subscribe or the network?
  • Will disconnection of subscription reconnect?


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by wasin.w · Jan 22, 2021 at 08:29 AM

Hello @zzuwhj

Could you please share your logging.properties file and your -Djava.util.logging.config.file command?

The authentication to api.refinitiv.com (for RDP Auth service) is for the Login stream only, not item streams. Basically, the authentication flow is the following:

  1. The application/API sends Token service request message with Machine ID, Password, and Client Id (aka App Key) to the RDP Auth service
  2. RDP Auth service returns Access Token, Refresh Token, and Expire information (5 minutes) to the application
  3. The API then connects to the Refinitiv Real-Time Optimized server on AWS with Access Token in the OMM Login request message.
  4. The Access Token always expires every 5 minutes
  5. So before Access Token expires, the API sends the Refresh Token to the RDP Auth service to get a new Access Token
  6. Once the API receives the new Access Token, the API re-send OMM Login request message to the Refinitiv Real-Time Optimized server to extend the connection.
  7. Looping steps (4) to (6)

The API REST log file will let us check whether the "error":"invalid_grant" error message is returned from which Token request message.

Additonally, you may contact The Refinitiv Real-Time Optimized team to verify this RDP response error message via my.refinitiv.com website. Please choose "Refinitiv Real-Time - Optimize" Product and you may need to provide your Machine ID detail.



ahs-myrefinitiv.png (17.5 KiB)
Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Xiaorong · Feb 27, 2021 at 01:34 AM 0
Share

Dear Waeosri, thank you for your help. Could you please specify how client can find or generate the files you asked earlier?

  • logging.properties file
  • -Djava.util.logging.config.file command?
  • API REST log file

Thank you

avatar image
REFINITIV
wasin.w ♦♦ Xiaorong · Mar 01, 2021 at 03:35 AM 0
Share

Hello @Xiaorong.Xu

The client can find the example logging.properties file from the following locations:

  • SDK package: RTSDK-2.0.0.L1.java.rrg\Java\Ema\Core\src\main\resources folder
  • GitHub: https://github.com/Refinitiv/Real-Time-SDK/tree/master/Java/Ema/Core/src/main/resources

Please note that the logging.properties is the Java Logging API configuration file. The client can find more detail about the configuration file from Oracle or any Java resources.

avatar image
Answer by hj · Jan 22, 2021 at 09:28 AM

thx

We want to know more

Are we using a consumer client to subscribe to multiple US stock markets at the same time?

Or can multiple consumerclients be used for subscription?

thank you!

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
wasin.w ♦♦ · Mar 02, 2021 at 10:04 AM 0
Share

Hello @zzuwhj

Sorry for the late reply. Yes, you can use a single consumer client to consume multiple items from various markets. You can use the API Batch feature to send multiple items in a single request message, please see more detail on the EMA Java Example ex370_MP_Batch in the SDK package.

Please note that the Machine-ID supports 5 concurrent connections.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

EMA CPP - Exception adding ric into OmmArray

(JAVA) Does using interestAfterRefresh(false) remove the need for deregistering items with Elektron?

Login Domain - Components and Elements in Login responses

About "NODATA" in emaj

Error: Login Stream closed with msg : Text: Received ChannelUp event on channel Channel_1 Instance Name Consumer_1_1 Component Version upa7.6.0.L1.win.rrg 64-bit Static

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges