A connection attempt failed because the connected party did not properly respond after a period of t
Hi there,
Any one has experienced 'a connection attempt ...' exceptions calling https://hosted.datascopeapi.reuters.com/RestApi/v1/ api from Azure Function (Premium plan). The api calls experiencing this issue are particularly ExtractWithNotes and ValidateIdentifiers using Refinitiv Rest Api Client Dlls ?
I was advice that this is to do with packet drops/blocks from Refinitiv security device at TCP level. Could you share what changes on Azure function application and/or cloud settings to help preventing this issue?
Exception detail
---------------------
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.Exception stack trace : ThomsonReuters.Dss.Api.TransportException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
Best Answer
-
I have tested with the simple function with DSS API and it works fine.
I use the ElektronTimeseriesExtractionRequest.
var extractionRequest = new ElektronTimeseriesExtractionRequest()
{
IdentifierList = new InstrumentIdentifierList()
{
InstrumentIdentifiers = new[] { new InstrumentIdentifier { Identifier = "IBM.N", IdentifierType = IdentifierType.Ric } }
},
Condition = new ElektronTimeseriesCondition
{
ReportDateRangeType = ReportDateRangeType.Range,
QueryStartDate = new DateTimeOffset(new DateTime(1990, 1, 1)),
QueryEndDate = new DateTimeOffset(new DateTime(2020, 9, 20)),
LastEntityOnly = false
},
ContentFieldNames = new[]{
"Ask", "Bid", "High", "Last", "Low", "Trade Date"
},
};
var extractionResult = ExtractionsContext.ExtractWithNotes(extractionRequest);
var extractedRows = extractionResult.Contents;Please share the code that you are using including the date range, content field names, and identifier list.
0
Answers
-
More info: These errors from DSS api requests are intermittent.
0 -
The Azure func app is set to run in interval says every 30 mins. Within 30 mins, we make price request in batches, so in average, we could be making 20-40 api calls in 30 mins window, to extract prices for our predefined set of tickers. The app calls the validate function first before calling eod extraction function.
The error appears intermittent, however it can be pretty bad during the day time, e.g happen in the whole 1 or 2 hours. Comparing errors at night, there are less of these errors comparing with the day time.
I was informed that Refinitiv have security in place to block TCP ports that are being reused too quickly.
So few questions:
1. In your code example, any way to set some kind of settings to ExtractionsContext, ExtractionsContext.ExtractWithNotes, in such away preventing the block? or any code advice in general?
2. can ExtractionsContext class (deriving from Refinitiv client dlls) work in cloud environment such as Azure function compatible? or we may need to use HttpClient for api calls ?
3. do you have Azure function in production environment? Any advice on what to set for the Premium plan environment to prevent this error?
-----------------------------------------
Here are the codes:
public List<string> ValidateTickers(List<string> tickers)
{
InstrumentIdentifier[] instrumentIdentifiers = PopulateInstrumentIdentifiers(tickers);
var validatedIdentifiers = _extractionsContext.InstrumentListOperations.ValidateIdentifiers(instrumentIdentifiers, true);
var validTickers = validatedIdentifiers.ValidatedInstruments.Select(x =>x.Identifier).ToList();
return validTickers;
}
public ExtractionResult CreateAndRunEodPricingExtraction( List<string> tickers, List<string> tickerFields)
{
_extractionType = ExtractionType.EndOfDay;
InstrumentIdentifier[] instrumentIdentifiers = PopulateInstrumentIdentifiers(tickers);
//Create an on demand extraction, of type EndOfDayPricingExtractionRequest:
EndOfDayPricingExtractionRequest extractionEod = new EndOfDayPricingExtractionRequest
{
IdentifierList = InstrumentIdentifierList.Create(instrumentIdentifiers),
ContentFieldNames = tickerFields.ToArray()
};
//Run the extraction.
return _extractionsContext.ExtractWithNotes(extractionEod);
}
NOTE:
_extractionsContext is a type of ExtractionsContext.
0 -
I suggest you contact the DSS support team via MyRefinitv to verify the server log for your login at the time when the problem occurred. The DSS support team may be able to identify the problem.
0
Categories
- All Categories
- 6 AHS
- 37 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛