Websocket error while ReceiveAsync() System.AggregateException
I am working on application using websocket to fetch data from ERT cloud.
While receiving data from websocket, I am getting System.AggregateException.
and innerException message "An internal WebSocket error occurred. Please see the innerException, if present, for more details".
I even tried samples provided in named "MarketPriceEdpGwAuthenticationExample". I get similar error also while I run given example also.
Any help would be greatly appreciated
please find attached file containing stacktrace.
Best Answer
-
Hi @cbhavsar
As well as raising the ticket, you should also amend your program to attempt a fresh authenticate,reconnect and login automatically when the websocket is closed off.
The examples we provide are basic ones for demo purposes only and therefore do not include the above type of behaviour - which should be added to production implementations.
Obviously, this does not mean that you won't necessarily lose any updates - but it can potentially avoid manual intervention.
0
Answers
-
Hi @cbhavsar
Please provide more details on when you see this error so we can assist.
Does it happen every time you run the example?
Are you able to get any data successfully at all?
At what point in the example run process does the error occur? e.g. before or after the GetAuthenticationInfo, before or after the ConnectAsync, before after a ReceiveMessage?
Please provide console output (remove any secure information) also.
0 -
Hi Umer-
Please find addition details as below.
Does it happen every time you run the example?
>>Nope. I come occasionally like once or twice in hours.
Are you able to get any data successfully at all?
>>Yes, we get data if do not get this exception. if we try to reconnect then it starts working fine
but we lose valuable updates in between disconnect and connect.
At what point in the example run process does the error occur? e.g. before or after the GetAuthenticationInfo, before or after the ConnectAsync, before after a ReceiveMessage?
>>before after a ReceiveMessage?
Please provide console output (remove any secure information) also.
>> I will send console output once I get error next time. I have lost it for last run,
Please see if stack trace helps in the attachments if that helps in the meantime,
0 -
Hi @cbhavsar
I am assuming you are sending Ping / Pong response in a timely manner and refreshing the tokens - which I expect is the case if problem occurs after 1-2 hrs of runtime.
Also, I can see in the stack trace:
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Therefore, you should raise a Ticket with the ERT in Cloud team - providing details of times when the exceptions occurred and including the stack trace.
The team has access to the ERTiC systems and can assist you with diagnostics.
Make sure you mention that the problem also occurs with the Refintiv supplied example MarketPriceEdpGwAuthenticationExample.
0 -
Ok. I will raise ticket with support.
Thanks for the help Umer
0 -
Yes, In my application I do reconnect, send login and request items. but I wanted to check if my application is having the issue. I ran sample application and tested and I got same error in sample application as well. so I am not sure what is the reason for this error.
0 -
Based on the stack trace I am hoping the answer lies with the ERT in Cloud team - hopefully, they will provide some answers...
0 -
Hi Umer- Thanks for help.
I need help on one more thing..
data that I receive some times contains ??? chars.
do you how can I fix it to display correct values
0 -
Hi @cbhavsar
I can see you have raised a separate question for this at https://community.developers.refinitiv.com/questions/59486/websocket-receive-some-characters-as.html
0 -
yes, I have. Thnx
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
- 370 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 中文论坛