when we will get the error as "Login stream was closed" in Elektron EMA API
Answers
-
Hello @Chaitanya.Vishnubhotla
The login stream can be closed if a login user is invalid e.g. there is no the user in the System as example shown below:
The user named Jack is not found in the System so the login stream is closed. To get the valid login user, you should contact Thomson Reuters Account team.
0 -
Hi @Pimchaya.Wongrukun
We are getting a weird behavior as below
i.e., for RHK provider for one RIC code /0489.HK, when we run the Elektron EMA API, we are getting the above
no| 170627| 0352209| RHK| /0489.HK| Login stream was closed.|
no| 170627| 0352209| RHK| /0489.HK| Service not available.|
yes| 170627| 0352209| RHK| /0489.HK| 3.55| 3.5| 3.51| 3.52| 3.57| 3908900.0| 27 JUN 2017| 3.6| 3.49| 0|One time it is saying as Login stream was closed
Other time it is saying as Service not available
Some other time It is giving us the required data,
Can you please let us know what might be the reason?
Note : Let's say if we have a 1000 RIC codes, this strange behavior is with one or two code randomly.rest all of them are giving data perfectly.
0 -
Can you give us the RSSL trace file when the problem occurs? You can enable the trace in EMA Java application by setting XmlTraceToStdout Consumer entry parameter to 1 in EmaConfig.xml located in the application’s run directory. For example:
<Consumer>
Then, EMA traces its received and sent messages in XML format to stdout/console.
<Name value="Consumer_1"/>
...
<XmlTraceToStdout value="1"/>
</Consumer>
The xml trace log can be long so please redirect your application command output to a file as the syntax below:
Java_command_line_runing_your_application > output_file_name0 -
cuserscvishnudesktopreutersconfig.zip
We have runned and made the output to redirect to a file. Please find the attached file.
We have received the status error as "Login stream was closed" response for the RIC code /0762.HK for RHK provider.
Please help us with the problem.
0 -
I have checked the given RSSL trace file and I found the following interested points
- The application requests for snapshot (non-streaming) view data
- The Application seems to set a lifetime to dispatch incoming data from the API for 15 seconds
- The API does not receive /0762.HK data from the backend until it reach the API request timeout
- When it reaches 30 seconds, the application uninitializes the OMMConsumer object which makes the API sends a close request message for the Login stream. The remaining streams will receive "Item State: Closed / Suspect / None / 'Login stream was closed.'" status because the API just closed the login stream
I have tested with the EMA Java Consumer Example 100, the example shows "Item State: Closed / Suspect / None / 'Login stream was closed.'" for the remaining item stream when it calls consumer.uninitialize() function.
To confirms my assumption, please give me the following information:
- The Application log messages/files that generated the same time as the given 859-cuserscvishnudesktopreutersconfig.zip file
- The EMA Java version that encounters the problem
- Your EMA Configuration file
- The code that call Thread.sleep(<time value>) or call OMMConsumer.dispatch function. It will let me check the application dispatch lifetime.
Please see my full investigation detail below
### First /0762.HK request ###
The application sends two request messages for the /0762.HK items. The stream id 55 and 1155. The first stream id 55 was requested on 08:03:19, then the API closed this stream on 08:03:34 without receives any data from the TREP infrastructure.
<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.65.88.56:47644 remote=rcotrep02/10.65.78.42:14002] -->
<!-- Tue Jun 27 08:03:19 EDT 2017 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<REQUEST domainType="MARKET_PRICE" streamId="55" containerType="ELEMENT_LIST" flags="0x442 (HAS_PRIORITY|HAS_QOS|HAS_VIEW)" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 priorityClass="1" priorityCount="1" dataSize="54">
<key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="256" name="/0762.HK"/>
...
<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.65.88.56:47644 remote=rcotrep02/10.65.78.42:14002] -->
<!-- Tue Jun 27 08:03:34 EDT 2017 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<CLOSE domainType="MARKET_PRICE" streamId="55" containerType="NO_DATA" flags="0x00" dataSize="0">
<dataBody>
</dataBody>
</CLOSE>This stream process takes 15 seconds, which is the default API item request timeout (EmaConfig.xml's RequestTimeout). It shows that the API does not receive /0762.HK data from the backend until the API reaches item request timeout limit. To confirm my assumption, is there any "Request Timeout" status or log messages?
### Second /0762.HK request ###
The application sends the second /0762.HK (stream id 1155) on 08:03:34, which is 15 seconds after the API connects to the TREP.
<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.65.88.56:47644 remote=rcotrep02/10.65.78.42:14002] -->
<!-- Tue Jun 27 08:03:16 EDT 2017 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<REQUEST domainType="LOGIN" streamId="1" containerType="NO_DATA" flags="0x04 (STREAMING)" dataSize="0">
...
<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.65.88.56:47644 remote=rcotrep02/10.65.78.42:14002] -->
<!-- Tue Jun 27 08:03:34 EDT 2017 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<REQUEST domainType="MARKET_PRICE" streamId="1155" containerType="ELEMENT_LIST" flags="0x442 (HAS_PRIORITY|HAS_QOS|HAS_VIEW)" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 priorityClass="1" priorityCount="1" dataSize="54">
<key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="256" name="/0762.HK"/>
...
<!-- Outgoing Reactor message -->
<!-- java.nio.channels.SocketChannel[connected local=/10.65.88.56:47644 remote=rcotrep02/10.65.78.42:14002] -->
<!-- Tue Jun 27 08:03:34 EDT 2017 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<CLOSE domainType="LOGIN" streamId="1" containerType="NO_DATA" flags="0x00" dataSize="0"> <--- The application calls consumer.uninitialize(); statement
<dataBody>
</dataBody>
</CLOSE>
//<--- The "Item State: Closed / Suspect / None / 'Login stream was closed.'" status message for /0762.HK should be printed during this time
...The above log messages mean the application reach a lifetime 15 seconds for dispatching incoming data, so it calls consumer.uninitialize(); statement to close a connection by closing the Login stream. But the newly request /0762.HK does not receive data from the TREP yet, so the item stream is remaining alive and gets "Login stream was closed." message.
0 -
cuserscvishnudesktopemaconfig.zip
Hi @Wasin Waeosri
I don't have the log file for that particular run of request, but I can provide the remaining things which you have asked.
Java Version: Elektron-SDK1.1.0.java_0
Dispatch method: consumer.dispatch(10);Config file: Attached above.
Thanks
Chaitanya V V R V
0 -
I will check the given config file, could you please give me application source code and the code that controls the consumer.dispatch statement? I want to check the lifetime of the application.
example:
while (startTime + 60000 > System.currentTimeMillis())
consumer.dispatch(10);0 -
Hi @Wasim Waeosri
FYI:
The controlling code will be as follows
while (appClient.getStatus(true)){
consumer.dispatch(10); // calls to onRefreshMsg(), onUpdateMsg(), or onStatusMsg() execute on this thread
}
where the getStatus method will return true until all the RIC codes are processed by Elektron API, once done it will return false.
0 -
Update: The client confirms the error has occurred due to circuit level
problems with the Servers. The client's infrastructure team suggest the application switch back to the old server.0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛